tikz/external: Fehler beim Schreiben der Dateien

tikz/external: Fehler beim Schreiben der Dateien

Der folgende Code hat vorher funktioniert, hat jetzt aber Probleme, die Ausgabedateien an das Ziel zu schreiben. Wo liegt hier das Problem?

  • Versuchte Lösung vonDasProblem, aber es hat nicht funktioniert

Befehl:

lualatex
--synctex=0
--shell-escape
--output-dir=.build
--interaction=nonstopmode
--file-line-error
main.tex

Dateibaum:

Dateistruktur

Hauptprotokoll:

Package tikz Error: Sorry, the system call 
'lualatex -shell-escape -halt-on-error -interaction=batchmode -jobname "./.build/figures/figure.0.0.0" "\def\tikzexternalrealjob{main}\input{main}"'
did NOT result in a usable output file 
'./.build/figures/figure.0.0.0' (expected one of .pdf:.jpg:.jpeg:.png:). 
Please verify that you have enabled system calls. 
For pdflatex, this is 'pdflatex -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 './.build/figures/figure.0.0.0.log'. 
If you continue now, I'll try to typeset the picture.

main.tex (MWE):

\documentclass{standalone}

% ========================= Tikz ========================= %
\usepackage{tikz}\usetikzlibrary{babel}
% ===================== External lib ===================== %
% \usepackage{shellesc} % Solution from similar question (doesnt work)
\usetikzlibrary{external}
\tikzsetfigurename{figure.\arabic{part}.\arabic{section}.} % set figure names
\tikzset{external/system call={%
    lualatex \tikzexternalcheckshellescape
    -halt-on-error
    -interaction=batchmode
    -jobname "\image" "\texsource"
    % --jobname "\image" \subfilename
}}

\tikzexternalize[
    up to date check={simple}, % faster check
    figure list={true}, % generate list of figures file
    prefix={./.build/figures/}
] % turn externalization on/off
% Fix background
\NewCommandCopy\oldtikzpicture\tikzpicture
\RenewDocumentCommand\tikzpicture{O{}}{\oldtikzpicture[#1]\nopagecolor}

\begin{document}

\tikzset{external/remake next=true}
\begin{tikzpicture}
    
    \draw[->, thick, blue!60!]
    ( 0,  0)--node[anchor=south west]{\( A \)}
    (-1,0.5);
    
\end{tikzpicture}

\end{document}

Antwort1

Es stellte sich heraus, \tikzsetexternalprefix{...}dass die Datei bereits im Verzeichnis als Stammdatei gestartet wird .build. Daher \tikzsetexternalprefix{./figures/}wurde das Problem durch diese Einstellung behoben.

verwandte Informationen