TransWikia.com

How do I add a line break in display math mode?

TeX - LaTeX Asked by David Faux on July 9, 2021

For instance, how do I add a break after the first line in

[
    a + b = c // what should I add here?
    a = c - b
]

3 Answers

The [...] is used to typeset a single equation, not multiple equations.

You need to use an environment that allows for multiple equations. One way is to use gather, but I normally use align, both from the amsmath package:

enter image description here

Notes:

  • With display math environments if you leave blank lines in between you get additional vertical spacing and the possibility of a page break between a paragraph and following display.
  • If you don't want the equations numbered use the starred versions of the environments: gather* and align*.
  • A really good reference is Herbert Voss's comprehensive review of mathematics in (La)TeX.

Code:

documentclass{article}
usepackage{amsmath}
begin{document}
begin{gather}
    a + b = c  
    a = c - b
end{gather}
%
With the align environment you can align equations:
%
begin{align}
    a + b &= c         
        a &= c - b
end{align}
end{document}

Correct answer by Peter Grill on July 9, 2021

In case gather is not an option, for example, an imported command where everything is in math mode, consider make them a single-columned matrix without showing the symbol, then you can use .
Code:

[
begin{array}{c}
a + b = c   % just use 
a = c - b
end{array}
]

Answered by L.C on July 9, 2021

Why not use two modes.

[
    a + b = c
]
[
    a = c - b
]

Answered by John D on July 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP