GeneralOverlapping of equation and its serial number

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Overlapping of equation and its serial number

Post by akira32 »

My equations and these serial numbers overlap a liittle part.
How do I separate them with a small distance.
I show the overlapping in the picture I attached.

Code: Select all

\begin{eqnarray}
Rect\_np.left=Rect\_Parent.left + Rect\_sm.left * Rect\_Parent.Width\\
Rect\_np.right=Rect\_Parent.left + Rect\_sm.right * Rect\_Parent.Width\\
Rect\_np.top=Rect\_Parent.top - Rect\_sm.top * Rect\_Parent.Height\\
Rect\_np.bottom=Rect\_Parent.top - Rect\_sm.bottom * Rect\_Parent.Height
\end{eqnarray}
[/color]
Attachments
overlapping of equation and its serial number
overlapping of equation and its serial number
equationpos.JPG (21.4 KiB) Viewed 4636 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

Overlapping of equation and its serial number

Post by Stefan Kottwitz »

Hi,

that's a known problem of eqnarray. eqnarray is obsolete, use the align environment of amsmath instead. For reasons and examples have a look at eqnarray vs. align. I modified your example:

Code: Select all

\begin{align}
Rect\_np.left   &= Rect\_Parent.left + Rect\_sm.left * Rect\_Parent.Width\\
Rect\_np.right  &= Rect\_Parent.left + Rect\_sm.right * Rect\_Parent.Width\\
Rect\_np.top    & =Rect\_Parent.top - Rect\_sm.top * Rect\_Parent.Height\\
Rect\_np.bottom &= Rect\_Parent.top - Rect\_sm.bottom * Rect\_Parent.Height
\end{align}
You may see that the equations are automatically aligned at the = relation symbol, perhaps you like that. There should be no overlapping, the tag/number would be set into the next line.
Perhaps you want to use a smaller font in that case, try:

Code: Select all

{\small
\begin{align}
...
\end{align}
}
Stefan
LaTeX.org admin
Post Reply