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

learn more… | top users | synonyms

15
votes
1answer
5k views

Why does amsmath print a warning about a foreign command?

I was wondering what was the cause of the following warning message with the specific \usepackage used below: Using the following: Preamble \documentclass[amssymb,twocolumn,aps]{revtex4} ...
15
votes
2answers
243 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
4answers
944 views

Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used

The problem I'm writing a document where all of my equations are labeled, not by numbers, but by names, which I provide with amsmath's \tag command. I also use cleveref for ease of ...
15
votes
1answer
615 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
7answers
1k views

Aligning polynomial terms

In LaTeX align, I'm struggling to align polynomial terms and assume there's an easy way to do it. But I cannot find the simple/elegant solution. What I would like is something like this: x1 + x2 ...
14
votes
5answers
2k 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
3answers
579 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
4answers
4k views

Intertext vertical spacing

How do I reduce the vertical spacing of \intertext?
14
votes
4answers
7k views

Diagonal dots spanning multiple lines/columns of a matrix

I'm filling in large sparse matrices, for example \begin{bmatrix} 0 & -2 & 1 & & -1 & 2 \\ 2 & \ddots & \ddots & \ddots & & -1 \\ ...
14
votes
2answers
1k 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
17k 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 ...
14
votes
3answers
6k views

Aligning across 'aligned' equation blocks

I'd like to format two groups of equations such that all their equal signs line up and such that I can put a big brace to the right of each block to annotate that block. The last part is easily ...
14
votes
2answers
2k views

Multiset notation in LaTeX

Does anyone know how to make (nice looking) double bracket multiset notation in LaTeX. i.e something like (\binom{n}{k}) where there are two outer brackets instead of 1 as in binomial? You can see an ...
14
votes
1answer
239 views

align* environment left-aligned with LuaTeX and RTL math direction

When using LuaLaTeX, with the math direction set right-to-left, the contents of an align* environment is left-aligned instead of centered. Why does this happens? How can I fix it? ...
13
votes
3answers
1k views

mathop shifts the baseline, DeclareMathOperator doesn't

Here is a little example that illustrates this strange behaviour: \documentclass{article} \usepackage{amsmath} \DeclareMathOperator\foo{\mathbf{l}} \begin{document} ...
13
votes
2answers
481 views

Breaking a theorem between pages

I currently have this custom myexample theorem environment that is working absolutely great. \newtheoremstyle{myexamplestyle}{}{}{}{}{\bfseries}{.}{ }{} ...
13
votes
2answers
3k views

Split-like environment inside cases environment

I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this: \begin{cases} \begin{split} long expression \\ second line of long expression ...
13
votes
3answers
374 views

Force latex to show a square matrix as square

How can i force latex to print out square matrix as a square matrix with equal width and height in math-mode? I also read amsmath documentation, but don't found any useful help on it. For example ...
13
votes
2answers
498 views

Long Dashed Right Arrow

Is there a \dashrightarrow equivalent of: \xrightarrow{\hspace*{4mm}} or \longrightarrow or a similar way to fudge it?
13
votes
1answer
378 views

Correct usage of \ifmmode

