26

While LaTeX-based PDFs are generally very good when printed, I find most of them really hard and annoying to read on-screen when viewing the full page. Most line widths are very small, which results in badly rendered screen fonts or e.g. boxes with some non-displayed lines. Documents produced with other software don't suffer so much from this.

For example:

  • try reading this letter on screen in a PDF reader such as Adobe Reader.
  • or see the box in this document on page 2, at certain zoom levels the left line of the box is not shown)

Besides zooming in in the PDF reader (I don't like that, because I loose overview), or changing the default Latex font, is there an easy way to make LaTeX PDFs more on-screen readable?

(PS: I use Windows)

Rabarberski
  • 6,459
  • 4
    Letter 1's problems stem (primarily) from being converted to PDF a long time ago. Are you having that kind of problem with your documents? – Ken Bloom Jan 20 '11 at 15:56
  • 1
    On a related note, for people using Acrobat as their PDF viewer, I've just discovered an Acrobat (8) setting that improved my PDF viewing experience of LaTeX documents considerably: Edit > Preferences > Page Display > Smooth Text > 'For Laptop/LCS screens' is much better than the default 'For Monitor'. The default LaTeX font at small scale is now much better readable on screen. – Rabarberski May 23 '12 at 09:57

3 Answers3

16

The first document has no scalable fonts, it uses the default ComputerModern. A

\usepackage[T1]{fontenc}
\usepackage{lmodern}

will help. And for the second document it is always a problem with the viewer and the magnification.

  • 3
    'And for the second document it is always a problem with the viewer and the magnification.' Hmm, I was afraid of these kind of answers... – Rabarberski Jan 20 '11 at 11:27
  • I do a lot with TikZ and tikz-timing and I really agree with the 'viewer & magnification' argument. It's a pitty that even (or especially?) Acrobat Reader (under Ubuntu Linux in my case) does not display certain vector graphics in a good way as soon scaling/magnification is used. Certain lines are then to thin or thick etc., this even makes parts of the pictures disappear at certain zoom levels. – Martin Scharrer Jan 20 '11 at 11:43
  • The issue is that with documents generated by other software (Word, etc.) , the line-disappearance-problem ('caused by the viewer and magnification') pops up a lot less. – Rabarberski Jan 20 '11 at 11:43
  • I use xpdf and everything is fine ... –  Jan 20 '11 at 11:50
  • You're wrong about the first document. The problem is that it's using scalable Type 3 fonts, but with no hinting. – Ken Bloom Jan 20 '11 at 15:09
  • sure, I meant "no scalable Type 1 font" –  Jan 20 '11 at 15:14
  • 1
    Most modern setups should be able to give you a nice scalable Type 1 Computer Modern with hinting (no need to change the font), but if you're having problems you can look at a couple of questions in the TUG FAQ that discuss this issue, and mostly relate to older TeX installations. – Ken Bloom Jan 20 '11 at 16:13
  • 1
    it is not a question of the setup. Installing the CM super is more than 50 megabytes of code, the reason why they are not installed by MiKTeX by default. But using the lmodern package solves the problem and it has some corrections to the original CM –  Jan 20 '11 at 16:17
  • @Ken, no it is not using scalable fonts. It is using bitmapped fonts. Zoom in far enough and you can see the pixels... – Lev Bishop Jan 20 '11 at 16:23
  • @Lev: I zoomed into 400% and I do not see the pixels. It looks smooth. And I checked the font embedding info. – Ken Bloom Jan 20 '11 at 16:25
  • 1
    @Herbert, there is no need for lmodern or cm-super (as @Ken said) so long as one uses OT1 (as I am sure is the case for Knuth's letter). All Knuth needs to do to improve the fonts is to re-TeX his letter from it's unchanged original source but with a modern distribution so that it automatically picks up the type-1 CM fonts instead of the metafont-generated type-3. This will even look better than your suggestion to use lmodern, because the bluesky CM are much better hinted than lmodern. – Lev Bishop Jan 20 '11 at 16:35
  • @Ken, they are indeed Type 3, but Type 3 can be either bitmap or vector. In this case they are bitmap. 400% zoom is not enough. Try 1600% – Lev Bishop Jan 20 '11 at 16:39
  • @Lev Bishop: give an example where bluesky CM has a better hinting than the latin modern. –  Jan 20 '11 at 16:59
  • 1
    @Ken, everything is scalable, that is not the point. The point is if the font is scalable without loss of information. The definition of Type 3 is only that it is not Type 1 but it can also be scalable like a TYpe 1 font but has not its configuration of the parameters. But, of course, Type 3 fonts in TeX are often bitmap fonts. –  Jan 20 '11 at 17:03
  • @Lev, I do see the pixelation at 1600%. – Ken Bloom Jan 20 '11 at 18:33
  • 2
    @Herbert: Hinting problems with latin modern: see http://i.imgur.com/WNzem.png CM on the top, lmodern on the bottom. Note: 1) uneven tops of the capitals on lines 1 and 3; 2) heavy curves on the r, m & n on line 2; 3) very heavy W on line 3; 4) lower right corner of d on line 4. Other problems occur at different zoom levels. – Lev Bishop Jan 20 '11 at 18:38
  • @Lev: Cannot believe that this is latin modern as Type-1-font. Please give an example file. –  Jan 20 '11 at 19:10
  • @Herbert: it really is Type 1. http://dl.dropbox.com/u/5560769/hinting.pdf – Lev Bishop Jan 20 '11 at 19:26
  • @Lev: the pdf is not intersting to me. I want to see the tex source –  Jan 20 '11 at 19:32
  • @Lev: See my output with current Latin Modern: http://archiv.dante.de/~herbert/zz.pdf –  Jan 20 '11 at 19:38
  • @Herbert, I see same problems with your pdf (as always, only at certain zoom levels). My tex source: http://pastebin.com/TTa7ANC5 – Lev Bishop Jan 20 '11 at 19:48
  • @Lev: sorry, but then it is a problem with your viewer and not the font! I cannot see it with okular and xpdf. –  Jan 20 '11 at 19:58
  • @Herbert: My viewer is hardly obscure: adobe reader for windows, latest version. If you are writing for people who use windows then lmodern will look worse for them! Don't know about okular, but xpdf mostly ignores the font's hinting (producing fuzzier results all round, but more consistent in the face of poorly-hinted fonts). (The details depend on your version of freetype and xpdf and whether it is configured to use the bytecode interpreter, etc, but most distributions have it set up to use the freetype "light" autohinting). – Lev Bishop Jan 20 '11 at 20:30
  • @Herbert, your link archiv.dante.de/~herbert/zz.pdf ends with an error page. – Display Name May 25 '11 at 07:22
  • +1 (huge difference) for \usepackage{lmodern} when rendered in Adobe Reader in my Windows environment. Without that, in my pdfTeX (TeXStudio software) environment, I was getting the LaTeX modern font embedded into PDF as Type 3 Custom fonts, e.g., F18; Type: Type 3; Encoding: Custom; Actual Font: F18; Actual Font Type: Type 3. With your options, I now get Type 1 embedded fonts, e.g., LMMono12-Regular; Type: Type 1; Encoding Custom. They render much nicer in Adobe Reader X. The other fonts were rendered very "thin" and wash out. Even zoomed reading was taxing due to lack of robustness. – Fuhrmanator Apr 02 '13 at 14:09
4

You could always try increasing the font size and the weight of the lines in order to have them display better at lower magnifications. Also, use a font that looks better onscreen than does CM.

\documentclass[12pt]{article}
\usepackage[bitstream-charter]{mathdesign}

for example.

Seamus
  • 73,242
  • 2
    That's a really nice font (and indeed more readable than CM). Funny how the wikipedia entry says for bitstream-charter: 'Bitstream Charter is a typeface optimized for printing on the low-resolution 300 dpi laser printers of the 1980s.'. It seems it is indeed intended for low-resolution output devices (screen 72-92 dpi) – Rabarberski Jan 20 '11 at 13:35
  • there are tons of possible fonts, e.g. \usepackage{kpfonts} with a complete set of math symbols. –  Jan 20 '11 at 14:57
2

For the second example, if you are using Adobe Reader, try going to preferences and turning off "Enhance thin lines" and turning on "Smooth line art" in the "Page Display" category (under the "Rendering" heading).

Lev Bishop
  • 45,462