Protrusion: Bug and feature suggestion
I think, there is a bug in the protrusion feature. Try this LATEX example (I used pdfeTeX, Version 3.141592-1.30.6-2.2 (MiKTeX 2.5) (preloaded format=pdflatex 2006.8.25), but other versions show this problem as well): \documentclass{article} \usepackage{microtype} \begin{document} \begin{itemize} \item --E\\--E\\--E \end{itemize} \end{document} The first "--E" is not protruded. This may be reasonable from pdfTeX's point of view, as it is not the beginning of a line due to the leading char printed by the \item command. Nevertheless, for the human reader it is the beginning of a line. Maybe there are more situations where this happens than the first line of an item in the itemize environment as shown in this example. While thinking about a way to solve this, I got an idea: What about a "general protrusion" feature which protrudes each character which is at the begin of a line or follows a horizontal space of any kind? (In analogy: apply the same to each character which is at the end of a line or is followed by a horizontal space.) This would solve any protrusion issues as for example the first indented line of a paragraph (already solved by another workaround), the above mentioned first line of an \item and all other similar situations, which are currently unknown. Furthermore, this would give a new feature, which could improve the look enormously: The protrusion feature levels out differences in the gray-intensity at the left or right side of characters. But for human eyes there is no difference between the first character of a line and the first character of a word. (The same is for the last character of a line and the last character of a word). This could make the spaces between the words of a line more equal, resulting in a better grayscale distribution over the line. This demonstrates what I mean (quick&dirty hack): \documentclass{article} \usepackage{microtype} \begin{document} This\hspace{.1cm}is\hspace{.1cm}just\hspace{.1cm}a\hspace{.1cm}demonstration\hspace{.1cm}for\hspace{.1cm}the\hspace{.1cm}general\hspace{.1cm}protrusion\hspace{.1cm}feature. \parbox[b]{\linewidth}{This\hspace{.1cm}% \parbox[b]{\linewidth}{is\hspace{.1cm}% \parbox[b]{\linewidth}{just\hspace{.1cm}% \parbox[b]{\linewidth}{a\hspace{.1cm}% \parbox[b]{\linewidth}{demonstration\hspace{.1cm}% \parbox[b]{\linewidth}{for\hspace{.1cm}% \parbox[b]{\linewidth}{the\hspace{.1cm}% \parbox[b]{\linewidth}{general\hspace{.1cm}% \parbox[b]{\linewidth}{protrusion\hspace{.1cm}% \parbox[b]{\linewidth}{feature.% }}}}}}}}}}%I know: Bad code; just ignore the warnings coming here... \end{document} Bis dann, - Mark -- Wir lieben die Grenzerfahrung. Und wenn's scharf ist. Und damit meinen wir *richtig* scharf. Und keine Zungenpuderei... www.chili-fraktion.de
participants (1)
-
Mark Henning