1

I am considering the following facts about the latex compiler:

  • It only takes PostScript (PS) or Encapsulated PostScript (EPS) files as image input;
  • It produces only DVI files as output, which can be converted in PS file;
  • It understand only T1 type fonts, which is a PostScript font format.

Why this compiler seems to be so strongly bound to PostScript? Is there a historical reason? And why the other more recent compilers (pdflatex, xeletax, lualatex) do not have this binding anymore?

  • 2
    "Knuth has said that there is nothing inherent in TeX that requires DVI as the output format, and later versions of TeX, notably pdfTeX, XeTeX and LuaTeX, all support output directly to PDF." (en.wikipedia.org/wiki/TeX). See also en.wikipedia.org/wiki/PdfTeX for history of the evolution. – Steven B. Segletes Jul 26 '16 at 13:06
  • PostScript is a professional page description format in printing industry, that's more than a reason. Pdf is based on a subset of postscript and compressed. Type 1 fonts were for a long time the professional quality fonts, nowadays replaced with Open Type fonts, which exist in postcript flavour (better quality, based on cubic splines) or true type flavour (initially designed for screen display, based on quadratic splines). – Bernard Jul 26 '16 at 13:14
2

Of the three bullet points only the middle one is correct. Classic TeX produces DVI output. As the name implies, DVI files are device independent and not tied to PostScript.

The DVI file just references fonts and images by name so is not tied to any particular format (for fonts you just need the font metrics)

What is true is that if you then process the dvi file with dvips then the image and font formats that can be handled depend on that driver. So your question is "why is dvips bound to PostScript" and the answer basically is that generating PostScript is what it is designed to do.

If you process the dvi file with dvipdfm(x) to produce PDF or dvisvg to produce svg, or dvilj to produce HP printer control language, the font formats and image types that can be handled would be quite different.

  • I have read everywhere that latex only accepts PS and EPS files. So why is this incorrect? – Neraste Jul 26 '16 at 14:57
  • @Neraste it happens xkcd.com/386 – David Carlisle Jul 26 '16 at 15:03
  • I do not get it. Can you give any proof? – Neraste Jul 26 '16 at 15:13
  • @Neraste what proof do you need? nowhere in official latex or graphics package documentation will you find that it says latex can only include eps, as for type1 latex was used for around a decade before it was easily even possible to use type 1 fonts, the default was always pk bitmap fonts. Try processing a latex dvi file with dvipdfm and you will find that you can include pdf files but not eps. – David Carlisle Jul 26 '16 at 15:26
  • @Neraste LaTeX can read the bounding box information in .ps and .eps files to allow space in the resulting document. If you provide dimensions, you can tell LaTeX to include any type of graphic. It's then down to the binaries involved to actually include it in the output. – Joseph Wright Jul 26 '16 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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