关于python:Latex Tikz使用shell转义进行外部化不起作用

关于python:Latex Tikz使用shell转义进行外部化不起作用

我尝试使用 Tikz externalize,因为对于某些 tikz 图片,文件变得太大并超出内存大小。我发现很多其他主题都有类似的问题,但没有一个解决方案对我有用,或者我没有很好地实现它们。我使用的是 Winedt 10.2(也尝试过 Winedt 9)Mixtex 2.9

报告结构:

Final_Report.tex
--Layout.tex
--Simulation_model.tex
----plot_baseunit.tex(Tikz picture)

最终报告.tex

\documentclass[10pt,a4paper]{report}
\input{./Lay_out/layout.tex}`
\begin{document}
\input{./Chapters/Simulation_Model/Simulation_Model.tex}
\end{document}

布局.tex

\usepackage{tikz,pgfplots}
\usetikzlibrary{arrows,decorations.pathmorphing,shadows,fit,positioning,shapes,chains, plotmarks,automata,positioning}
\usepackage{subcaption}
%\usepackage[pdftex]{graphicx}
\usetikzlibrary{external,calc,patterns,angles,quotes,shapes.geometric,positioning}
\pgfplotsset{plot coordinates/math parser=false}
\tikzexternalize[prefix=figures/,shell escape=-enable-write18]
\newlength\figureheight
\newlength\figurewidth
%Standard figure dimension
\newcommand{\plotx}{12.0cm}
\newcommand{\ploty}{6.0cm}
\newcommand{\plotysub}{3.0cm} %y-dimension of seperate subplots
%Subplot dimensions (2 plots wide subplots)
\newcommand{\subtwoplotx}{5.25cm}
\newcommand{\subtwoploty}{4.5cm}
\tikzstyle{block} = [draw, rectangle, node distance=2.0cm, minimum height=3em, minimum width=4em]
\tikzstyle{sum} = [draw, circle, node distance=2.0cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]

模拟模型.tex

\begin{figure}[H]
\resizebox{\textwidth}{!}{%
\input{./figures/plot_baseunit.tex}
}%
\caption{The throughput and cycle time of the production line plotted against the process time of a base unit workstation, as bottleneck of the system. The horizontal dotted lines represent the designed throughput and cycle time of the Honda/JLR(green) and Audi/Porsche roof systems(purple).}
\label{fig:Base_unit_through}
\end{figure}

当我尝试使用 PDFTeXify 运行它时,出现以下错误。

   (figures/plot_baseunit.tex
===== 'mode=convert with system call': Invoking 'pdflatex -halt-on-error -interaction=batchmode -jobname 
"figures/Final_Report-figure0" "\def\tikzexternalrealjob{Final_Report}\input{Final_Report}"' ========

! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error-interact
ion=batchmode -jobname "figures/Final_Report-figure0" "\def\tikzexternalrealjob
{Final_Report}\input{Final_Report}" 
did NOT result in a usable output file 
'figures/Final_Report-figure0' (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 'figures/Final_Report-figure0.log'. If you continue now, I'll try to typeset the picture.

如果我直接按下回车键就会出现正确的数字,但这对大文件不起作用,并且会超出内存大小。

提前致谢!。

相关内容