Please excuse me if this is silly question...
Can any one explain the function of \offinterlineskip
? And where should be applicable?
Please excuse me if this is silly question...
Can any one explain the function of \offinterlineskip
? And where should be applicable?
\offinterlineskip
is a macro defined as
\def\offinterlineskip{%
\baselineskip=-1000pt
\lineskip=0pt
\lineskiplimit=\maxdimen
}
so within its scope TeX makes no attempt to make even line spacing and just stacks things vertically.
Compare the normal setting on the right where a line of . gets the same space as a line of A, with the setting with \offinterlineskip
\documentclass{article}
\begin{document}
\parbox[t]{3cm}{\offinterlineskip
A A A A A A A A A A A A
A A A A A A A A A A A A
A A A A A A A A A A A A
x x x x x x x x x x x x
x x x x x x x x x x x x
x x x x x x x x x x x x
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
}
\parbox[t]{3cm}{
A A A A A A A A A A A A
A A A A A A A A A A A A
A A A A A A A A A A A A
x x x x x x x x x x x x
x x x x x x x x x x x x
x x x x x x x x x x x x
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
}
\end{document}
Obviously this looks fairly horrible if used for paragraphs of text as here but it can be useful in special situations where you have constructed boxes with specific contents that want to be stacked exactly without TeX inserting any additional inter-line space.
\offinterlineskip
, how to restore the original vertical confugeration? It seems there is not a macro named oninterlineskip
.
\setlength
commands. Like any other settings, normally you do them in a group so they revert at the end.
Commented
Mar 21, 2022 at 7:43