Math & ScienceAlignment for a Group of Equations

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Alignment for a Group of Equations

Post by Cham »

I'm having a small problem with two groups of equations. One of them should be numbered as a whole, while the second group doesn't have a number. However, all the equations should be aligned with their equal sign. See the complete compilable example below:

Code: Select all

\documentclass[12pt,letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tensor}
\let\oldhat\hat
\renewcommand{\vec}[1]{\mathbf{#1}}
\renewcommand{\hat}[1]{\oldhat{\mathbf{#1}}}
\newcommand{\qvec}[1]{\boldsymbol{#1}}

\begin{document}

Bla bla bla bla :
	\begin{align}
	\begin{aligned}
		\tensor{\qvec{e}}{^0} &= A(z) \, \vec{d}t, \\[8pt]
		\tensor{\qvec{e}}{^1} &= B(z) \, \vec{d}x,
	\end{aligned}
	\intertext{Bla bla bla bla}
	\begin{aligned} \nonumber
		\vec{d}\tensor{\qvec{e}}{^0} &= A^{\prime} \; \vec{d}z \wedge \vec{d}t, \\[8pt]
		\vec{d}\tensor{\qvec{e}}{^1} &= B^{\prime} \; \vec{d}z \wedge \vec{d}x,
	\end{aligned}
	\end{align}

\end{document}
Currently, the second group isn't aligned with the first group. How can I align them all to their "=" sign? A preview of the compiled is attached.

I could use the align environment without the aligned environment inside, but then how can I number the first two equations as a whole, while leaving the last two equations without any number?
Attachments
groups.jpg
groups.jpg (15.04 KiB) Viewed 7091 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Alignment for a Group of Equations

Post by hugovdberg »

Try using split instead of aligned. This way the equations are all aligned within the outer align environment instead of separately inside both aligned environments. The split environment passes the alignment points to the align environment, which aligned does not.

Code: Select all

\documentclass[12pt,letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tensor}
\let\oldhat\hat
\renewcommand{\vec}[1]{\mathbf{#1}}
\renewcommand{\hat}[1]{\oldhat{\mathbf{#1}}}
\newcommand{\qvec}[1]{\boldsymbol{#1}}

\begin{document}

Bla bla bla bla :
        \begin{align}
        \begin{split}
                \tensor{\qvec{e}}{^0} &= A(z) \, \vec{d}t, \\[8pt]
                \tensor{\qvec{e}}{^1} &= B(z) \, \vec{d}x,
        \end{split}
        \intertext{Bla bla bla bla}
        \begin{split}
        \vec{d}\tensor{\qvec{e}}{^0} &= A^{\prime} \; \vec{d}z \wedge \vec{d}t,\\[8pt]
        \vec{d}\tensor{\qvec{e}}{^1} &= B^{\prime} \; \vec{d}z \wedge \vec{d}x, 
        \end{split}\nonumber
        \end{align}

\end{document}
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Alignment for a Group of Equations

Post by Cham »

Thanks, this solves my problem. :)

LaTeX impresses me each day ! :ugeek:
Post Reply