2

I would like to use thumbpdf in my document and latexmk as build system. When I compile my document, I get following output:

Latexmk: Missing input file: 'document.tpt' from line 'Package thumbpdf Warning: Thumbnail data file `document.tpt' not found.'

Test document:

\documentclass{article}
\usepackage{thumbpdf}
\begin{document}
x
\end{document}

Compile with latexmk -pdf document.

Is there any possibility to quickly add support for thumbpdf to latexmk or is thumbpdf outdated, because PDF readers such as Acrobat Reader generate the thumbnails by themselves?

Based on example rc files, I discovered following entry for the .latexmkrc file:

#add support for thumbpdf
add_cus_dep('pdf', 'tpt', 0, 'thumbpdf');
sub thumbpdf {
    system( "thumbpdf \"$_[0].pdf\"" );
}

This creates, however, an endless loop.

2

Add the following lines to an rc file for latexmk:

$pdflatex = 'pdflatex %O %S && thumbpdf %Z%R';
$hash_calc_ignore_pattern{'tpt'} = '^% Date: ';
$clean_ext .= ' tpt';

(The form for the command line in $pdflatex is correct for a UNIX like system, e.g., linux and OS-X, but may need alteration on MS-Windows.)

  • Doesn't that always execute thumbpdf even if pdflatex is called multiple times? – koppor Oct 5 '15 at 17:05
  • 1
    Yes, and that is a disadvantage because thumbpdf runs much slower than pdflatex. What would be best would be to do a normal run (without invoking thumbpdf), then do postprocessing by a run of thumbpdf and then an extra run of pdflatex. At present, latexmk doesn't give any simple way of doing that. But it would be sufficient to write a script that invokes latexmk and then runs thumbpdf and pdflatex. However, is there really any need for thumbpdf given that modern previewers that support thumbnails also generate them themselves? – John Collins Oct 6 '15 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.