Math & Science ⇒ Equation numbers running out of the page
Equation numbers running out of the page
Hello, some of my equations are so long that when latex puts the equation numbers, the numbers are either partially seen or moved to the next line (please refer to the attachments). Any solution to fix these two problems are greatly appreciated. Thanks.
- Attachments
-
- problem2.jpg (14.79 KiB) Viewed 11376 times
-
- problem1.jpg (8.07 KiB) Viewed 11376 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Equation numbers running out of the page
There's simply not sufficient space at the right.
I recommend to break the wide equation earlier, making several lines. The other options, such as making the margins smaller or reducing the font size of the equations are probably not so good.
Stefan
I recommend to break the wide equation earlier, making several lines. The other options, such as making the margins smaller or reducing the font size of the equations are probably not so good.
Stefan
LaTeX.org admin
Re: Equation numbers running out of the page
Thanks for the reply. I tried to reduce the font size already. Nothing changes.
For problem2, is there a way to move the (18) to the right?
For problem2, is there a way to move the (18) to the right?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbers running out of the page
Sure, it depends on how you are producing this equation (which environment?), perhaps show the source code. As also general document settings are important (margins? amsmath?), to verify and to fix it, a
minimal working example containing equation and document settings would be useful.
I guess you don't want to see any other equation where the tag (18) is pushed to the right, but your equation with your settings.
Stefan

I guess you don't want to see any other equation where the tag (18) is pushed to the right, but your equation with your settings.

Stefan
LaTeX.org admin
Re: Equation numbers running out of the page
Thanks Stefan! The source code is:
\begin{eqnarray}
-\frac{A_0}{2}g_z + \sum_{k=-N}^N [-\frac{g_z}{2} - \frac{(\bar z_{0} + z_q)(2 \pi k f_0 )^2}{2} ] (A_k - j B_k) e^{2\pi jkf_0 t} \label{equation18} \nonumber \\
= \frac{a_0}{2} + \frac{1}{2} \sum_{k=-N}^N (a_k - jb_k) e^{2\pi jkf_0 t
\end{eqnarray}
\begin{eqnarray}
-\frac{A_0}{2}g_z + \sum_{k=-N}^N [-\frac{g_z}{2} - \frac{(\bar z_{0} + z_q)(2 \pi k f_0 )^2}{2} ] (A_k - j B_k) e^{2\pi jkf_0 t} \label{equation18} \nonumber \\
= \frac{a_0}{2} + \frac{1}{2} \sum_{k=-N}^N (a_k - jb_k) e^{2\pi jkf_0 t
\end{eqnarray}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbers running out of the page
I see. There are errors:
So the tag is at the right, there's no problem with this code you showed, once the mentioned errors are fixed.
I strongly recommend to avoid eqnarray though, because there are known problems. Use an environment of
amsmath instead.
Stefan
- There cannot be an empty line within a math environment, because this means a paragraph break for TeX.
- A closing brace is missing in the last expression
e^{2\pi jkf_0 t
So the tag is at the right, there's no problem with this code you showed, once the mentioned errors are fixed.
I strongly recommend to avoid eqnarray though, because there are known problems. Use an environment of

Stefan
LaTeX.org admin
Re: Equation numbers running out of the page
Thanks Stefan. I removed \\ and added the closing bracket. Then, the equation looks like the one attached. Also, the two equations below this one got numbered as (18) and (19). Is there anything wrong with my corrections?
\begin{eqnarray}
-\frac{A_0}{2}g_z + \sum_{k=-N}^N [-\frac{g_z}{2} - \frac{(\bar z_{0} + z_q)(2 \pi k f_0 )^2}{2} ] (A_k - j B_k) e^{2\pi jkf_0 t} \label{equation18} \nonumber
= \frac{a_0}{2} + \frac{1}{2} \sum_{k=-N}^N (a_k - jb_k) e^{2\pi jkf_0 t}
\end{eqnarray}
\begin{eqnarray}
-\frac{A_0}{2}g_z + \sum_{k=-N}^N [-\frac{g_z}{2} - \frac{(\bar z_{0} + z_q)(2 \pi k f_0 )^2}{2} ] (A_k - j B_k) e^{2\pi jkf_0 t} \label{equation18} \nonumber
= \frac{a_0}{2} + \frac{1}{2} \sum_{k=-N}^N (a_k - jb_k) e^{2\pi jkf_0 t}
\end{eqnarray}
- Attachments
-
- new problem.jpg (7.26 KiB) Viewed 11361 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbers running out of the page
Yes - I did not say that you should remove the
Stefan
\\
. I said remove the empty line.Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbers running out of the page
Here's a complete document, which shows what to use instead of eqnarray: an environment of amsmath, here: multline.
If you post code, please use the code button, as I did.
Stefan
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
\label{equation18}
-\frac{A_0}{2}g_z + \sum_{k=-N}^N [-\frac{g_z}{2} - \frac{(\bar z_{0} + z_q)(2 \pi k f_0 )^2}{2} ] (A_k - j B_k) e^{2\pi jkf_0 t} \\
= \frac{a_0}{2} + \frac{1}{2} \sum_{k=-N}^N (a_k - jb_k) e^{2\pi jkf_0 t}
\end{multline}
\end{document}
Stefan
LaTeX.org admin