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.

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).

share|improve this question
1  
I wonder if there's a way to do this but print the version number of a particular package used. Presumably not, since not every package defines such a primitive... –  Seamus Oct 25 '10 at 12:47
2  
@Seamus: Check source2e.pdf for the implementation of \ProvidesPackage and 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
    
I think that would be an excellent question. I will leave Seamus the honor of asking it. It would be great to have a (draft) section in your document with this information. –  YuppieNetworking Oct 25 '10 at 14:17

2 Answers 2

up vote 20 down vote accepted

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.

share|improve this answer
    
Excellent! This is exactly why I was looking for. –  YuppieNetworking Oct 25 '10 at 11:23
    
Additionally, 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

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.

share|improve this answer

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.