Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a wall of equations in the format: y = x^2 = 9

So basically, it's the variable part, the equation part and the answer part. I want these to be in three columns that are all aligned. So my wall of equations looks like this:

Using this formula $C_{in} = \frac{C_{out}g_i}{\hat{f}}$
\[ C_{in-nand3} = \frac{30 * 1.21739}{3.3098} = 11.0344 \rightarrow \frac{11.0344}{2.75} = 4.0125  \]
\[ C_{in-nand2} = \frac{6.153 * 1.21739}{3.3098} = 2.263 \rightarrow \frac{2.263}{2.75} = .8229  \]
\[ C_{in-nand1} = \frac{5.514 * 1.21739}{3.3098} = 2.0279 \rightarrow \frac{2.0279}{2.75} = .7374  \]

There's more but you get the idea. I looked at other posts that suggested I put a

\begin{align}
\end{align} 

Around the whole thing, I did that but when I tried to compile in TexStudio it spat out this list of errors:

enter image description here

I have no idea what it is asking about. Does anyone know how I can achieve the alignment that I want?

share|improve this question
    
You should have a look at this question which provides a solution to your problem. –  Vincent Nivoliers Mar 28 '13 at 15:50
    
The align environment puts its material into display-math mode automatically. Thus, remove the \] and \[ items, and be sure to terminate all but the very last line with a \\ (double backslash) directive. –  Mico Mar 28 '13 at 15:53
add comment

1 Answer

up vote 1 down vote accepted

In align environment you should use & like this:

\begin{align}
    C_{in-nand3} & = \frac{30 * 1.21739}{3.3098} = 11.0344 \rightarrow \frac{11.0344}{2.75} = 4.0125 \\
    C_{in-nand2} & = \frac{6.153 * 1.21739}{3.3098} = 2.263 \rightarrow \frac{2.263}{2.75} = .8229 \\
    C_{in-nand1} & = \frac{5.514 * 1.21739}{3.3098} = 2.0279 \rightarrow \frac{2.0279}{2.75} = .7374
\end{align}

This will align all equations.

share|improve this answer
    
okay now I have: \begin{align} Using this formula $C_{in} = \frac{C_{out}g_i}{\hat{f}}$: C_{in-nand3} & = \frac{5.493 * 1.21739}{3.3098} = 2.02 \rightarrow \frac{2.02}{2.75} = .735 \ C_{in-nand2} & = \frac{(2.02 + 12.97) * 1.21739}{3.3098} = 5.514 \rightarrow \frac{5.514}{2.75} = 2.005 \ C_{in-nand1} & = \frac{5.514 * 1.21739}{3.3098} = 2.0279 \rightarrow \frac{2.0279}{2.75} = .7374 \end{align} but that gives me these errors i.stack.imgur.com/WWPSE.jpg –  Richard Mar 28 '13 at 15:53
    
C_\textnormal{in-nand3} will avoid typesetting the subscript in math font with the hyphen becoming a minus sign. –  egreg Mar 28 '13 at 15:55
    
@Richard: Place this: Using this formula $C_{in} = \frac{C_{out}g_i}{\hat{f}}$: before the \begin{align}. –  m0nhawk Mar 28 '13 at 15:59
    
since the original question used \[...\], i'd guess that no equation numbers are wanted, so align* would seem a better choice of environment. –  barbara beeton Mar 28 '13 at 16:12
    
Okay nvm, I fixed it now! I just had an empty space after \begin{align} and the first equation, texstudio didn't like that. –  Richard Mar 28 '13 at 16:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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