{amsmath} is a package provided by AMS that enhances LaTeX's mathematical typesetting capabilities in various ways.

learn more… | top users | synonyms

54
votes
3answers
16k views

What's the difference between \mathrm and \operatorname?

I apparently can't see the difference in a compilation (pdflatex) between \mathrm and \operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what ...
51
votes
4answers
6k views

Is there a preference of when to use \text and \mathrm?

I'm unsure of when it is preferable to use \text versus \mathrm, is there some unwritten rule about the use of these? For example, I saw the following code in a math post: ...
38
votes
2answers
5k views

What does each AMS package do?

In my view, any document with a substantial amount of mathematics should load the packages from AMS-TeX. Hence, most of my document's preambles contain \usepackage{amsmath, amsthm, amssymb, amsfonts} ...
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 ...
38
votes
2answers
597 views

Why is there a \, space at the beginning of the “aligned” environment?

Near the beginning of the definition of the amsmath environments aligned and gathered (and also mathtools' multlined) there's an explicit thin space \,. This often has to be cancelled with \!, as ...
38
votes
4answers
4k 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?
34
votes
6answers
9k views

How can I write multiple lines in a subscript?

Is there a way to force a line break inside a math mode text? My example: \[ \underbrace{....}_\text{Some long text that should be multiline} \] Trying \text{Some long text that\\ should be ...
33
votes
3answers
5k 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 ...
30
votes
5answers
11k views

A MiKTeX update removed amsmath as obsolete – can I use another package or get it back?

I have a problem with amsmath package. After an update this package was removed because it was obsolete. But what package can use instead of amsmath?
30
votes
2answers
33k views

How can I get text underneath an underbrace?

I am looking to do something of the following: To get text underneath the underbrace. Is it involving \stackrel or some sort of similar command?
30
votes
2answers
791 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
14k 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 ...
27
votes
3answers
1k views

How are big operators defined?

I would like to create a new "big operator", by which I mean something like the Σ character used for summations. I know about the \DeclareMathOperator* command, which creates an operator whose ...
27
votes
1answer
11k views

Vertical Spacing within align environment accounting for fractions

The default vertical spacing within an align environment seems very tight when there are fractions in the lines. I am aware of three manual tweaks that can be applied: Adjust the value \jot. ...
25
votes
3answers
4k 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) \\ ...
25
votes
4answers
1k views

Why do arguments to nested \tilde or \breve commands reappear when amsmath is used?

On LaTeX-Community.org I've noticed a strange problem with nested \tilde and \breve commands, when amsmath is used. In this code the X appears also in the output of the second and the third formula: ...
24
votes
4answers
3k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ ...
24
votes
1answer
310 views

Please explain a strange interaction between bytefield, unicode-math, and mathtools

bytefield gives me different results when used in association with mathtools and unicode-math when used together. Here's my 'good' MWE: % !TEX TS-program = XeLaTeX \documentclass[a4paper]{article} ...
23
votes
6answers
20k views

Mathematical symbol for disjoint set union

In our lecture script, we use the notion of disjoint set union. It uses a special symbol to differentiate the disjoint from the usual set union, where we add an extra dot inside of the \cup symbol. Is ...
21
votes
1answer
4k views

Problem with qedhere

In a paper I'm writing, I end a proof with a displayed equation that has some cases in it. The relevant code looks something like the following: \[f(x) = \begin{cases} 2x & \text{if $x<0$}\\ ...
20
votes
5answers
2k views

Huge matrix in my document. Possible ways to make it look better?

The following is the source for a matrix I'm using in my document: \documentclass{scrartcl} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{amsmath} ...
20
votes
4answers
846 views

How can I break an align environment for a paragraph?

I would like to have two displayed equations, broken by a short paragraph, but with aligned equal signs (as if using the align environment). Is there some way to "break" the align environment ...
20
votes
3answers
9k views

Dot Derivative Discrepancy

I am trying to typeset some higher-order time derivatives using the dot notation, and I've noticed something strange. The expressions $\dot y + y = \cos(\dot y)$ $\ddot y + y = \cos(\dot y)$ give ...
20
votes
2answers
4k 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 ...
19
votes
4answers
2k 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: ...
19
votes
2answers
3k views

\boxed{}, TikZ and colored equation background

I wonder if someone could provide me with a simple MWE for using TikZ together with \boxed to produce a colored equation background. If possible with rounded corners. I am using \boxed{} inside the ...
18
votes
4answers
908 views

What to do with this hyperref note on amsmath?

http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/ has this note copied below: amsmath ------------- The environments equation and eqnarray are not supported too well. For ...
18
votes
1answer
1k views

Changing the apperance of equation numbers with amsmath

For equations in my document, I use the facilities of the amsmath package. In order to make the equation numbers more eye-catching, I want them to be in boldface and a little bit indented to the ...
17
votes
3answers
1k views

Add equation name underneath equation number

I am wondering if it is possible (and if so how) to add names to equations just underneath the equation number. I am just using the standard equation environment to display the equation centered in ...
17
votes
1answer
3k views

mathtools vs amsmath

I read on http://en.wikibooks.org/wiki/LaTeX/Mathematics: The mathtools package fixes some amsmath quirks and adds some useful settings, symbols, and environments to amsmath. It sounds like ...
16
votes
2answers
751 views

Difference of the \dots*

I came to wonder, what is the difference between the following? \dotsc \dotso As well as between: \dotsb \dotsi \dotsm
16
votes
3answers
3k views

\DeclareMathOperator won't take arguments

I'd like to define a family of math operators that have the same superscript, but different subscripts. My first attempt was: \DeclareMathOperator{\Upd}[1]{U^M_{#1}} But the log tells me that: l.3 ...
16
votes
3answers
2k views

How do magic \dots work in amsmath?

The amsmath package redefines the \dots command so that it "guesses" the correct height of the dots with respect to its context. For example $x, \dots, y$ will produce three lowered dots, aligned ...
16
votes
1answer
4k views

\varnothing 'undefined control sequence'

I am using amsmath and all of my math symbols are appearing using $ $ block but \varnothing is undefined. \emptyset works but its symbol is a bit different than \varnothing Note: images taken from ...
15
votes
3answers
397 views

Typesetting the square of a mathematical operator

Assume I want to typeset the square of some mathematical operator A. Using \operatorname (amsmath package), there are basically two ways to do that: \(\operatorname{A^{2}}\) (i.e., the exponent is ...
15
votes
3answers
798 views

Guidelines for typesetting fractions

I realize that this question is to some extent subjective. However, I suspect that there are some common standards regarding how fractions ought to be typeset in mathematics. The guide Mathematical ...
15
votes
3answers
2k views

Separate labels in cases

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package). Ideally, I would like to be able to write something like ...
15
votes
2answers
3k views

How do I do a one-shot MathOperator?

The amsmath packages helpfully define a macro \DeclareMathOperator which does what it says on the tin: it declares a mathematical operator such as \sin or \Null or whatever and typesets it all nice ...
15
votes
2answers
341 views

How to remove an unwanted white space at the last end of a horizontal curly brace?

You can see there is an unwanted white space at the last term below. \documentclass[border=12pt]{standalone} \usepackage{amsmath} \begin{document} $ ...
15
votes
4answers
393 views

Conflict: onlyamsmath and TikZ

To force myself and collaborators to only use AMS-Math commands, I laod this package in the preamble: \usepackage[all,warning]{onlyamsmath} However, when this is combined with TikZ, I get into ...
15
votes
1answer
6k views

About big parenthesis larger than Bigg

Do any one know how to type a very big parenthesis in LaTeX. Since the formula is very big, I used multline environment, in one line, there are many pair of parenthesis by using \left and \right which ...
15
votes
2answers
213 views

Strange behaviour of binomial coefficient's delimiters

While writing down my Combinatorics exercises I found that the binomial coefficient's delimiters weren't displayed as indicated inside the amsmath documentation. By subsequent trials and errors I was ...
15
votes
1answer
417 views

Why is \global\let not always global?

As an LaTeX environment opens a local group, it is normally necessary to use a global definition if changes in the environment should be available after the environment: \documentclass{minimal} ...
15
votes
1answer
579 views

How does this macro for augmented matrices work?

I've used this code I found somewhere to typeset literally hundreds of augmented matrices, and it's been amazing: \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{arydshln} ...
14
votes
5answers
1k views

Typesetting math: an optimisation problem (cost & constraints)

I really struggle to align a system of equation for an optimisation problem. It was all ok at the beginning until I started adding the constraint. I've got this code so far: \documentclass{article} ...
14
votes
4answers
1k views

Underbrace under sqrt content

I am trying to use underbrace to clarify the arguments to a sqrt. However this causes the square root sign to reach all the way down to the bottom of the text under the brace(s), which is not what I ...
14
votes
3answers
515 views

Create \eqref* (\eqref without link, i.e. starred eqref)

I want to create a command \eqref*, which is the same like \eqref, but without a clickable link. There are similar commands for \ref (\ref*) and \autoref (\autoref*) which achieve this behaviour, but ...
14
votes
2answers
2k views

Extendible equals sign

I have a command that has been floating around in my standard preamble for a while: \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:} It is meant to mimic the AMS-LaTeX extendible ...
14
votes
2answers
953 views

What is the mandatory argument of alignedat for?

alignedat has a mandatory argument. But Herbert (in his mathmode.pdf) wrote as follows, I have made a trial and error, I noticed that the largest number that can be passed is 1073741823 and no ...
14
votes
1answer
16k views

Text over/under implies arrow?

I'm currently trying to write over/under an implies arrow in LaTeX (in math mode): \implies_{text} This places the text lower, but next to the arrow, not below it. How can I get it below the ...