%% %% This is file `hanging.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% hanging.dtx (with options: `usc') %% %% Author: Peter Wilson (CUA and NIST) %% now at: peter.r.wilson@boeing.com %% Copyright 1998 Peter R. Wilson %% %% This program is provided under the terms of the %% LaTeX Project Public License distributed from CTAN %% archives in directory macros/latex/base/lppl.txt. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hanging}[2001/03/15 v1.2 hanging paragraphs and punctuation] \newcommand{\hangpara}[2]{\hangindent#1\hangafter#2\noindent} \newenvironment{hangparas}[2]{\setlength{\parindent}{\z@} \everypar={\hangpara{#1}{#2}}}{\par} \newif\ifh@ngcomma \h@ngcommatrue \newif\ifh@ngfstop \h@ngfstoptrue \newif\ifh@ngquote \h@ngquotetrue \newif\ifh@ngquery \h@ngquerytrue \newif\ifh@ngexcl \h@ngexcltrue \newif\ifh@ngcolon \h@ngcolontrue \newif\ifh@ngscolon \h@ngscolontrue \newif\ifh@ngfine \h@ngfinefalse \DeclareOption{notcomma}{\h@ngcommafalse} \DeclareOption{notperiod}{\h@ngfstopfalse} \DeclareOption{notquote}{\h@ngquotefalse} \DeclareOption{notquery}{\h@ngqueryfalse} \DeclareOption{notexcl}{\h@ngexclfalse} \DeclareOption{notcolon}{\h@ngcolonfalse} \DeclareOption{notscolon}{\h@ngscolonfalse} \DeclareOption{fine}{\h@ngfinetrue} \ProcessOptions\relax \ifh@ngfine \h@ngqueryfalse \h@ngexclfalse \fi \newlength{\h@ngcommawd} \settowidth{\h@ngcommawd}{,} \newlength{\h@ngfstopwd} \settowidth{\h@ngfstopwd}{.} \newlength{\h@ngquotewd} \settowidth{\h@ngquotewd}{`} \newlength{\h@ngdquotewd} \settowidth{\h@ngdquotewd}{``} \newlength{\h@ngquerywd} \settowidth{\h@ngquerywd}{?} \newlength{\h@ngexclwd} \settowidth{\h@ngexclwd}{!} \newlength{\h@ngcolonwd} \settowidth{\h@ngcolonwd}{:} \newlength{\h@ngscolonwd} \settowidth{\h@ngscolonwd}{;} \ifh@ngfine \setlength{\h@ngcommawd}{0.35\h@ngcommawd} \setlength{\h@ngfstopwd}{0.30\h@ngfstopwd} \setlength{\h@ngquotewd}{0.30\h@ngquotewd} \setlength{\h@ngdquotewd}{0.35\h@ngdquotewd} \setlength{\h@ngcolonwd}{0.20\h@ngcolonwd} \setlength{\h@ngscolonwd}{0.20\h@ngscolonwd} \fi \newcommand{\h@ngallowhyphens}{\nobreak\hskip\z@skip} \newcommand{\nhpt}{.} \newcommand{\nhlq}{`} \newcommand{\nhrq}{'} \newcommand{\h@nglqq}{``} \newcommand{\h@ngrqq}{''} \newcommand{\h@ngrquote}{'\kern-\h@ngquotewd\kern\h@ngquotewd} \newcommand{\h@nglquote}{\ifhmode\kern\h@ngquotewd\vadjust{}\else\leavevmode\fi \kern-\h@ngquotewd`\h@ngallowhyphens} \newcommand{\h@ngcomma}{,\kern-\h@ngcommawd\kern\h@ngcommawd} \newcommand{\h@ngfstop}{.\kern-\h@ngfstopwd\kern\h@ngfstopwd} \newcommand{\h@ngquery}{?\kern-\h@ngquerywd\kern\h@ngquerywd} \newcommand{\h@ngexcl}{!\kern-\h@ngexclwd\kern\h@ngexclwd} \newcommand{\h@ngcolon}{:\kern-\h@ngcolonwd\kern\h@ngcolonwd} \newcommand{\h@ngscolon}{;\kern-\h@ngscolonwd\kern\h@ngscolonwd} \def\activatepunct{% \ifh@ngcomma \catcode`\,=\active \fi \ifh@ngfstop \catcode`\.=\active \fi \ifh@ngquote \catcode`\'=\active \fi \ifh@ngquery \catcode`\?=\active \fi \ifh@ngexcl \catcode`\!=\active \fi \ifh@ngcolon \catcode`\:=\active \fi \ifh@ngscolon \catcode`\;=\active \fi \ifh@ngquote \catcode`\`=\active \fi } \begingroup \activatepunct \ifh@ngcomma \gdef,{\h@ngcomma} \fi \ifh@ngfstop \gdef.{\h@ngfstop} \fi \ifh@ngquery \gdef?{\h@ngquery} \fi \ifh@ngexcl \gdef!{\h@ngexcl} \fi \ifh@ngcolon \gdef:{\h@ngcolon} \fi \ifh@ngscolon \gdef;{\h@ngscolon} \fi \ifh@ngquote \gdef'{\futurelet\next\h@ngrqtest} \gdef`{\futurelet\next\h@nglqtest} \gdef\h@ngrqtest{\ifx\next'\let\next=\h@ngrquotes\else\let\next=\h@ngrquote\fi\next} \gdef\h@nglqtest{\ifx\next`\let\next=\h@nglquotes\else\let\next=\h@nglquote\fi\next} \gdef\h@ngrquotes'{\h@ngrqq\kern-\h@ngdquotewd\kern\h@ngdquotewd} \gdef\h@nglquotes`{\ifhmode\kern\h@ngdquotewd\vadjust{}\else\leavevmode\fi \kern-\h@ngdquotewd\h@nglqq\h@ngallowhyphens} \fi \endgroup \newenvironment{hangpunct}{\activatepunct}{} \endinput %% %% End of file `hanging.sty'.