我想提高我的乳胶论文的编译速度。我已经读过使用\ tikzexternalize,只有当tikz代码发生变化时才会被编译。
问题是我无法正确使用\ tikzexternalize。这是我的序言:
\usepackage{circuitikz}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, shadows, calc,positioning}
\tikzexternalize
这根本不起作用。我收到了下一个错误:
Undefined control sequence. \tikzexternalize
如果有用的话,我在Textbuite上使用MikTex,在Ubuntu下使用TextLive和Textstudio。它在任何这些系统中都不起作用。
希望你能帮助我。
答案 0 :(得分:1)
你没有忘记添加
\usetikzlibrary{external}
?我刚刚在这里找到它:https://discuss.elastic.co/t/adding-child-types-in-2-0/33267
答案 1 :(得分:1)
我做到了。 现在我没有任何错误消息,但没有数字保存到TikzFigures文件夹中。这是我的序言:
\usepackage{circuitikz}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, shadows, calc,positioning,external}
\tikzexternalize[mode=graphics if exists,
figure list=true,
prefix=TikzFigures/]
这就是我添加tikz数字的方式。第一个例子是使用circuitikz。
\begin{figure}[h]
\centering
\tikzsetnextfilename{nonInverter}
\begin{circuitikz}[scale=1]\draw
(4,.5) node [op amp](opamp) {} % Amplificador Operacional
(0,0) node [ ground]{} to (0,1)
to [R=$Sensor A201$,-*] (opamp.-)
(opamp.out)|- (5,2.5) to [R=$R_{F}$](2.8,2.5) to (opamp.-)
(opamp.+) to [short,-o] (2.8,-1) node [right] {$V_{+}$}
(opamp.out) to [short, *-o] (6,.5) node[right] {$V_{ADC}$}
;\end{circuitikz}
\end{figure}
下一个是使用常见的tikz包:
\begin{figure}[h]
\begin{center}
\tikzsetnextfilename{masterFlowChart}
\begin{tikzpicture}[node distance = 2cm, auto]
% Colocamos los nodos
\node [cloud] (init) {Initialize System};
\node [block, below of=init] (connection) {Connection to the master};
\node [block, below of=connection] (wait) {Wait for master events};
\node [block, below of=wait] (measure) {Measure and send to master};
% invisible node helpful later
\node[right of=wait,scale=0.05](inv){};
% Colocamos las relaciones entre nodos
\path [line] (init) -- (connection);
\path [line] (connection) edge[loop left] node {No Network}();
\path [line] (connection) -- (wait);
\path[-,draw] (wait) -| node{} (inv.north);
\path[line]{} (inv.north) |- node[above]{Reconnect} (connection);
\path [line] (wait) edge[loop left] node {Sleep}();
\path [line] (wait) -- (measure);
\path [line] (measure) -- (wait);
\end{tikzpicture}
\end{center}
\label{fig:slave_flowchart}
\end{figure}
最后一个是使用sequencediagram包,如果我没有错,也是基于tikz。
\begin{figure}[h]
\begin{center}
\tikzsetnextfilename{sequenceDiagramaECnsole10}
\begin{sequencediagram}
\newthread{pc}{PC}
\newinst[2]{master}{Master}
\newinst[2]{slave}{Slave}{}
\node[below right of=master,font=\scriptsize](master_state){Idle};
\node[below right of=slave,font=\scriptsize](slave_state){Sleep};
\begin{sdblock}{Run Loop}{}
\begin{call}{pc}{Start Measurement}{master}{Master Data}
\begin{call}{master}{Data Request}{slave}{Slave Data}
\end{call}
\end{call}
\end{sdblock}
\node[below of=master_state,font=\scriptsize, node distance= 4cm]{Idle};
\node[below of=slave_state,font=\scriptsize, node distance= 4cm]{Sleep};
\end{sequencediagram}
\end{center}
\label{fig:ecnsole_sequence_diagram}
\end{figure}