3

Refer from TeXbyTopic sec 18.3.5 Hanging indentation versus \leftskip shifting

Setting \leftskip to some positive value for a paragraph means that the \hsize stays the same, but every line starts with a glue item. Hanging indentation, on the other hand, is implemented by decreasing the \hsize value for the lines that hang, and shifting the finished horizontal boxes horizontally in the surrounding vertical list

But following example does not show the changes on \hsize

\documentclass{article}

\begin{document}
\hsize=300pt
\parindent=0pt
\hangindent=2cm
\the\hsize\\\the\hsize

\the\hsize\\\the\hsize
\end{document}

enter image description here

  • 1
    The \hsize is changed during the process that splits a paragraph into lines, not at the user level. – egreg Jul 9 at 9:02
2

The description in “TeX by Topic” could indeed be misleading.

What happens is that a (primitive) \par command will send the whole paragraph to the internal processor where it will be split into lines according to the values of the relevant parameters *when \par has been executed.

There will always be a single value of \hsize for a paragraph. However, when \hangindent is nonzero, the value of \hsize will be modified during the internal operation for the lines where hanging indentation is specified by \hangafter.

Such changes only happen in the internal processor and are not available at the user level.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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