[tex-live] Metafont: DVI and PDF trouble

Thomas Hühn xf27 at arcor.de
Tue Mar 10 19:49:54 CET 2009


I'm doing the exercises from chapter five of the METAFONTbook.

Alas, I'm running into trouble. On both my Windows and my Linux
computer. Similar, but slightly different.

Right now I'm totally frustrated. You're reading about portability of
Metafont (and TeX) programs, and then just about every tool on every
platform you're using exhibits some nasty quirks. And I can't tell who's
right, i.e. where exactly everything goes wrong.


I'm doing exercise 2: http://www.thomas-huehn.de/mf/windows/exp2/io.log

Then I'm converting gf to DVI: GFtoDVI io.2602gf

But GSview complains:

GSview 4.9 2007-11-18
GPL Ghostscript 8.64 (2009-02-03)
Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Displaying non DSC file C:/Dokumente und Einstellungen/Thomas/Eigene Dateien/Metafont/bug/exp2/io.dvi
Error: /undefined in ÷
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861   1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1156/1684(ro)(G)--   --dict:0/20(G)--   --dict:73/200(L)--
Current allocation mode is local
Last OS error: No such file or directory

--- Begin offending input ---
;    è  METAFONT output 2009.03.10:1912ó|{Y       cmr8óßê<x 
   cmtt10óˆ µp µp grayóÓúö‚       logo8‹      O                                ÿÿÿÿ  
  °MET’ÿÿÑZAF’ÿÿ¢ŽONT¬’ ÕXoutput’ ÕX2009.03.10:1912’ ÕX’ ÕXP’ÿÿÃŽage’ ÕX1’ ÕX’ ÕXCharacter’ ÕX79’ ÕX’ ÕX\The’ ÕXletter’ ÕXO"Ž’F ,ˆ×‰ òÓH  {WŽ’ÿÿÂU ,ˆ×‰ òÓH  {WŽ ,Æ‚‰  {WƒÀŽ  9ó:‰  {WƒÀŽ ,Æ‚‰  {WƒÀŽ®’ E˜  ž Ž’ ‰šR 3Gž Ž’>(  ®/d Ž’ ‹Âá  2ö® Ž’ !ˆ  µŒ~ Ž’ ŠÁà ,»‚ Ž’ ô8  °±è Ž’ ŠÁà  8š> Ž’ /œx  ³	ù Ž’ ‹éo &/K Ž’ åÆH  ³4m Ž’ ‰Àß  >YÎ Ž­’ á”  º6
1lŽ’ „ZU <H42lŽ’"2  °V€3lŽ’ †‚ä  0€4lŽ’ $e’  ·³š1Ž’ öæB  ²Ù3Ž’ 2¡‚  µ11rŽ’ †©r #KA2rŽ’ ØbD  µ[‰3rŽ’ „€â  GZJ4rŽ’®@  #ÕP2’ ?ý=’ ?ý2l’ ?ý+’ ?ý(1.2,6.8)Ž’®@  0¿ø4’ ?ý=’ ?ý4r’ ?ý+’ ?ý(1,5.9)Ž®  3í{’ [Š’mmnnoopppqqqrrrsssttttuuuuvvvvvwwwwwwwwyzzzzzwwwwwwwwvvvvvuuuuuttttsssrrrqqqppooonnmmŽŽ  ?}£’ HDúmnnopqqrrsttuuvvwwxzzllaaWWNNFF??Ž’ ’wP???FFNNWWaalyzzzwwvvuutssrrqpponnmŽŽ  K
--- End offending input ---
file offset = 1024
gsapi_run_string_continue returns -101

DVIOUT (bundled with Tex Live) displays the DVI okay.

Now I'm converting to PDF: dvipdfm io.dvi

Acrobat Reader displays it okay, although the shading is quite uneven,
you see some lines in it. Probably bad resolution?

On to experiment 3 (mode=smoke):

Again converting to DVI. Same error in GSview, again display okay in

After converting to PDF, the result is horrible:

Both in Acrobat Reader and GSview. I have exported it from GSview as a
bitmap file, in case it looks okay on other systems:

As far as I can see the grey font characters are vertically offset by
one whole line. Pushing the lines together would result in a better

Now on Ubuntu Linux:

Experiment 2: http://www.thomas-huehn.de/mf/linux/exp2/io.log

It looks okay (with several white horizontal lines) in xdvi.

Gnome's document viewer (evince) does not open the DVI file, but
complains about invalid format.

After converting with dvipdfm it looks again okay in Evince and Acrobat
Reader (both a bit differently, both not perfect, but okay).

Experiment 3: http://www.thomas-huehn.de/mf/linux/exp3/io.log

Again, the DVI can't be opened with Evince, and shows those well-known
stripes in xdvi. Note, that this time the stripes (the vertical offset)
appears already in the DVI. On Windows it was only after converting to


Of course, those stripes stay there when converting to PDF via dvipdfm.


Any ideas?

Another thing: is there a way to get readline-like behaviour on
Metafont's prompt, just as in Windows?

And how do I get better resolution printouts, I suppose I need a
higher-resolution grey font?


More information about the tex-live mailing list