[Tex/LaTex] Find out which packages are used

packages

I have written a LaTeX Document and it compiles fine on my machine, but now I would like to give the sources to someone else. Is there a quick way to list all the packages that have been used for compilation?

Best Answer

Yes. Add \listfiles somewhere in your document preamble. The output should be posted in your .log file. Here's an example from a test document containing 2 packages in the preamble and compiled using TeX Live 2009:

\documentclass{article}
\listfiles
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\begin{document}
test
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

The .log file now includes

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   array.sty    2008/09/09 v2.4c Tabular extension package (FMi)
hyperref.sty    2010/05/04 v6.81a Hypertext links for LaTeX
 ltxcmds.sty    2010/04/26 v1.7 LaTeX kernel commands for general use (HO)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
kvsetkeys.sty    2010/03/01 v1.9 Key value parser (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
etexcmds.sty    2010/01/28 v1.3 Prefix for e-TeX command names (HO)
pdfescape.sty    2010/03/01 v1.9 Provides hex, PDF name and string conversions 
(HO)
pdftexcmds.sty    2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2010/01/28 v2.1 Provides the ifpdf switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
 ifxetex.sty    2009/01/23 v0.5 Provides ifxetex conditional
 hycolor.sty    2009/12/12 v1.6 Color options of hyperref/bookmark (HO)
xcolor-patch.sty    2009/12/12 xcolor patch
letltxmacro.sty    2008/06/24 v1.3 Let assignment for LaTeX macros (HO)
  pd1enc.def    2010/05/04 v6.81a Hyperref: PDFDocEncoding definition (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty    2010/02/22 v3.7 Keyval support for LaTeX options (HO)
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
  bitset.sty    2007/09/28 v1.0 Data type bit set (HO)
bigintcalc.sty    2007/11/11 v1.1 Expandable big integer calculations (HO)
atbegshi.sty    2010/03/25 v1.12 At begin shipout hook (HO)
 hpdftex.def    2010/05/04 v6.81a Hyperref driver for pdfTeX
atveryend.sty    2010/03/24 v1.5 Hooks at very end of document (HO)
rerunfilecheck.sty    2010/03/16 v1.6 Rerun checks for auxiliary files (HO)
uniquecounter.sty    2009/12/18 v1.1 Provides unlimited unique counter (HO)
 nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
refcount.sty    2008/08/11 v3.1 Data extraction from references (HO)
gettitlestring.sty    2009/12/18 v1.3 Cleanup title references (HO)
 ***********

So, you can see that loading only array and hyperref (say), actually loads a large number of other packages as well.

Related Question