TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?



\ex .
\gll    Mundus vult decipi      \\
        world want deceive      \\
\glt    \dimen0=\the\textwidth
        \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

\ex .
\gll    Mundus vult decipi      \\
        world want deceive      \\
\glt    \hangpara{21.3bp}{2}\lipsum[2]


Output of the above code is as follows: enter image description here

share|improve this question
The glossing macros (defined in 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. – Alan Munn Nov 16 '13 at 5:18
@AlanMunn If both \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). – egreg Nov 16 '13 at 17:00
up vote 3 down vote accepted

As Alan Munn says in his comment, linguex basically uses list environments; inside a list environment at every paragraph start an instruction \parshape1 is executed, which wins over setting \hangindent. So any setting to \hangindent is ignored. You can use a list yourself: the setting is not difficult at all:



\ex .
\gll  Mundus vult decipi \\
      world want deceive \\
\glt  \begin{list}{}{%


You probably want to define your own environment for this:

 {\begin{list}{}{\leftmargin=#1 \itemindent=-\leftmargin}\item[]}

so the above can be specified as

\glt  \begin{myindentedpar}

A different amount of indentation can be specified in the optional argument


Here's the result with 21.3pt:

enter image description here

share|improve this answer
great answer. thanks! – jlovegren Nov 16 '13 at 18:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.