![Beamer 反应编号问题](https://linux22.com/image/284120/Beamer%20%E5%8F%8D%E5%BA%94%E7%BC%96%E5%8F%B7%E9%97%AE%E9%A2%98.png)
使用reactions
环境Beamer
以及\begin{itemize}[<+->]
会导致在揭示时对反应重新编号。在下面的例子中,反应在初始幻灯片上按要求标记为 1-3,但在揭示列表中的文本时,它们随后被重新编号为 4-5、7-9、10-12 和 13-15。有没有快速解决这个问题而不删除[<+->]
; \begin{itemize}[<+->]
)
我尝试按照这个建议把\numberwithin{reaction}{chapter}
frame
和slide
代替chapter
Chemmacros 不会在新章节中重置反应计数器。我想我需要chapter
用正确的计数器标识符替换...
\documentclass{beamer}
\usepackage{chemfig}
\usepackage{chemmacros}
\begin{document}
\chemsetup[chemformula]{font-shape=sf}
\begin{frame}
\begin{reactions}
Cl-Cl ->[$\Delta$][$h\nu$] 2 "\Lewis{0.,Cl}" \label{react:init}\\
R3H + Cl "\Lewis{0.,\vphantom{H}}" -> R3 "\Lewis{0.,\vphantom{H}}" + HCl \label{react:propagation}
\end{reactions}
\begin{itemize}[<+->]
\item Initiation is cleavage of \ch{Cl-Cl} bond, Reaction~\ref{react:init}
\item 1st reaction is that of \ch{ Cl "\Lewis{0.,\vphantom{H}}"} with a hydrogen, Reaction~\ref{react:propagation1}
\item Once the carbon radical is formed \ch{ R3 "\Lewis{0.,\vphantom{H}}" }, subsequent bonding to the halogen \ch{Cl-Cl} can only occur at the radical site, Reaction~\ref{react:prop2}
\item Formation of \ch{HCl} is common to all reactants so determining factor must be the dissociation of the \ch{R-H} bond
\item Therefore not all \ch{C-H} bonds are equal
\end{itemize}
\end{frame}
\end{document}
答案1
你需要
\resetcounteronoverlays{reaction}
以防止使用覆盖规范时计数器步进。
\documentclass{beamer}
\usepackage{chemfig}
\usepackage{chemmacros}
\resetcounteronoverlays{reaction}
\begin{document}
\chemsetup[chemformula]{font-shape=sf}
\begin{frame}
\begin{reactions}
Cl-Cl ->[$\Delta$][$h\nu$] 2 "\Lewis{0.,Cl}" \label{react:init}\\
R3H + Cl "\Lewis{0.,\vphantom{H}}" -> R3 "\Lewis{0.,\vphantom{H}}" + HCl \label{react:propagation}
\end{reactions}
\begin{itemize}[<+->]
\item Initiation is cleavage of \ch{Cl-Cl} bond, Reaction~\ref{react:init}
\item 1st reaction is that of \ch{ Cl "\Lewis{0.,\vphantom{H}}"} with a hydrogen, Reaction~\ref{react:propagation1}
\item Once the carbon radical is formed \ch{ R3 "\Lewis{0.,\vphantom{H}}" }, subsequent bonding to the halogen \ch{Cl-Cl} can only occur at the radical site, Reaction~\ref{react:prop2}
\item Formation of \ch{HCl} is common to all reactants so determining factor must be the dissociation of the \ch{R-H} bond
\item Therefore not all \ch{C-H} bonds are equal
\end{itemize}
\end{frame}
\end{document}