While finishing an article for TUGboat I came across a strange behavior of the protrusion mechanism of pdfTeX (as implemented by the microtype
package). The character \
in typewriter has a negative left margin protrusion, i.e., it normally sticks out by 1.57498pt into the left margin. However, if the same text is used within a quote
environment of LaTeX, the protrusion on the first line vanishes as can be seen in the following example:
\documentclass{article}
\usepackage{microtype}
\microtypesetup{protrusion=true}
\begin{document}
\noindent
\verb=\foo= \\
\verb=\foo= \\
\smash{\rule{.4pt}{34pt}}aaaaaaaa
\begin{quote}
\verb=\foo= \\
\verb=\foo= \\
\smash{\rule{.4pt}{34pt}}aaaaaaaa
\end{quote}
\end{document}
As a result we get
Now the problem is clearly related to how pdfTeX implements protrusion and in Unexpected interaction between microtype and \parindent this is already discussed in relation to the intentation box.
In this case here there is no indentation box. Instead we do have a hidden "label" box added by the quote
environment as that is really a trival form of list. Thus there is a hidden \item
without any visible output (like a zero width indentation box).
So here are my question(s):
- is my analysis correct (it basically only an assumption around midnight)
- if so, should pdfTeX try harder to do protusion across "non-visible" material at line ends? I.e., would that be a pdfTeX bug at least an improvement topic?
- or should/could this be fixed by code in LaTeX (or
microtype
) implementing such things differently?