I tried to use \hangindent and \hangafter in latex2e.
Imagine my surprise when my hanging indentation persisted beyond the
current paragraph! I eventually traced the problem to latex2e's
redefinition of \par:
\par ->\@restorepar \everypar {}\par \@endpefalse
\@restorepar ->\def \par {\@par }
{\def}
{\everypar}
\par ->\@par
\@par ->\if@newlist \advance \par@deathcycles \@ne \ifnum \par@deathcycles >\@m
\@noitemerr {\@@par }\fi \else {\@@par }\fi
{\iffalse}
{false}
{begin-group character {}
{\par}
{end-group character }}
{restoring \hangindent=15.00003pt}
{\fi}
\@endpefalse ->\let \if@endpe \iffalse
{\let}
Note the evil restoration of \hangindent.
Is there an approved LaTeX way of getting hanging indentation?
If not, what ideas do people have for workarounds?
I hate to have to run around resetting hanging indentation, but there
must be a reason that \@@par is buried inside a group...
Norman
--
Norman Ramsey
http://www.cs.virginia.edu/~nr
1) \par is only defined as a grouped {\@@par} in lists.
2) A List is the approved LaTeX way...
Set \leftmargin etc.
(By the way, lists use \parshape, and \hangindent settings are ignored
when there is a \parshape set. The grouped \par in lists is to preserve
the \parshape, which also expires after a paragraph.)
Donald Arseneau as...@triumf.ca
I use the following command and it works the way it is supposed to:
\newcommand{\hin}{\hangindent=8mm \hangafter=1 \noindent }
That is, the first line is of full wigth, and the following lines are
indented by 8mm. The next paragraph is not affected. However this is
supposed to be done by a single command \hang which, I note, doesn't
work in Latex2e.
Moorthy
>Norman,
Well, this is simply false. The single command \hang is the equivalent
of \handindent\parindent (in plainTeX).
Since the value of \hangafter defaults to 1, you COULD get the
equivalent of \hin with
\parindent=8mm
\hang\noindent
but, of course, this will set the value of \parindent until it is changed.
In LaTeX, all bets are off, but it seems likely that, if \hang exists at
alll, it would work nearly the same as in plainTeX.
--
Dan Luecking Dept. of Mathematical Sciences
luec...@comp.uark.edu University of Arkansas
http://comp.uark.edu/~luecking/ Fayetteville, AR 72101
\subsection{References}
{\everypar = {\hangafter=1 \parindent 0pt \hangindent 15pt}
\noindent
Andreoni, J.\ (1990). Impure altruism and donations to public
goods: A theory of warm-glow giving. {\it Economic Journal,
100},
464--477.
% other references
}
% final bracket must have blank line before it.
Jonathan Baron, Professor of Psychology, University of Pennsylvania
home page (& schedule): http://www.sas.upenn.edu/~jbaron
web questionnaires: http://www.psych.upenn.edu/~baron/qs.html