LyX ⇒ Equation numbering in appendix
Equation numbering in appendix
Hi everyone,
I am a new user of Lyx and am trying to number equations in a technical paper. In the appendices of the paper, I would like the numbering to restart and to have the letter of the appendix before the number (ex. A.1, A.2, etc., then B.1, B.2,...) Couldn't find the way to do it in Lyx. Anyone can help????
Thanks a lot
Laura
I am a new user of Lyx and am trying to number equations in a technical paper. In the appendices of the paper, I would like the numbering to restart and to have the letter of the appendix before the number (ex. A.1, A.2, etc., then B.1, B.2,...) Couldn't find the way to do it in Lyx. Anyone can help????
Thanks a lot
Laura
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Equation numbering in appendix
Hi Laura,
welcome to the board!
Which document class are you using? For instance with the report class it's the default behavior. After \appendix the equations will be numbered (A.1) and so on.
Stefan
welcome to the board!
Which document class are you using? For instance with the report class it's the default behavior. After \appendix the equations will be numbered (A.1) and so on.
Stefan
LaTeX.org admin
Equation numbering in appendix
Stefan_K wrote:Hi Laura,
welcome to the board!
Which document class are you using? For instance with the report class it's the default behavior. After \appendix the equations will be numbered (A.1) and so on.
Stefan
Hi Stefan,
Thanks for the reply! I'm using the article class, because I need abstract, references, etc...is there a way to do it without changing class?
Laura
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbering in appendix
Of course it's also possible with the article class. It's just not the default behaviour.
Use this line inside your document preamble:
The the equations will be numbered by section. Not only in the appendix, also in the main text, but I think this would be consistent.
Stefan
Use this line inside your document preamble:
Code: Select all
\numberwithin{equation}{section}
Stefan
LaTeX.org admin
Equation numbering in appendix
Remember that \numberwithin doesn't come from LaTeX. It comes from the amsmath package.Stefan_K wrote:The the equations will be numbered by section. Not only in the appendix, also in the main text, but I think this would be consistent.Code: Select all
\numberwithin{equation}{section}
So you'll need a
Code: Select all
\usepackage{amsmath}
Also note that \numberwithin need not be in the preamble. Putting it just after the \appendix will number appendix equations as desired but will leave the rest of the document using the standard numbering:
Code: Select all
\appendix
\numberwithin{equation}{section}
Last edited by Ted on Mon Jul 28, 2008 4:05 pm, edited 1 time in total.
Equation numbering in appendix
Stefan_K wrote:Of course it's also possible with the article class. It's just not the default behaviour.
Use this line inside your document preamble:The the equations will be numbered by section. Not only in the appendix, also in the main text, but I think this would be consistent.Code: Select all
\numberwithin{equation}{section}
Stefan
Thanks!!
Equation numbering in appendix
Thanks!!Ted wrote:Remember that \numberwithin doesn't come from LaTeX. It comes from the amsmath package.Stefan_K wrote:The the equations will be numbered by section. Not only in the appendix, also in the main text, but I think this would be consistent.Code: Select all
\numberwithin{equation}{section}
So you'll need ain your preamble.Code: Select all
\usepackage{amsmath}
Also note that \numberwithin need not be in the preamble. Putting it just after the \appendix will number appendix equations as desired but will leave the rest of the document using the standard numbering:--TedCode: Select all
\appendix \numberwithin{equation}{section}
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbering in appendix
I assumed amsmath would already be used when writing a technical paper. That may be set by LyX, so perhaps the line above is not needed if LyX did it. Laura, just in case: look into the menu Document -> Settings -> Math options and change "Use AMS math package automatically" to "Use AMS math package" if needed.Ted wrote:Remember that \numberwithin doesn't come from LaTeX. It comes from the amsmath package.
So you'll need ain your preamble.Code: Select all
\usepackage{amsmath}
Stefan
LaTeX.org admin
Equation numbering in appendix
It works perfectly!dlorenz wrote:Ted wrote:Remember that \numberwithin doesn't come from LaTeX. It comes from the amsmath package.Stefan_K wrote:The the equations will be numbered by section. Not only in the appendix, also in the main text, but I think this would be consistent.Code: Select all
\numberwithin{equation}{section}
So you'll need ain your preamble.Code: Select all
\usepackage{amsmath}
Also note that \numberwithin need not be in the preamble. Putting it just after the \appendix will number appendix equations as desired but will leave the rest of the document using the standard numbering:--TedCode: Select all
\appendix \numberwithin{equation}{section}
Equation numbering in appendix
Thanks, this exactly did the trick! And it looks much better in the sections in my article as well.