0

I want to write LATeX code whose output should look like this:

A = B + C
  = 2 + 3

I'm trying to write the following code in LATeX:

\begin{equation}
A &= B + C \\
  &= 2 + 3

But the output of this code is:

A = B + C = 2 + 3

How to change the latex code to achieve the required output?

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
user1921843
  • 301
  • 1
  • 2
  • 8

1 Answers1

2

Remarks

For detailed information on the mathmode and other neat tricks with mathematics in LaTeX, consult the amsmath guide and Herbert Voß' excellent mathmode manual.

Implementation

\documentclass{article}
\pagestyle{empty}% remove page number for cropping
\usepackage{amsmath}
\begin{document}
\begin{align*}
    A &= B + C \\
      &= 2 + 3
\end{align*}
\end{document}

Output

enter image description here

David Carlisle
  • 757,742
Henri Menke
  • 109,596
  • 1
    Possibly equation with split if a number is wanted – egreg Oct 29 '13 at 23:50
  • @egreg Of course you are right, but there are tons of ways to write a multiline equation, so that I just pointed out one way and linked the documentation. If I was missing any important things, feel free to add them. – Henri Menke Oct 30 '13 at 00:17