[Tex/LaTex] Is pdflatex an engine or a format

format-filespdftex

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!

Best Answer

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.