LyX ⇒ Equation numbering in appendix
Equation numbering in appendix
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Equation numbering in appendix
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
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbering in appendix
Use this line inside your document preamble:
Code: Select all
\numberwithin{equation}{section}
Stefan
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}
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: 10360
- 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
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}