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.

I know that there are many packages to modify the output of \listfiles. However, I would like to print this list not to the log file but in a nice way to the pdf.

This makes sence for my template documentation where I want to add a list of all files used in the template in the order of loading.

share|improve this question

2 Answers 2

up vote 11 down vote accepted

Just pointing you to a package, but dateiliste may be suitable:

enter image description here

The command \printFileList has an optional sectioning argument that specifies what type of document block you would like the file list to appear in, e.g. \printFileList[\section]. It also has some parameters that you can set:

  \fileListName     - title ("List of Files")
  \fileListPreamble - preamble (typeset before the table)
  \fileNameName     - table header "file name"
  \dateName         - table header "date"
  \verName          - table header "version"
  \descriptionName  - table header "description"

Minimal example (if you don't want the page numbers, call the package with the optional \usepackage[noshowpage]{dateiliste}):

\documentclass{article}
\usepackage{mathtools}
\usepackage{dateiliste}
% \usepackage[noshowpage]{dateiliste}
\listfiles
\begin{document}
\printFileList
\end{document}

Edit: If the noshowpage option doesn't quite solve the problem, you have a couple of other options:

(1) You could shorten the "version" column heading by \def\verName{ver.} (2) You could edit lines 172-173 of dateiliste.sty. Line 173 specifies the format for the description column. You could change it from the current

\string\raggedright\string\arraybackslash}X}

to,

\string\small\string\raggedright\string\arraybackslash}X}

in order to reduce the size of the text in that column. In addition, if you don't mind breaking the long file names in column 1, you could edit line 172 from

\string\begin{longtable}{\@tempa>{%

where \@tempa contains either lrll or lll to specify column justification (depending on whether you have invoked noshowpages, to

\string\begin{longtable}{p{3cm}ll>{%

where the p{3cm} could be adjusted to break just the longest file names.

share|improve this answer
    
It works, but in my file (code.google.com/p/latexthesistemplate/downloads/…) the output of the table is rather bad, due to very large column widths. This leads to a complete size of this list of 60 pages! –  Matthias Pospiech Oct 2 '12 at 21:36
    
Looking in the source of dateiliste it's using LTXtable to generate the list of files. Possibly there is some interaction somewhere between that and another package. –  Scott H. Oct 2 '12 at 21:54
    
Scratch that, the problem is on page 150 of your document: translator-months-dictionary-english.dict is forcing the first column to be excessively wide and pushing the remaining columns to the right. –  Scott H. Oct 2 '12 at 23:01
    
One thing you can do to help mitigate that (if those packages are necessary) is to use: \usepackage[noshowpages]{dateiliste} and to define \def\verName{ver.} –  Scott H. Oct 2 '12 at 23:09
    
Unfortunately I can not modify dateiliste.sty because it would mean that I must ship a modified dateiliste.sty file with my template. I contacted the author and hope he is willing to work with me on modification or futher options. –  Matthias Pospiech Oct 3 '12 at 9:40

This is literally stripped from latex.ltx and wrapped in \printfiles:

enter image description here

\listfiles
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{geometry}% http://ctan.org/pkg/geometry
\makeatletter
\def\printfilelist{%
  \begingroup
  \ttfamily%
  \par*File List* \par
  \@for\@currname:=\@filelist\do{%
    \filename@parse\@currname
    \edef\reserved@a{%
      \filename@base.%
      \ifx\filename@ext\relax tex\else\filename@ext\fi}
        \expandafter\let\expandafter\reserved@b
                              \csname ver@\reserved@a\endcsname
       \expandafter\expandafter\expandafter\@listfiles\expandafter
             \filename@area\filename@base\\\\\\\\\\\\\\\\\\\@@
       \filename@area\reserved@a
         \ifx\reserved@b\relax\else\@spaces\reserved@b\fi\par}
     ***********\par
  \endgroup%
}
\makeatother
\begin{document}
abc

\printfilelist
\end{document}

The file list represents that current on ScribTeX (under TeX Live 2009).

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.