[texhax] latex --version = pdfTeX ... ?
Karl Berry
karl at freefriends.org
Sun Nov 15 01:20:34 CET 2015
Could something that begins with "pdfTeX" really be the version number
of a latex.exe program? Is latex.exe just a special configuration of
pdftex?
Yes. LaTeX is a so-called "format" (collection of macros), not a
separate executable in itself. http://tug.org/levels.html discusses
such things briefly. (tug.org is inaccessible briefly due to network
infrastructure work, but hopefully will be back by the time you read this.)
pdfTeX can output DVI, and does so by default when invoked as
"latex", etc.
Is there any way to read the latex and/or dvipdfmx version numbers
at compile time and pass the string(s) to the metadata of the final
pdf file?
David mentioned \fmtversion for the real LaTeX version.
You can get the "engine" (pdftex) version with, most descriptive,
\pdftexbanner. Assuming you are using "latex".
There's no (safe) way to get the dvipdfmx version number from within
TeX. You'd need to extract it with something like
dvipdfmx --version | sed 1q >fmxver.txt
and then read that external file.
Good luck. Hope this helps,
Karl
More information about the texhax
mailing list