Is there any command or package to insert the version of LaTeX used to create a document? I am looking for a header or footer in the first page that says something like compiled with pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010).
Asked
Active
Viewed 2,186 times
23
David Carlisle
- 757,742
YuppieNetworking
- 5,919
- 7
- 36
- 40
2 Answers
26
There is \pdftexbanner primitive which will give you that message (works for both pdftex and luatex), but xetex don't seem to have a similar banner primitive.
خالد حسني
- 22,859
-
-
1Additionally, you can put this command inside a hyperref parameter to have this information in the document PDF metadata: \usepackage[pdftex, pdfauthor={}, pdfcreator={\pdftexbanner}]{hyperref} – alfC Mar 26 '12 at 23:20
-
1
6
Not as specific as you want, but Pdftex has the primitive \pdftexversion, which is 100x the version number.
You can make a shell script that creates a file based on the first line of the output of tex -v (or whatever), that is \input by the Latex program. Cf. the answers to the question Passing parameters to a document for pointers on how to do this.
Charles Stewart
- 21,014
- 5
- 65
- 121
-
\pdftexversiondoes not work: it gives me "You can't use \pdftexversion in vertical mode." and if I precede it with\leavevmodeit gives me "You can't use \pdftexversion in horizontal mode." – Peter Flynn Sep 24 '20 at 21:15
\ProvidesPackageand you will see that there is a global name for the package with the version in it. So as long as the package authors use that declaration you can find it in\csname ver@<package>.sty\endcsname. Ask your own question, though; this is a separate issue. – Matthew Leingang Oct 25 '10 at 13:04