Tengo un conjunto de ecuaciones largas y quiero dividirlas en dos columnas. El código que escribí es
\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*}
Esto es lo que veo en el resultado.
Quiero alinearlos a la izquierda. Si bien la tercera ecuación es de varias líneas, quiero colocarlas en este orden.
**** = ********** = ************** (1)
**** = ************* (2)
**** = ********** (3)
+ ********************
+ ********************
¿Qué tengo que hacer?
Respuesta1
¿Estás buscando el alignat
medio ambiente?
Espero que los márgenes de su documento no sean demasiado grandes, de lo contrario las dos últimas líneas no encajarán en la línea....
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}
Producción
Respuesta2
Supongo que está utilizando un figure*
entorno porque su documento está escrito en dos columnas por página y desea que las ecuaciones abarquen ambas columnas. (Por favor, avise si esta corazonada es incorrecta). En cualquier caso, también necesita un entorno matemático adecuado para las tres ecuaciones que abarcan cinco líneas. Le sugiero que utilice el align
entorno del amsmath
paquete. Por cierto, a las figure*
ecuaciones y se les pueden asignar \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}