Which package version am I using?
Add \listfiles
to your preamble and then look at the .log
file. This will tell you the current version of all the packages loaded.
If you need to know this 'programmatically', then you can use the LaTeX kernel function \@ifpackagelater
to test by date:
\@ifpackagelater{<package>}{2011/03/13}
{%
% Do something for the newer version
}
{%
% Do something different for the older version
}%
The information is stored inside a special macro, so if you just want to 'take a peek' you can use that. Taking pgfplots
as an example
\expandafter\show\csname [email protected]\endcsname
Notice here that this needs the full file name we are interested in, so works for any file that contains suitable information (i.e. form \ProvidesPackage
, \ProvidesClass
or \ProvidesFile
).