I wanted to create linguex
examples where the free translation line has a hanging indent of 21.3 big points. I found that use of the hanging
package, which is simple enough, does not work (second example in code). Reading the relevant section of the TeXbook (after three days) yielded a less simple solution which does work (first example in code). Why does use of the hanging
package fail?
\tracingmacros=1
\documentclass{article}
\usepackage{hanging}
\usepackage{linguex}
\usepackage{lipsum}
\begin{document}
\ex .
\gll Mundus vult decipi \\
world want deceive \\
\glt \dimen0=\the\textwidth
\dimen1=\the\textwidth
\dimen2=21.3bp
\advance\dimen0 by -\the\labelwidth
\advance\dimen1 by -\the\labelwidth
\advance\dimen1 by -\dimen2
\advance\dimen2 by \the\labelwidth
\parshape=2 \the\labelwidth \dimen0 \dimen2 \dimen1
\lipsum[2]
\ex .
\gll Mundus vult decipi \\
world want deceive \\
\glt \hangpara{21.3bp}{2}\lipsum[2]
\end{document}
Output of the above code is as follows:
cgloss4e.sty
) are essentially lists, and so the indentation for them is set before the text of the paragraph is encountered. The\hangpara
macro uses the TeX macros\hangindent
and\hangafter
underlyingly, not the more general\parshape
command. I don't know why the TeX\parshape
command is able to override everything, but it clearly is.\parshape
and\hangindent
are non zero, then the former wins. In a list environment the declaration\everypar{\parshape1\leftmargin\linewidth}
is executed (not the real truth, but a good approximation to it).