12

Recently I typeset the same document on two different computers—once on my Mac and once on a machine running Ubuntu. (Both have the latest release of TeX Live, or whatever the standard distro is.) The two PDFs were identical, except that the heads of the \rightarrows (hence \tos) the Ubuntu machine produced were slightly fatter (and uglier) than those the Mac produced. Does this style feature vary across versions of LaTeX, and how can I control which arrowheads are typeset?

The code

\documentclass{article}

\begin{document}

This document was created on the Ubuntu machine, using \TeX\ Live 2009, \LaTeX\ 2e, etc.
Here is an arrow:
    \[ \rightarrow\]

\end{document}

on the Ubuntu machine generated arrowtest.pdf.

And the code

\documentclass{article}

\begin{document}

This document was created using the Mac, using \LaTeX\ 2e, etc.
This is an arrow:
    \[ \rightarrow \]

\end{document}

on my Mac generated arrowtest2.pdf.

David Carlisle
  • 757,742
Z Norwood
  • 817

1 Answers1

19

There are two versions of the arrow heads in circulation, so it is possible that on one machine a font uses the first while on the other machine a font uses the other one.

What happened is that Knuth changed the styles of arrows in 1992 as he says in his Important Message to all Users of TeX :

Many characters were improved in 1992, notably the arrows, which now are darker and have larger arrowheads, so that they don't disappear so easily after xeroxing.

Here is the two versions side by side by comparison:

comparison of the two arrows

The problem is that when the fonts based on Computer Modern where converted in type1 format, some of them stayed with the old version and some with the new version. For example, the amssymb \twoheadrightarrow uses the short arrowhead whereas the bluesky type1 \rightarrow uses the large one:

enter image description here

\documentclass{article}
\usepackage{amssymb}
\begin{document}
$\rightarrow$ $\twoheadrightarrow$
\end{document}

If you load an old lmodern package (e.g. version 1.3 from 2007/01/14) the \rightarrow will use the old arrow head (but the text arrow the new one). However, in the newest lmodern, the correct arrow heads are now being used, as the lm-hist.txt file says:

Ver. 2.003, 16.09.2009: main modification: shapes of LM glyps consistent
with D.E. Knuth's recent changes in CMs plus lots of tiny changes;
most important changes are described in details below: 
* fonts and glyphs modified according to D.E. Knuth's changes in CMs
  (note that the corrections related to glyph shapes, not metric data):
  -- leftward arrow (char '040), rightward arrow (char '041),
     upward arrow (char '042), downward arrow (char '043),
     left-and-right arrow (char '044), northeast arrow (char '045),
     southeast arrow (char '046), northwest arrow (char '055),
     southwest arrow (char '056), up-and-down arrow (char char '154)
     lmsy5 lmbsy5 lmsy6 lmsy7 lmbsy7 lmsy8 lmsy9 lmsy10 lmbsy10

If you are sure that your two TeX distributions are recent, using \usepackage{lmodern} on both should solve the issue.

  • This is exactly what I was hoping for. Thank you! – Z Norwood Jan 27 '11 at 08:14
  • Now what should I do if I like the old arrow heads much better? (OK, I shouldn't ask questions in comments, but this one may be permitted.) – Hendrik Vogt Jan 27 '11 at 08:36
  • 1
    @Hendrik: the simplest way is to keep an old version of lmodern around, but then you loose the newest changes to the fonts. A better solution would be to convince the lmodern team to add an option for this. Another possibility, if you don't mind doing a lot of work for it, is to make a virtual font which takes all the symbols from the newest lmodern except the arrows which would come from the old version. – Philippe Goutet Jan 27 '11 at 12:33
  • 1
    @Philippe: Options 2 and 3 both sound good. Probably I won't have the nerve for #2, but #3 is not too hard for me. Thanks! (It was here where I noticed the different arrow tips; for the triple arrow I actually don't like the new one.) – Hendrik Vogt Jan 27 '11 at 12:49
  • @Hendrik: the triple arrow is a good example; another is \overrightarrow in which the new version of the arrow is more likely to telescope what is beneath it. – Philippe Goutet Jan 27 '11 at 13:48
  • @Hendrik: I will look into Option 2 for you. =^] If you decide to pursue Option 3, and you're willing to share the virtual font, I would definitely be interested in it. – Z Norwood Jan 30 '11 at 22:46
  • @Philippe: As you probably suspected, I wasn't using the newest TeXLive on my Mac. I have now upgraded to the newest version, and I'm trying to use the old lmodern package to keep the slimmer arrows. I have copied the entire old lm folder (in /texmf-dist/tex/latex) into the appropriate directory for the new distribution. (This is the folder that contains lmodern.sty.) With this change, \usepackage{lmodern} doesn't change the arrows back to the slimmer variety. Should I be doing something else? – Z Norwood Jan 31 '11 at 06:47
  • 1
    @Zach: what you really need to copy is the pfb files from the [texmf]/fonts/type1/public/lm folder (the exact folder may vary from distribution to distribution). It would also be safer to copy the corresponding tfm files (in [texmf]/fonts/tfm/public/lm); the enc files shouldn't have changed, but if you have any problems, you should also copy them. – Philippe Goutet Jan 31 '11 at 08:37
  • @Zach: Thanks! No, at the moment I'm not pursuing #3, but in case I do in the future, I'll try and remember! – Hendrik Vogt Feb 01 '11 at 16:19
  • @Hendrik: I submitted a feature request to the lmodern people, who say that "there was never an intention within the frame of the LM project to maintain the previous versions". They also suggest writing a TeX script to select only the old arrows. I might undertake that project---if I do write such a script, I'll post it here. – Z Norwood Feb 01 '11 at 17:54
  • So is the $\rightarrow$ now identical to \textrightarrow ? –  Apr 29 '12 at 17:47
  • The last of Knuth's 1992 changes finally propagated into the Type 1 computer modern with amsfonts release 3.00 (sometime around 2008 I believe), although the changes to the arrows made it in 1996. See this amsfonts page. With a recent TeX distro there should be no longer difference between the type 1 computer modern and Knuth's mf. As mentioned here, some of the ams extra symbols such as \twoheadrightarrow are still based off the old design, however. – Lev Bishop Apr 29 '12 at 19:01
  • @Matthew: they are not quite the same, no. The general shape (size of the arrow tip) is identical, but as you can see on the images of my answer, one has rounded corners whereas the other has not (\rightarrow is on the left of the second image and \textrightarrow is on the right of the first image). Of course, once you print your document, the difference will not really be visible. – Philippe Goutet May 02 '12 at 05:43