这是我的 MWE:我可能不会使用所有的包,但为了安全起见,我把它们都放进去了。:我正在使用命令\newtcb定理使用命令\usepackage{tcolorbox} \tcbuselibrary{定理}对于定理附录编号投影仪软件包停止帧计数之前的附录投影机演示。问题是,附录在我的 MWE 中被标记为第 3 节,而不是第 A 节。因此,附录中定理的标题中写的是定理 3.1,而不是定理 A.1(引用 3.1 而不是 A.1 时也会出现同样的问题)。我如何让附录中的定理自动标记为 A.1,依此类推,附录部分为 A,而不是第 3 节的定理 3.1(与 MWE 中一样)?
与 MWE 合作
第一节定理1.1
一个重要结果
证明利用Stat引理3.1
附录
定理3.1
通缉
第一节定理1.1
一个重要结果
证明:利用Stat引理A.1
附录
定理A.1
\documentclass[slidetop, 11pt, leqno, english,french]{beamer}
\usepackage[french]{babel}
\usepackage{epsf}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{pifont}
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{textpos}
\usepackage{arydshln}
\usepackage{appendixnumberbeamer}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\usepackage{nameref}
\usepackage{hyperref}
\newtcbtheorem[number within=section]{lem}{Lemma}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\newtcbtheorem[number within=section]{thm}{Theorem}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\newtcbtheorem[number within=section]{cor}{Corollary}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\usetheme{Dresden}
\useoutertheme{miniframes}
\definecolor{bluegreen}{rgb}{0.0,0.57,0.5}
\usecolortheme[named=bluegreen]{structure}
\begin{document}
\section{First section}
\begin{frame}
\begin{thm}{}{}
An important result
\end{thm}
Proof: uses the \nameref{th:stat} in \ref{th:stat}
\end{frame}
\section{Second section}
\begin{frame}
\begin{thm}{}{}
An even more important result.
\end{thm}
Proof: Also uses \nameref{th:stat} in \ref{th:stat}
\end{frame}
\appendix
\section{Appendix}
\begin{frame}
\begin{thm}{Stat lemma}{stat}
Statement of the lemma here
\end{thm}
\end{frame}
\end{document}
答案1
执行命令后\appendix
,只需重置计数器section
并\setcounter{section}{0}
重新定义命令\thesection
即可\renewcommand{\thesection}{\Alph{section}}
将数字更改为字母,如下所示。
\documentclass{beamer}
\usepackage{hyperref}
\usepackage{nameref}
% \usepackage{appendixnumberbeamer}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\definecolor{bluegreen}{rgb}{0.0,0.57,0.5}
\usecolortheme[named=bluegreen]{structure}
\newtcbtheorem[number within=section]{lem}{Lemma}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\newtcbtheorem[number within=section]{thm}{Theorem}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\newtcbtheorem[number within=section]{cor}{Corollary}%
{colback=white,colframe=bluegreen,fonttitle=\bfseries}{th}
\begin{document}
\section{First section}
\begin{frame}
\begin{thm}{}{}
An important result
\end{thm}
Proof: uses the \nameref{th:stat} in \ref{th:stat}
\end{frame}
\section{Second section}
\begin{frame}
\begin{thm}{}{}
An even more important result.
\end{thm}
Proof: Also uses \nameref{th:stat} in \ref{th:stat}
\end{frame}
\appendix
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{section}}
\section{Appendix}
\begin{frame}
\begin{thm}{Stat lemma}{stat}
Statement of the lemma here
\end{thm}
\end{frame}
\end{document}
答案2
这是一个带有apptools
软件包的解决方案。
不相关:epsf
已过时并被取代graphicx
。此外,应将的语言选项babel
与文档类一起加载,以便通知所有依赖语言的包。
\documentclass[slidetop, 11pt, leqno, english,french]{beamer}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{pifont}
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{textpos}
\usepackage{arydshln}
\usepackage{appendixnumberbeamer}
\usepackage{apptools}
\AtAppendix{\setcounter{section}{0}\renewcommand{\thesection}{\Alph{section}}}
\usepackage{tcolorbox} \tcbuselibrary{定理} \newtcbtheorem[number within=section]{lem}{引理} {colback=white,colframe=bluegreen,fonttitle=\bfseries}{th} \newtcbtheorem[number within=section]{thm}{定理}%** {colback=white,colframe=bluegreen,fonttitle=\bfseries}{th} \newtcbtheorem[number within=section]{cor}{推论}%** {colback=white,colframe=bluegreen,fonttitle=\bfseries}{th} \usetheme{德累斯顿} \useoutertheme{miniframes} \definecolor{bluegreen}{rgb}{0.0,0.57,0.5} \usecolortheme[named=bluegreen]{结构} \usepackage{nameref} \usepackage{hyperref}
\begin{document}
\section{First section}
\begin{frame}
\begin{thm}{}{}
An important result
\end{thm}
Proof: uses the \nameref{th:stat} in \ref{th:stat}
\end{frame}
\section{Second section}
\begin{frame}
\begin{thm}{}{}
An even more important result.
\end{thm}
Proof: Also uses \nameref{th:stat} in \ref{th:stat}
\end{frame}
\appendix
\section{Appendix a}
\begin{frame}
\begin{thm}{Stat lemma}{stat}
Statement of the lemma here
\end{thm}
\end{frame}
\section{Appendix b}
\begin{frame}
\begin{thm}{Another Stat lemma}{stat2}
Statement of the lemma here
\end{thm}
\end{frame}
\end{document}