# Include LaTeX version in document

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

-
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
@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

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