Aligning and numbering equations in LaTeX

  • LaTeX
  • Thread starter shomuban
  • Start date
  • Tags
    Latex
In summary, the conversation discusses a problem with aligning equations and assigning a single equation number. The solution is to use the "aligned" command instead of "split" to align the second equal sign and make the equations look better.
  • #1
shomuban
3
0
I have not been able to find any help for the following problem. I have two equations of the type


blahbli=0 j=1,2,..., S
blahbla=0 k=1,2,..., T

where I want the first and second equal signs on each line to line up vertically with the corresponding equal signs on the second line AND I want to assign a single equation number to the pair of equations. I tried

\begin{equation}
\begin{split} blahbli &=0 \qquad j=1,2,\ldots, S\\
blahbla &=0 \qquad k=1,2,\ldots, T.
\end{split}
\end{equation}

but that does not align the second equal sign and looks ugly. Any way around this? Appreciate your help!
 
Physics news on Phys.org
  • #2
Use aligned rather than split.

[tex]
\begin{aligned} blahbli &=0 &j&=1,2,\ldots, S\\
blahbla &=0&k&=1,2,\ldots, T.
\end{aligned}
[/tex]
 
  • #3
Thank you so much! I had never used the aligned command before.
 

What is LaTeX?

LaTeX is a typesetting language used for creating professional and high-quality documents. It is often used in academic and scientific fields, and is especially popular for writing equations and mathematical formulas.

How do I align equations in LaTeX?

To align multiple equations in LaTeX, you can use the align environment. Within this environment, you can use the & symbol to specify the point of alignment for each equation. For example, \begin{align} x + y &= 3 \\ 2x - y &= 5 \end{align} will align the equations at the equal sign.

How do I number equations in LaTeX?

To number equations in LaTeX, you can use the equation environment. This will automatically number each equation in the document. If you want to manually label an equation, you can use the \label{} command and then refer to it using the \ref{} command. For example, \begin{equation} E = mc^2 \label{eq:emc2} \end{equation} will label the equation as (1) and you can refer to it as Equation \ref{eq:emc2} in your document.

How do I align and number equations in LaTeX?

To align and number equations in LaTeX, you can use the align environment and the equation environment together. This will align the equations and automatically number them. For example, \begin{align} E &= mc^2 \label{eq:emc2} \\ \vec{F} &= m\vec{a} \label{eq:newton} \end{align} will align the equations at the equal sign and label them as (1) and (2) respectively.

How can I customize the alignment and numbering of equations in LaTeX?

You can customize the alignment and numbering of equations in LaTeX by using the align and equation environments with different options and commands. For example, you can use the \begin{align*} \end{align*} command to align equations without numbering them, or use the \tag{} \label{} command to add a custom label to an equation. You can also change the numbering style using the \numberwithin{}{} command. For more advanced customization, you can use packages such as amsmath and mathtools.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
950
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Replies
0
Views
2K
Back
Top