Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hangindent and LaTeX 2e

1,426 views
Skip to first unread message

Norman Ramsey

unread,
Feb 24, 1998, 3:00:00 AM2/24/98
to

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

Donald Arseneau

unread,
Feb 24, 1998, 3:00:00 AM2/24/98
to

In article <6cv56t$627$1...@murdoch.acc.Virginia.EDU>, n...@labrador.cs.virginia.edu (Norman Ramsey) writes...

>I tried to use \hangindent and \hangafter in latex2e.
>
>Is there an approved LaTeX way of getting hanging indentation?

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

Dr R Paskaramoorthy

unread,
Mar 1, 1998, 3:00:00 AM3/1/98
to

Norman,

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

Daniel Luecking

unread,
Mar 2, 1998, 3:00:00 AM3/2/98
to

>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

Jonathan Baron

unread,
Mar 2, 1998, 3:00:00 AM3/2/98
to

For those who want EVERY paragraph hang-inded in Latex (2e or
before, doesn't matter), here's a way to do it, illustrated with
the beginning of a reference section. This uses TeX commands,
but they work.

\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


tiago.jo...@gmail.com

unread,
Jul 5, 2015, 6:52:23 PM7/5/15
to
segunda-feira, 2 de Março de 1998 às 08:00:00 UTC, Jonathan Baron escreveu:
Thank you so much for this comment! I was really needing this format my master thesis refferences!

Thanks again!

joycer...@gmail.com

unread,
Feb 25, 2016, 6:50:30 AM2/25/16
to
Thank you, this nearly 18-yr-old post is exactly what I needed! For a handful of references I didn't want to get into a whole bibliography system.

Peter Flynn

unread,
Feb 25, 2016, 2:32:49 PM2/25/16
to
Except that it's much easier to use the hanging package and write

\begin{hangparas}{15pt}{1}
entry

entry

entry

...
\end{hangparas}

///Peter

0 new messages