5

I have a set of lengthy equations and I want to span them on two columns. The code I wrote is

\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*}

This is what I see in the output.

enter image description here

I want to align them on the left. While the third equation is multi-line, I want to place them in this order

 **** = ********** = **************                  (1)
 **** = *************                                (2)
 **** = **********                                   (3)
      + ********************
      + ********************

What should I do?

6

Are you looking for the alignat environment?

I hope that the margins of your document are not too large otherwise the last two lines won't fit in the line....

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}

Output

enter image description here

2

I take it you're using a figure* environment because your document is typeset in two columns per page and you wish to let the equations span both columns. (Please advise if this hunch is incorrect.) At any rate, you also need a suitable math environment for the three equations that span five lines. I suggest you use the align environment of the amsmath package. By the way, the figure* and the equations can be assigned separate \labels.

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.