TikZ (tikzexternalize) + Subcaptionbox-Fehler

TikZ (tikzexternalize) + Subcaptionbox-Fehler

Aktualisieren

Der Fehler tritt nur auf, wenn ich die Bilder selbst ändere oder ein Bild einfüge/lösche, das davor im Dokument vorkommt. Als schmutzigen Workaround habe ich einen Befehl definiert, \newcommand{\subcaptionfix}[1]{#1}den ich um die subcaptionbox-Befehle (einschließlich des ersten Arguments) schließe. Wenn ich etwas ändern muss, entferne ich es einfach, #1sodass LaTeX den Befehl ignoriert. Danach kann ich ihn wieder einfügen.

Eine richtige Lösung des Problems wäre netter, aber ich habe immer noch Schwierigkeiten, den Fehler in einer etwasminimalBeispiel. Vielleicht mache ich es in ein paar Wochen, wenn ich mehr Zeit habe.


Ich verwende subcaptionden Befehl \subcaptionboxzweimal in einer Abbildung. In jedem subcaptionboxplatziere ich ein TikZBild. Das funktioniert gut, solange ich keins der Bilder ändere. Sobald ich es ändere, erhalte ich die folgende Fehlermeldung:

! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "msc-preliminary-figure0" "\def\tikzextern
alrealjob{msc-preliminary}\input{msc-preliminary}"' did NOT result in a usable 
output file 'msc-preliminary-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). 
Please verify that you have enabled system calls. For pdflatex, this is 'pdflat
ex -shell-escape'. Sometimes it is also named 'write 18' or something like that
. Or maybe the command simply failed? Error messages can be found in 'msc-preli
minary-figure0.log'. If you continue now, I'll try to typeset the picture.

See the tikz package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.59 \end{tikzpicture}}

This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.

LaTeX Font Info:    Font shape `FMX/futm/m/n' will be
(Font)              scaled to size 6.99199pt on input line 1.
LaTeX Font Info:    Font shape `U/futm/m/n' will be
(Font)              scaled to size 6.99199pt on input line 1.
LaTeX Font Info:    Font shape `T1/futs/bx/n' in size <10> not available
(Font)              Font shape `T1/futs/b/n' tried instead on input line 59.
===== Image 'msc-preliminary-figure1' is up-to-date. ======
) [5]pdfTeX warning (ext4): destination with the same identifier (name{equation
.2.1}) has been already used, duplicate ignored
<to be read again> 
                   \relax 
l.45    \end{align}
                  [6pdfTeX warning (ext4): destination with the same identifier
 (name{equation.2.2}) has been already used, duplicate ignored

\AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                  \fi \fi 
l.59 \end{align}
                 <./msc-preliminary-figure1.pdf>]

Die Verwendung subcaptionder subfigureUmgebung von verursacht kein ähnliches Problem, aber die Bilder sind aufgrund unterschiedlicher Untertitellängen nicht horizontal ausgerichtet. Wenn ich den \subcaptionboxBefehl lösche, die Änderungen vornehme und sie erneut einfüge, funktioniert es auch gut.

Ich habe versucht, ein Minimalbeispiel zu erstellen, aber das Problem ist, dass ich den Fehler nicht reproduzieren konnte. Falls das relevant ist: Ich verwende \usepgfplotslibrary{external}und \tikzexternalize. Meine Dateistruktur sieht folgendermaßen aus:

Hauptdokument

\input{preamble.tex}
%... title and so on
\input{chapter1.tex}
\input{chapter2.tex}
%...
\input{chapterN.tex}
\input{appendix.tex}

Kapitel 2: chapter2.tex

%...text
\begin{figure}
  \input{figurefile.tikz}
  \caption[short]{long}
  \label{fig:foobar}
\end{figure}
%...text

Abbildung: figurefile.tikz

\subcaptionbox{first subcaption\label{fig:foo}}{
\begin{tikzpicture}
  %...picture
\end{tikzpicture}}
\hfill
\subcaptionbox{second subcaption\label{fig:bar}}{
\begin{tikzpicture}
  %...picture
\end{tikzpicture}}

Ist so etwas schon einmal jemandem passiert?

verwandte Informationen