I use tikz externalize to speed up the creation of huge beamer presentations for lectures. This works quite well, but if I use pgfpages to collect 2 slides on one a4-page for handouts, the externalized graphics are broken, because the pgfpages setting is also applied to them. See this example: (you need a graphics sub folder)

File with content:


\tikzexternalize[only named=true,
  mode=list and make,
  up to date check=md5,

    \draw node (){X};

File for beamer slides:


File for handouts:

\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

to reproduce first build the slides and check the created pdf in the graphics subfolder, then delete it and create the handout version, the graphic produced then is a4-format and thus, when included wrong scaling.

I am not sure if there is a way around this, or if this should be considered a bug.

1 Answer 1


Right now my workaround is to first create the slides version, thus creating all the external files with correct scaling and creating the handouts afterwards without building graphics, because they already exist.

But to update one graphic and creating the handout, I always have to produce both documents to get the graphics right.

using a makefile like this:

hand.pdf: hand.tex data.tex beam.pdf
    latexmk -pdf hand.tex
beam.pdf: beam.tex data.tex
    ${PDFLATEX} --shell-escape beam.tex
    ${MAKE} -f beam.makefile
    latexmk -pdf beam.tex

so, I set the dependency of the handout to include the slides. But I think the externalize mechanism should be more robust against pgfpages.

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.