[texhax] Determining the presentation package used from the pdf
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Mon Mar 19 12:21:39 CET 2012
On Sun, Mar 18, 2012 at 11:16:03PM -0700, Suresh Govindachar wrote:
>
> By examining a pdf presentation, is it possible to tell which TeX package
> (beamer, powerdot, or whatever) was used to create it?
In general no, but to some degree it can be guessed.
> If so, how? If not,
> why don't creators of packages for presentation add such information into
> the final pdf?
You can put the classes, packages, ... (the stuff that \listfiles
outputs at the end of the LaTeX run) in the creator field
of the PDF informations:
\documentclass{beamer}
\makeatletter
\newcommand*{\FileList}{}
\begingroup
\@for\@currname:=\@filelist\do{%
\filename at parse\@currname
\edef\reserved at a{%
\filename at base.%
\ifx\filename at ext\relax tex\else\filename at ext\fi
}%
\expandafter
\let\expandafter\reserved at b\csname ver@\reserved at a\endcsname
\ifx\reserved at b\relax
\let\reserved at b\@empty
\fi
\ifx\FileList\@empty
\else
\xdef\FileList{\FileList, }%
\fi
\ifx\reserved at b\@empty
\xdef\FileList{\FileList \reserved at a}%
\else
\xdef\FileList{\FileList \reserved at a\space(\reserved at b)}%
\fi
}%
\endgroup
\hypersetup{pdfcreator=\FileList}% takes some time
\makeatother
\begin{document}
Hello World.
\end{document}
But it's quite a lengthy list and some of the auxiliary files could be
filtered out.
Yours sincerely
Heiko Oberdiek
More information about the texhax
mailing list