169 votes

How can I split an equation over two (or more) lines

You can use multline or split provided by amsmath package. Use multline to split equations without alignment (first line left, last line right) Use split to split equations with alignment Here are ...
SparkAndShine's user avatar
111 votes

Multiple lines one side of equation with a Curly Bracket

Use the cases environment, like this. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} D_{it} = \begin{cases} 1 & \text{if bank $i$ issues ABs at time $t$...
gernot's user avatar
  • 47.1k
100 votes

Is it possible to pagebreak aligned equations?

Additionally to the above answers, as asked in comments, the command \allowdisplaybreaks from amsmath can be used locally do a display break by using the \begingroup and \endgroup commands: \...
Mr G's user avatar
  • 1,279
77 votes

Align equation left

Note: This doesn't answer the question exactly. But still try this solution first as it is probably the simplest. Use align, and put & at the beginning of every line. Use \\ to separate multiple ...
Binu Jasim's user avatar
56 votes

Attractive Boxed Equations

tcolorbox also offers several options for boxed math expressions. tcbhighmath is an special box which can be used with empheq package, but it's also easy to declare new boxes to use with empheq. ...
Ignasi's user avatar
  • 134k
56 votes
Accepted

What is the difference between split, multline, align, breqn for breaking an equation into multiple lines?

As noted in comments the amsmath and breqn documentation have several good examples, also the mathtools package has extended versions of several of the amsmath alignments. But the usual style here is ...
David Carlisle's user avatar
55 votes

How to break a long equation?

The aligned environment from amsmath is also a good option: \begin{equation} \begin{aligned} F ={} & \{F_{x} \in F_{c} : (|S| > |C|) \\ & \cap (\mathrm{minPixels} < |S| < \...
AboAmmar's user avatar
  • 45.9k
53 votes
Accepted

Gather vs aligned - centered equation with one number

The gathered environment, used within math mode, is what you're looking for. \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage[utf8]{inputenc} \begin{document} \...
Arun Debray's user avatar
  • 7,066
50 votes

Symbol for Gaussian distribution

From Wikipedia: where code for the displayed equation is: \[ X \sim \mathcal{N}(\mu,\,\sigma^{2})\,. \]
Zarko's user avatar
  • 284k
43 votes

How do I turn off equation auto numbering

If you use this: \begin{equation} ... \end{equation} try this instead: \begin{equation*} ... \end{equation*} This solution requires the use of the package amsmath.
Soroush's user avatar
  • 545
42 votes

What is the meaning of $$$ in LaTex?

The markup is completely wrong and should be removed, but to answer the question of what it means \begin{equation} $$$ \notag \displaystyle\int_{-1}^{2} x^3\:dx-\displaystyle \int_{-1}^{2} 2x\:dx \\ ...
David Carlisle's user avatar
37 votes
Accepted

Fix ugly kerning in equation subscript

In math-mode you should to use \mathit{...} (slanted} or \mathbf{...} (bold) or normal \mathrm{...} for any type of the text into math formula. \documentclass{article} \begin{document} \[C_{\mathit{...
Sebastiano's user avatar
  • 51.5k
34 votes

Why does no one fix eqnarray?

Fixing it would have mostly disadvantages. Firstly for any serious math use you probably want amsmath anyway, that adds far more than a better eqnarray and if you are loading amsmath and not using ...
David Carlisle's user avatar
34 votes
Accepted

Difference between {align} and {aligned}[t]

You're using the environments incorrectly. Here's how you could (should...) use them: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} x + 3y + 4z &= 2 \\ ...
Werner's user avatar
  • 589k
33 votes

Why doesn't lineno number a paragraph when it is followed by an indented equation?

For line numbering to be done correctly the math environments has to be wrapped using the \begin{linenomath*} and \end{linenomath*} code: \documentclass[12pt]{article} \usepackage{amsmath} \...
Bamzi's user avatar
  • 343
31 votes
Accepted

Optimization formulas in LaTeX

this is very easy to accomplish using the aligned environment from amsmath: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{aligned} \min_{w,b,\xi} \quad & \...
barbara beeton's user avatar
29 votes

Image equation to TeX

Mathpix Snip: Scanner App for Math and Science https://www.mathpix.com/ Mathpix Snip digitizes handwritten or printed text, and copies outputs to the clipboard that can be pasted into LaTeX editors ...
Henri Menke's user avatar
29 votes
Accepted

align vs. equation: Which way is typograpically preferred?

For the typographic comparison you're looking to make, we need to distinguish between two groups of environments that generate display-style equations: Methods for generating (mostly) single-line ...
Mico's user avatar
  • 479k
29 votes

Re-define "mu" in "$\mu$m" for units (upright \mu instead of italic \mu)

Per your comments, you are using "mu" to denote "micro", as in one millionth of some scientific unit. Given this situation, you need to get out of the business of attempting to ...
Mico's user avatar
  • 479k
28 votes

LaTex Error: Environment equation* undefined

Adding \usepackage{amsmath} to the preamble solved the problem.
ChiChou Huang's user avatar
28 votes
Accepted

How to center a multiline equation?

Use a gathered environment inside the equation environment: \documentclass{article} \usepackage{amsmath} % for "gathered" env. \begin{document} \begin{equation}\label{eq1} \begin{gathered}...
Mico's user avatar
  • 479k
28 votes

How to write equation as shown in picture using Latex?

With a few shortcut macros it's much easier: plain TeX version: \let~\catcode~`86~`j0~`X13~`C1~`D2~`M3jdefX81C~`8113jdefDXZZ81C~ `8113DXYY81CZ81jletDYLLjletYFFjfiYNNjdefYPPjpartialZIZAZBZj{Zj}Y ...
Phelype Oleinik's user avatar
26 votes

Boxed equation with number

With tcolorbox help it's possible to include equation numbers in framed environments. It provides options ams equation, ams gather, ams align and corresponding starred versions. It's also possible to ...
Ignasi's user avatar
  • 134k
26 votes
Accepted

System of equations

A solution using the cases environment: \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{cases} k_{i\omega}/k_{p\omega}=2\pi\times 10\\ \left\...
Skillmon's user avatar
  • 54k
25 votes

How do I add \begin{definition} … \end{definition}?

Just define it using \newtheorem like you have done for environment theorem: \documentclass{article} \usepackage{amsthm} \newtheorem{definition}{Definition} \begin{document} \begin{definition} This ...
Schweinebacke's user avatar
24 votes

Is it possible to pagebreak aligned equations?

Just add the \allowdisplaybreaks command from the amsmath package to the preamble of your document. Works only with the math environments provided by this package. So you can use align.
Vassilis Chasiotis's user avatar
24 votes

How to handle long equation in LaTeX?

I suggest you embed a split environment (provided by the amsmath package) inside an equation environment. Aside: Don't overuse { and } in math mode, and don't overuse auto-sizing of round ...
Mico's user avatar
  • 479k
24 votes
Accepted

Unicode error in inputenc package

Unicode U+2212 is MINUS SIGN, which is not set up by default with inputenc. Just add \DeclareUnicodeCharacter{2212}{-} to your preamble, just before \begin{document}. \documentclass[pt]{beamer} \...
egreg's user avatar
  • 1.1m
24 votes
Accepted

How to fit a large equation that goes out of the page?

Mathematical symbols where created to represent the meaning of longer descriptive words in a short form for easy inclusion in complex formulas with possible repetition. I would choose a suitable ...
AboAmmar's user avatar
  • 45.9k
23 votes

Resizebox within equation environment

The parameter for \resizebox is in text mode. Thus you need to explicitly go into math mode: Code: \documentclass[12pt]{article} \usepackage{graphicx} \begin{document} \begin{equation}\label{...
Peter Grill's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible