LyX ⇒ Appendix theorem numbering
Appendix theorem numbering
At the moment they are coming up as Lemma 30, Lemma 31, etc. since the numbering isn't resetting in the appendix.
I am currently using the modules Theorems(AMS) and Theorems(AMS-Extended). If I add "Theorems (Numbered by Section)" then I have the right numbering in the appendix but he wrong numbering in the main text. So I would like to switch to "Theorems (Numbered by Section)" when the appendix starts.
Any advice much appreciated.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
Appendix theorem numbering
Code: Select all
\documentclass{article}
\usepackage{amsthm}
\newtheorem{lemma}{Lemma}
\begin{document}
\section{This is a document section}
\begin{lemma}
This is a lemma.
\end{lemma}
\begin{appendix}
\section{This is an appendix section}
\setcounter{lemma}{0}
\renewcommand{\thelemma}{\Alph{section}\arabic{lemma}}
\begin{lemma}
This is another lemma.
\end{lemma}
\end{appendix}
\end{document}
Appendix theorem numbering
Thanks for this! Yes, that works. I went in the end with defining a special environment for the appendix:5gon12eder wrote:Would something like the following be okay for you?
Code: Select all
\documentclass{article} \usepackage{amsthm} \newtheorem{lemma}{Lemma} \begin{document} \section{This is a document section} \begin{lemma} This is a lemma. \end{lemma} \begin{appendix} \section{This is an appendix section} \setcounter{lemma}{0} \renewcommand{\thelemma}{\Alph{section}\arabic{lemma}} \begin{lemma} This is another lemma. \end{lemma} \end{appendix} \end{document}
In preamble:
\newtheorem{appxlem}{Lemma}[section]
In TeX code in the appendix: \begin{appxlem} and \end{appxlem}