我有以下代码,它应该从文件中生成一些输出和一个大图data5.csv
:
\documentclass[a4paper, landscape]{article}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{underscore}
\usepackage{adjustbox}
\usepackage{filecontents}
\makeatletter
\pgfplotsset{compat=1.13}
\makeatother
\begin{document}
\title{ Solve_RegCG_singular_dom_itersolver.cpp:110 }
\date{\today}
\maketitle
\pagebreak
\section{Lumped Preconditioner and SPDS (sparse-sparse)}
\textbf{CG Solver Overall Evaluation}
\begin{itemize}
\item Default: 4207.879395 J (24th, 2500000Hz)
\item Optimal: 4207.879395 J (24th, 2500000Hz)
\item Static savings: 0.0 J (0.00 \%)
\end{itemize}
\begin{adjustbox}{center, set height=\textheight}
\begin{tikzpicture}
\begin{axis}[
title={ 24_1200000_PREC1_SCHUR0.csv },
xlabel={ Number of samples },
ylabel={ Power [W] },
legend pos=outer north east,
xmajorgrids=true,
ymajorgrids=true,
grid style=dashed,
no markers,
width=24cm,
height=11cm,
cycle list name = color list
]
\addplot table [ x=ind, y=val, col sep=comma] {data5.csv};
\legend{ 0 }
\end{axis}
\end{tikzpicture}
\end{adjustbox}
\end{document}
链接在这里与文件data5.csv
。
问题是,当我尝试编译我的代码时,出现以下错误:
! TeX capacity exceeded, sorry [main memory size=7000000].
<argument> ...875e3],1Y9.1125e1],}{;1Y3.876e3\ETC.
l.46 ... x=ind, y=val, col sep=comma] {data5.csv};
我们可以看到,我已经尝试根据以下方法调整内存大小:这个问题但不幸的是,这还不够。
我的另一次尝试是否根据外化使用这个问题。我已将代码更改为如下形式:
\documentclass[a4paper, landscape]{article}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{underscore}
\usepackage{adjustbox}
\usepackage{filecontents}
\usepgfplotslibrary{external}
\tikzexternalize
\makeatletter
\pgfplotsset{compat=1.13}
\makeatother
\begin{document}
\title{ Solve_RegCG_singular_dom_itersolver.cpp:110 }
\date{\today}
\maketitle
\pagebreak
\section{Lumped Preconditioner and SPDS (sparse-sparse)}
\textbf{CG Solver Overall Evaluation}
\begin{itemize}
\item Default: 4207.879395 J (24th, 2500000Hz)
\item Optimal: 4207.879395 J (24th, 2500000Hz)
\item Static savings: 0.0 J (0.00 \%)
\end{itemize}
\begin{adjustbox}{center, set height=\textheight}
\begin{tikzpicture}
\begin{axis}[
title={ 24_1200000_PREC1_SCHUR0.csv },
xlabel={ Number of samples },
ylabel={ Power [W] },
legend pos=outer north east,
xmajorgrids=true,
ymajorgrids=true,
grid style=dashed,
no markers,
width=24cm,
height=11cm,
cycle list name = color list
]
\addplot table [ x=ind, y=val, col sep=comma] {data5.csv};
\legend{ 0 }
\end{axis}
\end{tikzpicture}
\end{adjustbox}
\end{document}
我正在使用命令编译它pdflatex -shell-escape
。问题是,我现在收到以下错误:
! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "results-figure0" "\def\tikzexternalrealjo
b{results}\input{results}"' did NOT result in a usable output file 'results-fig
ure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enab
led 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 fa
iled? Error messages can be found in 'results-figure0.log'.
那么,你知道我做错了什么吗?或者仅仅使用 根本无法打印这种尺寸的图pdflatex
?
答案1
如你看到的这里,在 SE 的其他答案中,正如 @JPi 在评论中指出的那样,LuaLaTeX 可以解决您的问题。特别是您必须使用相同的选项(或)运行lualatex
而不是运行。图像外部化后,您可以返回到,只要您不引入新图片或更改现有图片,在这种情况下您必须再次运行。pdflatex
-shell-escape
-enable-write18
pdflatex
lualatex