The aligned
environment is a subsidiary math environment and thus can be used within another math environment. For example:
\begin{equation}
\begin{aligned}
\mathsf{E}[W^{i}_{t}-W^{i}_{s}]&=0,\\
\mathsf{E}\big[[W^{i}_{t}-W^{i}_{s}][W^{j}_{t}-W^{j}_{s}]\big]&=q_{ij}(t-s),\quad
1\le i,j\le n,\, 0\le s<t.
\end{aligned}
\end{equation}
This automatically numbers the entire aligned group. But if you are just using it within $ $
or \[ \]
there is no numbering. Hence, to get the numbering right, rather use the the align
environment as follows:
\documentclass[letterpaper]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align}
\mathsf{E}[W^{i}_{t}-W^{i}_{s}]&=0,\\
\mathsf{E}\big[[W^{i}_{t}-W^{i}_{s}][W^{j}_{t}-W^{j}_{s}]\big]&=q_{ij}(t-s),\quad
1\le i,j\le n,\, 0\le s<t. \notag \\
\mathsf{E}[W^{i}_{t}-W^{i}_{s}]&=0,
\end{align}
\end{document}
Notice the employment of the \notag
command to remove the numbering on desired lines.
This yields:
![enter image description here](https://i.stack.imgur.com/gCqGZ.png)
To work with the page breaks for the align environment, one can use \allowdisplaybreaks
. For example:
\documentclass[letterpaper]{article}
\usepackage{amsmath,amssymb,lipsum}
\begin{document}
\lipsum[2-6]
{\allowdisplaybreaks
\begin{align}
\mathsf{E}[W^{i}_{t}-W^{i}_{s}]&=0,\\
\mathsf{E}\big[[W^{i}_{t}-W^{i}_{s}][W^{j}_{t}-W^{j}_{s}]\big]&=q_{ij}(t-s),\quad
1\le i,j\le n,\, 0\le s<t. \notag \\
\mathsf{E}[W^{i}_{t}-W^{i}_{s}]&=0,
\end{align}}
\end{document}
This gives:
![enter image description here](https://i.stack.imgur.com/EvKRM.png)
Just omit the line-break directive at the end of the final equation in a given align
group. E.g.,
\begin{align}
P(t) &= \tfrac{3}{2}[v_d(t)i_d(t)] \\
Q(t) &= \tfrac{3}{2}[-v_d(t)i_q(t)] % <- no "\\" directive
\end{align}
As the code shows, I would also (a) remove the \left
and \right
qualifiers as they actually don't do anything for the cases at hand and (b) replace \frac
with \tfrac
.
If you have a multi-line equation that should be assigned just one equation number, don't use an align
environment. Instead, use a split
environment inside an equation
environment.
By the way, the arrows produced by \overrightarrow
look disproportionately large; consider using \vec
instead. For arrows (and other diacritics) set above the characters i
and j
, it's traditional to omit the "dot", i.e., to use a "dotless" i
and j
; this may be achieved in math mode by writing \imath
and \jmath
. Separately, I again would not use \left
and \right
to autosize the round parentheses and curly braces; consider using \bigl
and \bigr
instead. (By the way, the outermost round parentheses may be omitted in all three rows, right?)
![enter image description here](https://i.stack.imgur.com/OoX3n.png)
\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{section}
\begin{document}
\setcounter{section}{1} % just for this example
\setcounter{equation}{31}
\begin{align}
P(t) &= \tfrac{3}{2}[v_d(t)i_d(t)] \\
Q(t) &= \tfrac{3}{2}[-v_d(t)i_q(t)]
\end{align}
\setcounter{equation}{20} % just for this example
\begin{equation}\begin{split}
P(t)
&= \frac{
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)\bigr\} +
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)^*\bigr\}}{2} \\
&\quad+ \frac{
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)e^{-j\frac{4\pi}{3}}\bigr\} +
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)^*\bigr\}}{2} \\
&\quad+ \frac{
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)e^{-j\frac{8\pi}{3}}\bigr\} +
\Re\bigl\{\vec{v}(t)\vec{\imath}(t)^*\bigr\}}{2}
\end{split}\end{equation}
\end{document}
Best Answer
You can use the
\newtagform
and\usetagform
frommathtools
. Here are a few samples: