众所周知,一些tex 项目需要编译多次去完成任务。
我有一个这种情况,其中的forest
包的输出与第一次编译时预期的一致。
但是,我需要多次运行编译命令,因为我的其余幻灯片都有引用。
问题是,经过两次或多次编译后,框架变得非常混乱。此外,在我删除文件后,图形就修复了.aux
。
我正在使用lualatex v1.13
,但其他编译器仍然存在问题。有人知道这里的问题是什么吗?
\documentclass[notes,11pt, aspectratio=169]{beamer}
\usepackage{tikz}
\usepackage{forest}
\usetikzlibrary{overlay-beamer-styles}
\usetikzlibrary{snakes, arrows, fit, arrows.meta}
\tikzset{
every picture/.style={remember picture,baseline},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
},
temporal/.code args={<#1>#2#3#4}{%
\temporal<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}{\pgfkeysalso{#4}}
},
onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}}
}
}
\begin{document}
\begin{frame}{Test}
\begin{forest}
for tree={
treenode/.style = {draw,align=center, inner sep=3pt,
text centered, font=\sffamily},
arn_n/.style = {treenode, rectangle},
arn_x/.style = {treenode},
gray-arrow/.style = {draw=gray},
edge=-{Stealth}}
[$c_{44}$, arn_n,
[$c_{38}$, arn_n, temporal=<2>{fill=yellow}{fill=yellow!50}{fill=yellow!25}, name=c38,
[$c_{26}$, arn_n, temporal=<2>{fill=green}{fill=yellow}{fill=yellow!50}, name=c26,
[$c_{1}$, arn_x, temporal=<2>{}{fill=green}{}, name=c1],
[$c_{2}$, arn_x, temporal=<2>{}{fill=green}{}, name=c2
]
],
[$c_{27}$, arn_n, temporal=<2>{fill=green}{fill=yellow}{fill=yellow!50},
[$c_{3}$, arn_x, temporal=<2>{}{fill=green}{}],
[$c_{4}$, arn_x, temporal=<2>{}{fill=green}{}
]
]
],
[$c_{39}$, arn_n,
[$c_{28}$, arn_n,
[$c_{5}$, arn_x],
[$c_{6}$, arn_x]
],
[$c_{29}$, arn_n,
[$c_{7}$, arn_x],
[$c_{8}$, arn_x]
]
]
]
\draw[->, dashed] (c1) to[out=north west, in=west] (c26);
\draw[->, dashed] (c2) to[out=north east, in=east] (c26);
\draw[->, dashed] (c26) to[out=north, in=west] (c38);
\end{forest}
\end{frame}
\end{document}