I have some theorems in an appendix. Say Appendix A. I would like them to be numbered Lemma A1, Lemma A2,....
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.
LyX ⇒ Appendix theorem numbering
Appendix theorem numbering
Last edited by CSMR on Mon Feb 28, 2011 5:28 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 126
- Joined: Sun Feb 13, 2011 8:36 pm
Appendix theorem numbering
Would something like the following be okay for you?
Code: Select all
Code, edit and compile here:
\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}
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
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
Code, edit and compile here:\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}