{equations} is about the various environments to typeset displaystyle mathematics, e.g. equation and {align}. For general questions about mathematical typesetting use {math-mode}. Both tags are possible on the same question.

learn more… | top users | synonyms (1)

230
votes
8answers
18k views

Why is \[ … \] preferable to $$ … $$?

I've heard that you should use \[ ... \] for displayed equations instead of $$ ... $$, but why is that? I'd assumed that it's so that you can more easily tell which are starting and which are ending ...
124
votes
1answer
3k views

Making equations copyable in pdf

I would like to write a .pdf, where my readers could copy the rendered formulae and paste them directly in their TeX documents. And the copied text would automatically be: \int x\sin ...
79
votes
5answers
87k views

eqnarray vs align

I want to include a list of related equations, say, for a proof, in my LaTeX document. As far as I know, I have two good options, eqnarray and align. What is the difference between them, and how do I ...
65
votes
4answers
117k views

How can I split an equation over two lines

I am having the following equation: \begin{equation} Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} ...
59
votes
4answers
124k views

How to break a long equation?

I have a long equation but long enough to occupy two lines. I want to break it to improve readability. How can I break it? \begin{equation} F = \{F_{x} \in F_{c} : (|S| > |C|) \cap (minPixels ...
55
votes
2answers
10k views

Two letter variable names

In math mode, TeX assumes "hidden multiplication" (so that two variable names put nearby have invisible multiplication between), so that, AFAICT, expressions like $ABC$ are rendered with small ...
47
votes
4answers
8k views

What are the differences between $$, \[, align, equation and displaymath?

I once learnt, that it is uncool to use $$, but why is that? Why does \[ not act as a abbreviation to \begin{align}? I noticed, that there is a difference, since one cannot use & and \\ inside a ...
47
votes
2answers
3k views

How do I number equations only if they are referred to in the text?

I have a paper where all equations are numbered, but I want to number equations only if they are actually referred to in the .tex file using \ref{}. How can I make that happen? Alternatively, how can ...
42
votes
2answers
35k views

How to write conditional equations with one-sided curly brackets

I want to write a conditional expression such as the following. What is the best way to express such conditional expressions in Latex?
41
votes
4answers
6k views

align vs equation

I always use align in my documents, and avoid equation. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?
41
votes
1answer
5k views

Breaking equations with breqn

I am new to using the breqn package. It looks good, but I get an odd behaviour when an equation can almost fit in the page but not quite: the alignment gets completely wrong. Is there a way to fix ...
39
votes
3answers
15k views

How to get only one vertically centered equation number in align environment with two equations

sorry if this has been answered before, I couldn't find anything through search. I'm sure its a common problem though. What I have are two equations with align and I want one single equation number ...
38
votes
3answers
2k views

Which command should I use for displayed equations?

A number of related questions have already been asked about this issue: align vs equation which is preferable to what to do with this hyperref note on amsmath and even eqnarray vs align But I'm ...
37
votes
2answers
13k views

Separate long math text under sum symbol into different lines?

I have the following equation, where there is a lot of stuff under the sum symbol: \begin{equation} d(\vec{x},\vec{y})= \sum_{Z_{xy}\in\vec{Z}_{xy},\forall x\in\vec{x},\forall y\in\vec{y}} ...
37
votes
3answers
26k views

align* but show one equation number at the end

I am using align*, but I still need an equation number. I know one solution is to use align and add \nonumber to all lines but the last. Is there a 'lazy' way to do it? I searched a little and found ...
36
votes
4answers
59k views

How can I change the font size in math equations?

I find that whenever I'm typing some equations into a document, and the equation gets a bit complex (let's say a fraction in a parentheses, squared, inside a square root, inside a fraction), the ...
35
votes
11answers
5k views

Embedding LaTeX equations into a webpage

I'd like to include some basic math equations into a webpage. Is there an easy way of either compiling the LaTeX into an image which I can upload, or else of having the browser parse the code?
35
votes
5answers
2k views

How to write a perfect equation parameters description?

A symbols or parameters description is shown below, however, the = and the details of parameter are not aligned. I want to make a parameters list for a equation like this, in which symbols, = and ...
34
votes
3answers
32k views

Label equation with a symbol

I would like to label an equation with an arbitrary symbol, rather than a number, or letter. Is this possible?
33
votes
4answers
9k views

How can I get rid of indentation after an equation?

I'm a total newbie to LaTeX and I get very annoyed about this. Every time I write an equation, the text following the equation has some indentation but I don't want it to be there! Look at the ...
33
votes
5answers
4k views

How can I get an underbrace and an overbrace to partially overlap in an equation?

Sometimes I want to describe portions of an equation using \underbrace and \overbrace in such a way that the portions are not completely distinct, for example: /-------\ x = A + B + C + D + E ...
32
votes
5answers
2k views

LaTeX accessibility

Does anyone know of any LaTeX modules that makes the pdf output generated by pdflatex Americans with Disabilities Act of 1990 (ADA)/Section 508 compliant? Specifics: With regard to math. One simple ...
30
votes
2answers
836 views

Equation connected by lines

I have written a code that defines a new environment in which aligned equation are connected by lines as in the image: I think it is useful when, inside the align environment, there is the need of ...
29
votes
3answers
6k views

Centering \vdots in a system of many equations

I have a system of equations with an arbitrary number of equations (k). I'd like to use \vdots to compactly describe the system, like so: \begin{align*} R(-1) &= \sum_{i=1}^m A(i)R(i-1) \\ ...
28
votes
5answers
92k views

How do I turn off equation auto numbering

I have an equation like this: \begin{align} P(A \cup B) = \sum_{\omega \in A \cup B} P(\omega) = \sum_{\omega \in A} P(\omega) + \sum_{\omega \in B} P(\omega) = P(A) + P(B) ...
28
votes
6answers
3k views

How to make an equation more compact?

I have an equation that wastes a lot of space around the union symbol: \documentclass{article} \usepackage[cmex10]{amsmath} \usepackage{amssymb} \begin{document} \begin{equation} RA_U \left ( new ...
27
votes
3answers
88k views

How do you center equations?

I can't seem to center equations without causing some weird formatting problem. The following results in the R being dropped: \begin{center} E(R_{i,t})=E(\alpha_i)+E(\beta_{i,F_1 } ...
27
votes
1answer
13k views

Is it possible to pagebreak aligned equations?

The report I'm writting features a lot of long, multiple lines equations. To reduce visual polution I've been using an aligned environment nested inside equation. This way (unlike just using an align ...
26
votes
6answers
2k views

For formal articles, should a displayed equation be followed by a punctuation to conform to the language grammar ?

For formal articles, should a displayed equation be followed by a punctuation to conform to the language grammar ? For example: The most well-known physics formula is \[E=mc^2.\] %should I put ...
25
votes
10answers
1k views

Best typesetting of formula

Consider the following example. \documentclass{article} \usepackage{amsmath} \newcommand*\mathsetfont{\mathbf} \newcommand*\DeclareMathSet[1]{% \expandafter\newcommand\csname ...
25
votes
3answers
971 views

How to avoid widow lines after displayed equations

If a displayed equation is close to the bottom of the page, TeX likes to insert a page break even if the current paragraph contains only one more line after the equation, as e.g. in ... it follows ...
24
votes
6answers
1k views

Is there a way to format the equation like this?

My friend is taking pre-calculus class, and I would like to create some notes for him. Is there a way I can do the following in latex? Right now I only have the very basic down. I want to make it ...
23
votes
5answers
3k views

Multicol layout for systems of (linear) equations

How can a similar arrangement be archived (with ams*, aligned, multicol, etc) 1.2.3 Solve the following system of equations: a) x - 2y - 4z = 1 b) -23x + 43y = 22 3x - ...
23
votes
2answers
2k views

Getting a tikz picture to have an equation number

I make a lot of commutative diagrams and am trying to switch to Tikz from amcd,diagrams, etc. I often have to refer to these diagrams in the text and would rather have them as equations (i.e. with and ...
23
votes
1answer
5k views

Flexible equation, align, multline environment

I'm looking for a command (say \foo{}) or pair of commands (say \foos, \fooe) that behave like: equation environment if there is no \\ nor & multline if there is a single \\ align if there are ...
22
votes
3answers
33k views

Show equation number only once in align environment

I want the equation number to be shown only at the last line, or better, somewhere in the middle of all. So instead of (1), (2), ... only (1). I use \begin{align} ... \end{align}
22
votes
4answers
3k views

Sharing alignment between equations in two different items

In the following minimal example, I have two equations inside an itemize environment, with an item per equations. Each equation is defined in its own equation environment. \documentclass{article} ...
22
votes
1answer
307 views

Does \\ in the last line of an array have any effect?

Consider the following example: \begin{array}{l} line 1 \\ line 2 \\ \end{array} Is the \\ in the last line completely optional or are there circumstances under which it has any effect?
22
votes
1answer
420 views

Unicode in the equations: pros and cons

Is there any pros and cons for using of Unicode (and vice versa) in LaTeX equations? Consider two examples: \lim_{h→0}∫_{x_0}^{x_0 + h}\frac{f(t)}{h} = f(x_0) x_0 ⇔ ∀ 𝜀 > 0, ∃ 𝛿 > ...
22
votes
2answers
3k views

Table of Equations

I've looked around for this, and haven't been able to find a satisfactory answer; How would one go about producing (automatically) a table of equations, just a numbered list of used equations, ...
21
votes
1answer
29k views

Symbol for Gaussian distribution

What is the symbol for the normal density function in LaTeX?
21
votes
3answers
25k views

Adding letters to equation numbers

I want to number use a equation and add a letter to the equation number such as: f(x) =a x and g(x) = b x (3.1.1a,b) That is e.g. using \begin{equation} ... \label{eq} ...
21
votes
2answers
40k views

Attractive Boxed Equations

I often used \boxed{...} from the AMS math package to place a box around important equations. However, this approach often produces somewhat awkward looking output. Consider \documentclass{article} ...
21
votes
2answers
3k views

Should one use thousands separators in equations?

I understand that this is not strictly a TeX question but I have recently been asked to correct an equation presented as the first example in the image below to that of the second example i.e., to use ...
20
votes
2answers
2k views

Typesetting Right-to-Left math

UPDATE: I've managed to produce something that is aesthetically correct, however with a lot of "hardcoding" and trial and error to manually measure my spaces. Not to mention that I have to write my ...
20
votes
2answers
5k views

Is there a difference between the `displaymath` and `equation*` environments?

The amsmath documentation says Basic LaTeX doesn’t provide an equation* environment, but rather a functionally equivalent environment named displaymath. Are they really the same or is there a ...
20
votes
1answer
768 views

Highlight equations in a typographically correct manner

I am presenting a model composed of a dozens of equations, some of them requiring a somewhat lengthy derivation. The equation that continue the actual model appears progressively along the derivation ...
19
votes
10answers
2k views

What useful web services are out there?

Looking at this question, I wonder what good and useful web services are out there. For example the LaTeX symbol classifier looks interesting. You can draw a symbol with your mouse and get back the ...
19
votes
4answers
7k views

Making a new environment combining equation and split

I'm trying to define a new environment that consists of a split environment inside an equation environment. But I'm getting an error. Here's what I'm doing: \documentclass[a4paper,12pt]{article} ...
19
votes
4answers
3k views

How to break a long expression in the denominator of a fraction?

I used the split command to break my equation but I receive the error: ! Missing } inserted. <inserted text> } l. \end {split} The code in .tex file is as follows: ...