Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The microtype package (or more likely the pdfTeX microtypographic extensions) have a strange interaction with \parindent that bit me.

\documentclass{article}
\usepackage{microtype}
\begin{document}
0:\vrule\strut\par
1:\vrule\strut\par
\parindent0pt
0:\vrule\strut\par
1:\vrule\strut\par
\microtypesetup{protrusion=false}
0:\vrule\strut\par
1:\vrule\strut\par
\end{document}

enter image description here

The colon after the second 1 is typeset slightly to the left of the one after the 0, but only when microtype's protrusion is on and \parindent is 0. Indeed, changing the \parindent to .00001 pt causes the rules to line up.

This seems like a bug to me, but it's possible that I just don't understand what is supposed to happen here.

The two work arounds are to either disable protrusion where I need this to line up, or change the \parindent to a small, nonzero value. Is there a better option?

share|improve this question
    
@lockstep: My question isn't really about indentation—which covers a wide variety of topics. It's specifically about the interaction between microtype and \parindent. –  TH. Apr 17 '11 at 11:25
3  
I don't think it's a bug. If \parindent is set to 0, then microtype applies margin kerning, so that the 1 will slightly protrude into the left margin. Of course, it's debatable whether the same thing should not also happen when \parindent is said to 0.00001pt. –  Michael Ummels Apr 17 '11 at 11:36
    
@TH.: Especially after @Michael's comment, I'd say that your question is about an interaction between microtype and indentation (or the lack of), and that {indentation} is a proper tag. Whether an extra {parindent} tag is needed is open to debate. Also note that concept tags are preferred to command tags. –  lockstep Apr 17 '11 at 11:54
    
@Michael: Seems odd that it wouldn't always perform the protrusion into the indentation box. –  TH. Apr 17 '11 at 11:56
2  
@Michael: You should convert your comment into an answer. –  lockstep Apr 22 '11 at 22:26

1 Answer 1

up vote 10 down vote accepted

The idea behind the protrusion option in the microtype package is to allow certain characters protrude into the margin, which can help to make the margins look more even to the human eye. As Hàn Thế Thành puts it in his dissertation:

Margin kerning is needed for optical alignment of the margins of a typeset text, because mechanical justification of the margins makes them look rather ragged. Some characters can make a line appear shorter to the human eye than others. Shifting such characters by an appropriate amount into the margins would greatly improve the appearance of a typeset text.

The protrusion settings for certain fonts such as Computer Modern are contained in the file mt-cmr.cfg that comes with the microtype package. As you can see, the package author has decided that the glyph 1 should protrude into the left margin, while the glyph 0 should not, which explains the difference you can observe between the second example (protrusion activated) and the third one (protrusion disabled).

As to whether the first character of an indented paragraph should also protrude to the left, I am not sure. Usually, paragraphs are longer than one line, so the indented lines do not form a single margin. In any case, I think this behaviour is hardwired into pdfTeX, so one should ask the developers of pdfTeX if this is intended.

share|improve this answer
    
Excellent answer which doesn't just give a solution but explains it appropriately. Well done! –  ipavlic Apr 29 '11 at 11:15
    
@ipavlic: Thanks. :-) –  Michael Ummels Apr 29 '11 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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