Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

From http://www.tug.org/levels.html

Engines: TeX, pdfTeX, XeTeX, LuaTeX, … These are the actual executable binaries which implement the different TeX dialects. The LaTeX format is implemented with both the pdfTeX (pdflatex) and XeTeX (xelatex) engines, for example. When someone says “TeX can't find my fonts”, they usually mean an engine.

Formats: LaTeX, plain TeX, pdfLaTeX, … These are the TeX-based languages in which you actually write documents. When someone says “TeX is giving me this mysterious error”, they usually mean a format.

At a high level, the output format that gets used depends on the program you invoke. If you run latex (which implements the LaTeX format), you will get DVI; if you run pdflatex (which also implements the LaTeX format), you will get PDF.

Is pdflatex an engine or a format?

What is the relation between pdflatex and pdftex?

Thanks!

share|improve this question
add comment

2 Answers 2

up vote 11 down vote accepted

In comments I listed all the "latex" formats that got installed by default in my texlive 2012 installation.

texmf-var/web2c/eptex/platex.fmt 
texmf-var/web2c/euptex/uplatex.fmt 
texmf-var/web2c/luatex/dvilualatex.fmt 
texmf-var/web2c/luatex/lualatex.fmt 
texmf-var/web2c/pdftex/cslatex.fmt 
texmf-var/web2c/pdftex/latex.fmt 
texmf-var/web2c/pdftex/mllatex.fmt 
texmf-var/web2c/pdftex/pdfcslatex.fmt 
texmf-var/web2c/pdftex/pdflatex.fmt 
texmf-var/web2c/xetex/xelatex.fmt 

One has to be careful though as they are not all "latex" in the sense of being a compiled version of an unmodified latex set of macros.

I believe latex.fmt and pdflatex.fmt only differ in that the same latex.ltx file was dumped with tex and pdftex respectively. (Actually latex.fmt is these days dumped with pdftex in dvi etex mode rather than classic tex) But for example cslatex is a different format, made by compiling the tex macros in

 /usr/local/texlive/2012/texmf-dist/tex/cslatex/base/cslatex.ini

This file makes some small number of definitions setting a non standard encoding regime if I recall correctly, and then inputs the standard latex. This is all above board and as expected, you can do just about anything you want with the latex sources except call a changed copy latex (and if you read the small print you can even do that if you claim you must) pdfcslatex.fmt is of course the same source as this, but dumped with pdftex. I'd need to check but I think the xelatex and lulatex formats similarly make some small (or not so small) additions to the standard latex macros as well as being dumped by the xetex and luatex engines respectively.

share|improve this answer
1  
With TeXLive 2012 (and may be 2011, 2010, 2009...), both latex.fmt and pdflatex.fmt are produced by pdfTeX engine. –  Paul Gaborit Jul 20 '12 at 0:09
    
yes thanks you missed an edit that went in a minute or two before your comment:-) –  David Carlisle Jul 20 '12 at 0:11
1  
In fact, the path of each format file contains the name of the *TeX engine used to produce it. –  Paul Gaborit Jul 20 '12 at 0:16
    
@PolGab so it does:-), I'm going to bed, why don't you write an answer, you seem to have a better grasp of current setup:-) –  David Carlisle Jul 20 '12 at 0:20
    
Thanks! (1) Does "some macros being dumped by some engine" mean the macros being pre-compiled by the engine? (2) "In comments I listed all the "latex" formats that got installed by default in my texlive 2012 installation." "LaTex" is a format itself, so are "PlainTeX" and "ConTeXt". So what does "'latex' formats" mean? –  Tim Jul 20 '12 at 13:48
show 3 more comments

pdflatex is a terminal command that tells the pdfTeX engine to use the LaTeX format.

Correction

Strictly speaking, pdflatex loads the pdfLaTeX format, but as far as the user is concerned this is identical to the LaTeX format. The additional commands that are available when using pdflatex (mostly starting with \pdf) are provided by the pdfTeX engine, not the format.

share|improve this answer
    
Do you think something is wrong with the second appearance of pdflatex? –  Tim Jul 19 '12 at 23:15
    
Are you referring to the fact that I forgot to capitalise the 't' and 'x'? One has to answer quickly around these parts! –  Ian Thompson Jul 19 '12 at 23:18
    
@Tim if you mean in the part you quote, no. The sentence reads "The LaTeX format is implemented with both the pdftex and xetex engines" The parts in the parentheses are simply clarifying which formats are implemented with which engines. (Of course the sentence should also include the luaTeX engine in the list, but that's a different issue.) –  Alan Munn Jul 19 '12 at 23:23
1  
@Tim not really latex and pdflatex are the same format in the sense that they are a compilation of the same tex source, but technically a format file is a memory dump made by the engine that is going to use it so in my texlive I have separate pdflatex.fmt and latex.fmt files: –  David Carlisle Jul 19 '12 at 23:29
1  
@AlanMunn: the only difference between latex.fmt and pdflatex.fmt is the default output format... –  Paul Gaborit Jul 20 '12 at 0:19
show 12 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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