Seems that there is some subtlety in using \ifmmode that I am not aware of. For some reason, using: \newcommand{\hlcodeA}[1]{\ifmmode\else\small\fi\texttt{\hilight{#1}}}% is not quite identical ...
12
votes
4answers
863 views

Printing labels along with equation numbers

Working with documents with huge amount of equations it becomes cumbersome to go back and remind yourself what you labeled a certain equation to (I try to name them in a smart way, but there are too ...
12
votes
3answers
545 views

Multiple letters without spacing in Math [duplicate]

Is there something I can add to the preamble of my document such that multiple letters without spacing in a Math environment (such as $NP$) do not have extra spacing between them and are not ...
12
votes
4answers
457 views

How do I get this strange alignment?

I would like to get a nonstandard alignment in the following code: \begin{align} \text{First left hand side} & = \text{First right hand side} \\ \text{Second left hand side} & = ...
12
votes
3answers
6k views

How to increase the spacing between equations in “gather”?

Is there a way to consistently increase the vertical spacing between equation lines in a gather (or gather*) environment from amsmath? Specifically, I want to produce something like \begin{gather*} ...
12
votes
2answers
487 views

Inconsistent behavior of boxes in amsmath's `gather`.

Recently I was working on a package (ytableau) and had a strange experience with the gather environment in amsmath. Namely, it screws with \vtop and, seemingly, with boxes that I reserve before ...
12
votes
2answers
2k views

vertical dotted line in column vector / amsmath matrix

I would like to typeset the following set of equations: ... but with contiguous, vertical dotted lines in the column vectors, such that the top and bottom rows of the matrix and of the vectors are ...
12
votes
2answers
182 views

Input manually a number into \eqref

Often while writing papers I find the need to cite particular equations from other papers. For example, the landmark paper by Einstein, Newton, and White (2015) lays out the theory of everything in ...
12
votes
1answer
184 views

Why is the \underbrace off the line?

I have the following problem with \underbrace: As you can see, the third underbrace and its comment are not in the line with the first two. Here is my code: \documentclass[a4paper,12pt]{article} ...
12
votes
1answer
502 views

Lost labels using intertext with varioref and hyperref

I have a problem using \intertext together with \vref when hyperref is also used. Consider the following minimal example: \documentclass{article} \usepackage{amsmath, varioref} ...
12
votes
1answer
293 views

Align to center

I want to align some equations to the equal signs, so I wrote this: \begin{align} -3z &=-9\\ z &= 3\\ -3y-3*3 &= 3\\ y &=-4\\ ...
12
votes
1answer
3k views

AMS align / Align multiple “=”, too much space

I asked this question at stackoverflow and have been kindly redirected here. I'd like to align some equations in Latex using the AMS packages. Each equation has two equal signs that need to be ...
12
votes
3answers
342 views

Displaymath environment that can align equations and squeezes math

I have a long equation to align. Without squeezing the math, it is just barely longer than \textwidth. However, the align environment doesn't squeeze the math at all, which results in a badbox. ...
11
votes
4answers
1k views

'Nudging' overset characters downwards

I am trying to make a vector-like symbol to use in a paper I'm writing. I am actually able to make almost exactly what I want in Mathematica, in which it looks like this: In TeX I am using ...
11
votes
2answers
541 views

How can I add clips above matrix?

\documentclass{mwrep} \usepackage{kbordermatrix} \usepackage{amsmath} \begin{document} \begin{equation} \bar{P}= \kbordermatrix{ \mathrm{state} & 1 & 2 & 4 & 3 & 6 & ...
11
votes
3answers
6k views

Define pretty sets in LaTeX; esp., how to do the condition-separator?

E.g., I have this set: \{ \alpha \in \Sigma^\omega | \exists^\omega n : \alpha [0,n] \notin \Sigma^* a_1 \Sigma^* a_2 \dotsb a_n \Sigma^* \} Here, I use | as the separator for the condition part. ...
11
votes
2answers
234 views

Manually controlled size of delimiters in macros

I am using the amsmath package and I'd like to control the size of my delimiters manually, i.e. using the \bigl, \Bigl, ... , \Bigr, \bigr commands, instead of \left, \middle, \right. Now I want to ...
11
votes
4answers
181 views

Aligning the long equations

I have read all of the different solutions for fitting long formulas in a page, yet I am still not satisfied with the output I get. The formulas are right aligned which does not look good. Would you ...
11
votes
2answers
4k views

Difference between (split, align) and (gather, aligned)?

Here is an MWE which shows that they seem to do the same thing. Is there any reason to prefer one over the other for typesetting groups of equations? I would prefer the align syntax because it allows ...
11
votes
2answers
2k views

inserting sentences between subequations

My apologies for asking so many questions here. I want to introduce a sentence in between 2 subequations which is not in math mode. Here is the code that I am using: ...
11
votes
2answers
408 views

$\VDash$ Symbol in AMS math packages?

I'm trying to typeset some homework that deals with set theory and in particular I'm trying to write the "model-theoretic" notion of forcing. I put model-theoretic in quotes because I don't know the ...
11
votes
2answers
1k views

Equations inside enumerate aligned on item's number

If I type \begin{enumerate} \item \begin{align*} eqn 1 eqn 2 \end{align*} \end{enumerate} the label will appear on the first lines and the equations will ...
11
votes
4answers
382 views

Curved arrow describing a step in a mathematical derivation

Is it possible to achieve something like this in LaTeX? I want a curved arrrow pointing from 1st line to the other line and is coupled with an equation number which indicates the equation used. I ...
11
votes
1answer
784 views

stmaryrd and boldsymbol: avoid warnings

Here are two examples: 1 \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \begin{document} $\boldsymbol x$ \end{document} 2 \documentclass[a4paper,10pt]{article} ...
11
votes
2answers
195 views

How do I make “gather” object, place its self in the text, the same way as an equation object?

Assuming the amsmath package is installed. I found a difference between the way that an equation object and a gather object is embedded within the text. If an equation is beneath a line of text that ...
11
votes
2answers
239 views

Equation number enclosing parentheses misplaced with Polyglossia+Hebrew+amsmath

I am compiling the following MWE using XeLatex within TeXnicCenter and get a garbled equation number: \documentclass{article} \usepackage{amsmath} \usepackage{polyglossia} \setmainlanguage{hebrew} ...
11
votes
1answer
460 views

showonlyrefs and cleveref

This question led to a new package: autonum I know that cleveref is not compatible with showonlyrefs as it says in the cleveref manual. But I have a book-length document that depends on ...
11
votes
1answer
236 views

Compatibility between amsmath and exscale

Both the amsmath package and the exscale package define the delimiter macros \big, \Big, \bigg and \Bigg based on the internal macro \bBigg@. However, as the following minimal example reveals the ...
11
votes
2answers
534 views

How to do grid typesetting with amsmath?

Following the advice in the answer to this question, I did set a huge negative \lineskiplimit. However, it turned out that align got quite upset about this. So my question is: what would you ...
10
votes
4answers
219 views

How to vertically align each comma in the following 2 identical sequences?

The following output seems to be difficult to look up an item in the upper sequence with its corresponding item in the lower sequence as the commas are not vertically aligned. ...
10
votes
2answers
6k views

Normal subgroups

To typeset that H is a normal subgroup of G, I would use H\unlhd G. However, the result doesn't satisfy myself, since the G seems too close to the triangle: Adding a space \ makes "too much ...