I'm having a somewhat larger project, so I have split it up into multiple files and externalized the tikz figures to reduce compilation time. The basic setup is as follows:

Let's say I have a folder Main on the lowest level, that contains a folder Sub and a file Main.tex, which has the following content:

\usetikzlibrary{external, matrix}

% taken from: http://tex.stackexchange.com/questions/136143/tikz-animated-figure-in-beamer
\tikzset{invisible/.style={opacity=0}, visible on/.style={alt={#1{}{invisible}}}, alt/.code args={<#1>#2#3}{\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}},}


In the folder Sub, I have another folder Tikzand a file Sub.tex, which has the following content:


        \item A
        \item B

In the folder Tikz I have a file Test.tikz, which has the following content:

% taken from: http://tex.stackexchange.com/questions/136143/tikz-animated-figure-in-beamer
\matrix (magic) [matrix of nodes, ampersand replacement=\&, column sep=7mm, row sep=5mm]{
\node (se) [draw,shape=rectangle,visible on=<5->] {Existence Forte}; \&
\node (yw) [draw,shape=circle,visible on=<1->] {Yamada-watanab}; \&
\node (ul) [draw,shape=rectangle,visible on=<9->] {Unicité en Loi}; \\
\node (d1) [draw,shape=circle,visible on=<6->] {Définition}; \& 
\node (d2) [draw, shape=circle,visible on=<8->] {Définition}; \\
\node (we) [draw, shape=rectangle,visible on=<2->] {Existence Faible}; \&
\node (ec) [draw, shape=circle,visible on=<10->] {Engelbert-Cherny}; \& 
\node (pu) [draw, shape=rectangle,visible on=<3->] {Unicité Trajectorielle}; \\
\draw[->, thick,visible on=<6->] (se) -- (d1); \draw[->, thick,visible on=<7->]  -- (we);
\draw[->, thick,visible on=<4->] (we) -- (yw); \draw[->, thick,visible on=<5->] (yw) -- (se);
\draw[->, thick,visible on=<11->] (se) -- (ec); \draw[->, thick,visible on=<11->] (ul) -- (ec);
\draw[->, thick,visible on=<12->] (ec) -- (pu); \draw[->, thick,visible on=<4->] (pu) -- (yw);
\draw[->, thick,visible on=<8->] (pu) -- (d2); \draw[->, thick,visible on=<9->] (d2) -- (ul);

What I now want to achieve is, that every page from the file img_Test.pdf (generated by compiling the code) is shown on its own frame in the presentation with the items A and B below, so it looks like an animation if one is clicking down the slides. But what I currently get is just a one-paged pdf showing just the first page of the figure and no items.

If I just set tikzset{external/export=true} to false, everything works just fine, so it is just the externalization that causes this problem.

I'm using the TeX Live distribution from the official Ubuntu repositories, do the editing with TeXstudio and compile with PdfLaTeX using the command pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex. The --shell-escape command is non-default, but I need it to get my tikz pictures compiled.

  • Can you please add a compilable MWE? Dec 7, 2016 at 21:59
  • @samcarter I added the MWE as minimal as possible, but it's still somewhat voluminous, sorry. I could upload it somewhere and post a link here to make it more convenient, but I don't know, if this is desired, since external links might always get bugged or broken and downloaded files could always be malicious.
    – Wanderer
    Dec 10, 2016 at 9:54


You must log in to answer this question.

Browse other questions tagged .