Eu tenho um conjunto de equações longas e quero distribuí-las em duas colunas. O código que escrevi é
\begin{figure*} \label{eq:eq1}
\[ E_{\mathrm{access}} = E_{\mathrm{read}} + E_{\mathrm{write}}
= E_{\mathrm{R\_L1}} + E_{\mathrm{R\_lower}} + E_{\mathrm{W\_L1}} + E_{\mathrm{W\_lower}} \] \\
\[ E_{\mathrm{R\_L1}} = \frac{h_{1}}{A} \times E_{1}(\mathrm{T+D}) \] \\
\[ E_{\mathrm{R\_lower}} = \frac{h_{2}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \Big) \nonumber \] \\
+ \[ \frac{h_{3}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+ N \times E_{r}+E_{2}(\mathrm{T+D})+ N \times E_{r} + E_{d}+E_{1}(\mathrm{T+D}) \Big) \nonumber \] \\
+ \[ \frac{h_{4}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+E_{m}+E_{d}+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \Big) \\ \]
\end{figure*}
Isso é o que vejo na saída.
Quero alinhá-los à esquerda. Embora a terceira equação seja multilinha, quero colocá-las nesta ordem
**** = ********** = ************** (1)
**** = ************* (2)
**** = ********** (3)
+ ********************
+ ********************
O que devo fazer?
Responder1
Você está procurando o alignat
meio ambiente?
Espero que as margens do seu documento não sejam muito grandes, caso contrário as duas últimas linhas não caberão na linha....
MWE
\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage[margin=2cm]{geometry}
\begin{document}
\begin{figure*} \label{eq:eq1}
\begin{alignat}{2}
&E_{\mathrm{access}} && = E_{\mathrm{read}} + E_{\mathrm{write}}
= E_{\mathrm{R\_L1}} + E_{\mathrm{R\_lower}} + E_{\mathrm{W\_L1}} + E_{\mathrm{W\_lower}} \\
&E_{\mathrm{R\_L1}} && = \frac{h_{1}}{A} \times E_{1}(\mathrm{T+D}) \\
&E_{\mathrm{R\_lower}} && = \frac{h_{2}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \Big) \\
& && + \frac{h_{3}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+ N \times E_{r}+E_{2}(\mathrm{T+D})+ N \times E_{r} + E_{d}+E_{1}(\mathrm{T+D}) \Big) \nonumber \\
& && + \frac{h_{4}}{A} \times \Big( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+E_{m}+E_{d}+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \Big) \nonumber
\end{alignat}
\end{figure*}
\end{document}
Saída
Responder2
Presumo que você esteja usando um figure*
ambiente porque seu documento está composto em duas colunas por página e você deseja permitir que as equações abranjam ambas as colunas. (Por favor, informe se este palpite estiver incorreto.) De qualquer forma, você também precisa de um ambiente matemático adequado para as três equações que abrangem cinco linhas. Eu sugiro que você use o align
ambiente do amsmath
pacote. A propósito, as figure*
equações e podem receber \label
s separadas.
\documentclass[twocolumn]{article}
\usepackage{amsmath} % for "align" environment
\begin{document}
\begin{figure*} \label{fig:three_equations}
\begin{align}
E_{\mathrm{access}}
&= E_{\mathrm{read}} + E_{\mathrm{write}}
= E_{\mathrm{R\_L1}} + E_{\mathrm{R\_lower}} + E_{\mathrm{W\_L1}} + E_{\mathrm{W\_lower}} \label{eq:first}\\
E_{\mathrm{R\_L1}}
&= \frac{h_{1}}{A} \times E_{1}(\mathrm{T+D}) \label{eq:second} \\
E_{\mathrm{R\_lower}}
&= \frac{h_{2}}{A} \times \bigl( E_{1}(\mathrm{T})+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \bigr) \label{eq:third} \\
&\quad +\frac{h_{3}}{A} \times \bigl( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+ N \times E_{r}+E_{2}(\mathrm{T+D})+ N \times E_{r} + E_{d}+E_{1}(\mathrm{T+D}) \bigr) \notag \\
&\quad + \frac{h_{4}}{A} \times \bigl( E_{1}(\mathrm{T})+E_{2}(\mathrm{T})+E_{d}+E_{m}+E_{d}+E_{2}(\mathrm{T+D})+E_{1}(\mathrm{T+D}) \bigr) \notag
\end{align}
\end{figure*}
\end{document}