0

I'm new to the world of LaTex, reading The Not So Short Introduction to LATEX2", and saw something strange at page 18. The second line looks different, darker, than the other lines...

Assuming that this doc was typesetted with LaTeX, it made me wonder if it really worth the effort.

(Or maybe I'm missing something here?) screenshot

closed as off-topic by Dr. Manuel Kuehner, cfr, Arun Debray, user13907, Jesse Mar 20 '16 at 2:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Dr. Manuel Kuehner, cfr, Arun Debray, Community, Jesse
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    I don't have this. It certainly is a problem with your pdf viewer. What happens if you zoom? – Bernard Mar 19 '16 at 20:29
  • This is a screenshot of what I see. No problem at all. – egreg Mar 19 '16 at 20:41
  • Indeed, I see it only at Acrobat, on partial zoom. But on 100% it looks OK. And with Foxit it looks good at all zooms. Thanks – Zvika Mar 20 '16 at 6:10
1

It's the pdf viewer as Bernard and egreg said, but the Operating System, the font design and implementation, your display and your eyes also confound this. You will probably see the same behaviour from pdfs produced from sources other than TeX, although some fonts behave better than others.

Zoom in on the .jpg you uploaded and you'll see that the same character in different places has a different set of pixels of various greys, and even of various colours in what should be greys only. Each character is in different alignment to the pixel grid, and so anti-aliasing process, gives a black pixel in one place and two grey pixels in another.

If the greys are chosen well, it will look OK, since your eyes smooth out pixel-sized detail. However, choosing the right greys depends on layers of software and hardware with different ways of encoding brightness. The problem is the gamma conversion, which results in a non-linear relationship between pixel value and brightness. An average between two pixel values is different from an average of two brightnesses. When the average is calculated incorrectly, the two grey pixels will appear lighter or darker than a single black pixel. This nonlinearity vs averaging problem also leads to problems with colour, as discussed here: https://youtu.be/LKnqECcg6Gw

With this in mind, what is happening in a line of text can be explained. Most typefaces have many horizontal elements at the same height, so if one character looks bad, other characters on the same baseline will tend to look bad. This makes the complete line look bad, or at least different from its neighbours.

Incidentally, the colours around some vertical lines in the .jpg are a result of your pdf viewer + OS trying to do sub-pixel rendering which doesn't really change this explanation (much).

Some pdf viewers know about the pixel grid, nudging the baseline of any text to align with pixel grids, and also using font hinting to create better screen representations. Some do this only at certain magnifications. In the a version of Acrobat on Mac OS X I have, when you change the window size smoothly so that the magnification changes smoothly, the fonts keep their same form and brightness, but the line spacing jumps around. Acrobat is keeping baselines aligned to the pixel grid. On the built-in OSX "Preview" pdf viewer, the same experiment adjusts baseline spacing at large font sizes and uses sub-pixel baseline spacing at smaller sizes.

All of this is only visible on my external monitor which has ≈100ppi while the laptop's built-in ≈220ppi makes everything nice ... most of the time.

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