저는 원고의 그림에 Tikz 외부화를 사용하고 있습니다. Tikz/pgfplots 코드가 포함된 원본 파일은 삭제되었습니다(그러나 시뮬레이션 실행이 끝나면 몇 시간 후에 다시 생성됩니다).
그동안 본문에 몇 가지 내용을 변경하여 다른 사람에게 전달하여 검토하도록 하고 싶습니다. 이전 Tikz 컴파일의 출력 파일이 아직 남아 있습니다. Tikz가 이러한 파일을 다시 빌드하는 것을 방지하고 대신 그대로 사용하는 방법이 있습니까?
답변1
이것~이다최소한 더미 tikz;
명령이나 \begin{tikzpicture} \end{tikzpicture}
환경을 제공하면 가능합니다.
TikZ 코드가 어떻게 생겼는지에 대한 예를 제공하지 않았기 때문에 어떻게 해야 하는지 자세히 제안할 수 없습니다. "시뮬레이션 마무리"에 대해 작성하고 PGFPlots를 사용하고 있기 때문에 시뮬레이션 결과의 일부 플롯을 표시하고 싶다고 가정합니다. 최적으로는데이터일부 데이터 파일에서 \addplot table {<filename>};
. 그러면 시뮬레이션이 실행되는 동안 이러한 데이터 파일이 삭제되지만 환경 tikzpicture
자체는 여전히 존재하는 일이 발생할 수 있습니다. 그러면 아래 솔루션이 완벽하게 작동할 것입니다.
자세한 내용은 코드의 주석과530페이지의 PGFPlots 매뉴얼(v1.14)의 "PGF 또는 PGFPlots가 설치되지 않은 라이브러리 사용" 섹션.
\documentclass[border=5pt]{standalone}
% -----------------------------------------------------------------------------
% use this block to externalize your figures
\usepackage{pgfplots}
\usetikzlibrary{
% at present the PGFPlots External library is newer as the one in
% TikZ so I use this one
% (some bugs are fixed in it)
pgfplots.external,
}
\tikzexternalize[
% Because I think it is good practice to give your to externalize
% pictures a name, I use the following option
only named=true,
]
%% -----------------------------------------------------------------------------
%% use this block after externalizing
%% the only thing that needs to be present is either a `\tikz ...' command
%% or a `tikzpicture environment'
%% (copy the file
%% <tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty>
%% into the directory of your main file (\jobname) and rename it to
%% "tikzexternal.sty")
%\usepackage{tikzexternal}
%% -----------------------------------------------------------------------------
% store the externalized files in the following folder
% (this folder must already exist; otherwise you will get an error)
\tikzsetexternalprefix{Pics/pgf-export/}
\begin{document}
\tikzsetnextfilename{test}
\begin{tikzpicture}
% -----------------------------------------------
% this part can be commented, deleted or whatever
% after externalization and further use of the
% `tikzexternal' package
\begin{axis}
\addplot coordinates { (0,0) };
\end{axis}
% -----------------------------------------------
\end{tikzpicture}
\end{document}
답변2
바꾸다
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize
~와 함께
%\usepackage{tikz}
\usepackage{graphicx}
\usepackage{tikzexternal}
%\usetikzlibrary{external}
\tikzexternalize
당신이 예제를 제공하지 않았고 나는 이것을 해본 적이 없기 때문에 이것은 테스트되지 않았습니다. 그러나 그것은 에 설명된 방법입니다.50.5 PGF를 설치하지 않고 외부 그래픽 사용하기티에서는케이컴파일 속도를 높이는 데 사용하는 방법에 대해서도 설명하는 Z 매뉴얼. 이 방법의 제한 사항에 대해서는 해당 토론을 참조하세요. 다른 방법이 아닌 특정 방법으로 수행해야 할 몇 가지 작업이 있습니다. 여기서 라이브러리 external
와 Ti는케이Z 자체는 동일한 작업을 달성하기 위한 여러 가지 방법을 지원합니다.
을 사용하는 경우 pgfplots
PGF/Ti 대신 해당 설명서를 참조해야 합니다.케이아마도 일반적인 기능보다는 외부화 기능을 사용하고 있을 것입니다. 보다스테판 핀노우의 답변이 경우 프로세스는 일반적인 방식보다 훨씬 덜 간단해 보입니다.
그렇지 않으면 시도해보십시오.토비의 제안.