I want to describe the parameters in used in the equation in two columns below the equations. Something like this

**** = *******
*** = **********

  -                               -
 |   A: something                |  D: something
-|   B: something               -|  E: something
 |   C: smething                 |  F: something
  -                               -

Using array inside alignat, the following output is produced

\begin{figure} \label{eq1}
   & E_{\mathrm{access}}    \mathord{=} E_{\mathrm{read}} \mathord{+} E_{\mathrm{write}} = E_{\mathrm{R\_L1}} \mathord{+} E_{\mathrm{R\_lower}} \mathord{+} E_{\mathrm{W\_L1}} \mathord{+} E_{\mathrm{W\_lower}} \label{equation1} \\
   .... \\
\begin{array}{l l}
   &h_{r1},h_{w1}: &  \text{Read,Write hits in L1}  \\ 
   &h_{r2},h_{w2}: &  \text{Read,Write hits in local L2} \\
   &h_{r3},h_{w3}: &  \text{Read,Write hits in peer L2} \\
   &h_{r4},h_{w4}: &  \text{Read,Write hits in memory} \\
   &E_{1}:         &  \text{Energy per access at L1} \\
   &E_{2}:         &  \text{Energy per access at L2 slice} \\
   &E_{d}:         &  \text{Energy per access at directory} \\
   &E_{r}:         &  \text{Energy per access at router} \\
   &E_{m}:         &  \text{Energy per access at memory} \\
   &E_{N}:         &  \text{Number of hops} \\
   &E_{i}(\mathrm{T}):         &  \text{Energy of tag array} \\
   &E_{i}(\mathrm{T,D}):         &  \text{Aggregate energy of tag and data arrays} \\

enter image description here

The weird thing is that the equations are pushed to the right and that is because I used \\ in the last equation. The equations are lengthy, so I didn't paste them.

Additionally, how can I create two column legend?


Remove the array from the aligned portion and set it as a regular math element. Since you're in a figure, it should be centered by default making it look like a math display:

enter image description here

     f(x) &= ax^2 + bx + c

  $\begin{array}{l l}
     h_{r1},h_{w1}:       & \text{Read,Write hits in L1}  \\ 
     h_{r2},h_{w2}:       & \text{Read,Write hits in local L2} \\
     h_{r3},h_{w3}:       & \text{Read,Write hits in peer L2} \\
     h_{r4},h_{w4}:       & \text{Read,Write hits in memory} \\
     E_{1}:               & \text{Energy per access at L1} \\
     E_{2}:               & \text{Energy per access at L2 slice} \\
     E_{d}:               & \text{Energy per access at directory} \\
     E_{r}:               & \text{Energy per access at router} \\
     E_{m}:               & \text{Energy per access at memory} \\
     E_{N}:               & \text{Number of hops} \\
     E_{i}(\mathrm{T}):   & \text{Energy of tag array} \\
     E_{i}(\mathrm{T,D}): & \text{Aggregate energy of tag and data arrays} \\

You may also consider using an array column specification l @{\ :\ } l to set the : automatically. Expected output would be

enter image description here

Due to your thin columns, you won't be able to split the array into multiple side-be-side columns. However, this is how you can do that independent of the align construction:

  $\begin{array}{l @{\ :\ } l}
     h_{r1},h_{w1}       & \text{Read,Write hits in L1}  \\ 
     h_{r2},h_{w2}       & \text{Read,Write hits in local L2} \\
     h_{r3},h_{w3}       & \text{Read,Write hits in peer L2} \\
     h_{r4},h_{w4}       & \text{Read,Write hits in memory} \\
     E_{1}               & \text{Energy per access at L1} \\
     E_{2}               & \text{Energy per access at L2 slice}
  \begin{array}{l @{\ :\ } l}
     E_{d}               & \text{Energy per access at directory} \\
     E_{r}               & \text{Energy per access at router} \\
     E_{m}               & \text{Energy per access at memory} \\
     E_{N}               & \text{Number of hops} \\
     E_{i}(\mathrm{T})   & \text{Energy of tag array} \\
     E_{i}(\mathrm{T,D}) & \text{Aggregate energy of tag and data arrays}

\quad ensures a gap between the left/right portions of the arrays. Here is the too-wide output:

enter image description here

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.