protrusion issue - pdftex bug, microtype bug or LaTeX bug?

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?
-
And see also tex.stackexchange.com/questions/13666/… –  Lev Bishop Jan 15 '13 at 23:29
@Lev why is this a duplicate? it is about the same topic, right, but it is not asking the same question about it, does it? –  Frank Mittelbach Jan 15 '13 at 23:42

• Without pdftex providing any suitable means it would be very hard for microtype to fix the situation; see this kludge. It would be easier to do (though still messy) with a command telling pdftex that it should regard the current point as the beginning/end of a line. There even is a patch providing such a command, which never seems to have made it into a release, however.
• (Of course, implementing the quote environment as a list with an empty item (verbatim being another such case) may be considered a rather unfortunate choice by LaTeX2e, anyway – something that should be investigated for LaTeX3 IMHO.)