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

learn more… | top users | synonyms

7
votes
2answers
339 views

Workaround for align without using amsmath

I'm preparing a manuscript for a journal that demands a style file (copernicus2.cls) that's not compatible with amsmath. I want to display some aligned equations, but the lack of amsmath means I can't ...
7
votes
3answers
6k views

AMS Split inside AMS Align

I'd like to have multiple lines inside a single align cell like so: \begin{alignat*}{1} = & \begin{split}x+\\ y\end{split} \end{alignat*} But I get an error like: \end{alignat*} \An extra ...
7
votes
2answers
137 views

How to put \dots in front equation numbers in amsmath

By default the style is \renewcommand{\theequation}{\thechapter.\arabic{equation}} for example x+y =4 (2.1) How to put \dots in front equation numbering such as ...
7
votes
1answer
195 views

\ifmmode self-contradictory in amsmath (OK in just LaTeX)

File: \documentclass[11pt]{article} \usepackage{amsmath} \newcommand{\argghhh}{\relax\ifmmode\bar\else\expandafter\=\fi} \begin{document} $ \argghhh a $ \end{document} produces error (but ...
7
votes
3answers
565 views

A vertically centered equation number on a multline environment

The multline environment does exactly what I want in splitting a long formula between lines by utilizing the horizontal space to the fullest. (I don't want the alignment features of the align ...
7
votes
3answers
2k views

Tagging under an equation using underbrace

I would like to tag two parts of a huge equation using underbraces (and call them, say term A and term B). Later in the text, I want to talk about term A and term B. Is there a way to tag and label ...
7
votes
2answers
252 views

How to stop fractions in display equations from running into each other?

Is there some standard way to create multiple display equations like the following without having to use: \renewcommand*{\arraystretch}{2} (so that the two rows in the second equation don't get ...
7
votes
2answers
908 views

multline inside gather?

I have 3 related equations, two of them do not fit on a single line. I want to present them in a gather-environment, but how to do linebreaks inside equations? multline does not work inside gather. ...
7
votes
1answer
137 views

Why do math operators not behave like normal control sequences?

From my experience, most control sequences function as an implicit group, for example g^\textrm{th}. However, if we look at the example below, the first line throws an error while the second line ...
7
votes
3answers
253 views

amsmath - bidi - siunitx possible bug?

MWE: \documentclass{article} \usepackage[english]{babel} \usepackage{fontspec} \usepackage[detect-all]{siunitx} \usepackage{amsmath} \usepackage[math-style=ISO,bold-style=ISO]{unicode-math} ...
7
votes
1answer
208 views

Breaking lines in equations

I had an equation that was too long. It got cut off, so I modified it with the split environment inside an equation environment: \begin{equation} \begin{split} & I_{ribbon} = \frac{1}{2} M(a^2 ...
7
votes
1answer
731 views

Conflict: kluwer and amsmath

When I try to use the document class kluwer together with amsmath there seems to be a conflict. Is is possible to avoid this conflict? I have tried to add \let\iint\noexists before loading amsmath as ...
7
votes
2answers
162 views

Is gather* equivalent to displaymath?

Is gather* with one line of math equivalent to displaymath?
7
votes
1answer
546 views

alignment problem

I have the following: \documentclass{article} \usepackage{nicefrac} \usepackage{amsmath,amssymb} \begin{document} \begin{align*} f_X(x)&=\frac{1}{2 \pi} \exp ( -x^2/2 ) &\forall x \in ...
7
votes
1answer
108 views

Left aligning equations without align character

I realise that this has been asked many times before, but no answers I've found seem to provide a solution to my question. I'd like to left align all text in an align block, in: ...
7
votes
1answer
109 views

Ignoring specific ampersand formatting on a specific line of an align block

I want to typeset a number of equations with some alignment constraints, but I want to partially ignore them on certain lines. An example formatted text might look like the following when it's ...
7
votes
2answers
144 views

How to align terms in separate lines in this case?

I want to get another variant for the alignment points in my question answered by Hendrik Vogt, see How to construct a long equation that is split in LHS and RHS to occupy a narrow column?. ...
7
votes
2answers
512 views

Is it possible to typeset text inside math without amsmath?

Is it possible to typeset text properly inside math without amsmath? Typically I typeset short text using mathrm, or text (amsmath) within equation: $M_\mathrm{effective mass}$ $M_\text{effective ...
7
votes
2answers
1k views

QED symbol in a custom theorem environment

I have created my own theorem environment like this \newtheoremstyle{mythmstyle}{}{}{}{}{\scshape}{.}{ }{} \theoremstyle{mythmstyle} \newtheorem{mythm}{Theorem} How do I add the QED symbol (the ...
7
votes
1answer
152 views

How to remove the unwanted space on the left side of the following gather*?

\documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{gather*} 6x^2-30x+36=0\\ 6(x^2-5x+6)=0\\ 6(x-2)(x-3)=0\\ x-2=0 \quad ...
7
votes
1answer
127 views

(Nonfatal but Symptomatic) Conflict of amsmath and mathstyle Packages

This was brought to my attention by our colleague, Lover of Structure, but since it affects my scalerel package (which began using the mathstyle package to detect the current math style, as of version ...
7
votes
1answer
625 views

Styling definitions

In the current paper I am writing I make an extensive use of definitions, therefore I've added the amsthm package to my document and I've defined a new command: \newtheorem{definition}{Definition} ...
7
votes
1answer
808 views

operator name for kernel

I'm trying to define \newcommand{\ker}{\operatorname{ker}} just after \begin{document} in order to have a nice way to write the kernel of an application but the command is ignored and I don't know why ...
7
votes
2answers
620 views

\providecommand equivalent of \DeclareMathOperator: \ProvideMathOperator?

What is the \providecommand equivalent of \DeclareMathOperator? I.e. as \providecommand is to \newcommand a method for defining new commands if and only if they have not already been defined? ...
7
votes
1answer
91 views

Is it necessary to give a \\ before \intertext?

I am not sure which one is correct when using \intertext or \shortintertext. Adding \\ before them or not. \documentclass[preview,border=12pt]{standalone} \usepackage{amsmath} \begin{document} ...
7
votes
2answers
196 views

How to typeset piecewise-defined functions? [duplicate]

I am attempting to write out the basic process for finding the absolute value of some number. In ASCII, this is what I am attempting to write. |X| = { x if x > 0 0 if x = 0 ...
7
votes
1answer
93 views

Formula label outside of formula

I want to label a block of equations like that: The "AB" should not inflict the central alignment of the formula. I saw it a lot, but do not succeed on my own. Do I need to build boxes? I used the ...
7
votes
1answer
2k views

Placing equation number on left with reqno option in amsart document class

Is there a way to force individual equations to place their equation numbers (or more specifically the result of a \tag*{blah}) on a specific side of the page regardless of the options to amsart. I ...
7
votes
1answer
29 views

Is it OK to use a macro for an operator, or a macro defined by `\DeclareMathOperator`, as a non-operator?

Macros like \det, I believe, is intended to be used before some expression, but sometimes I wish to use them as in \det \in \mathbf{VP}. Is it acceptable to use them like this instead of using ...
7
votes
1answer
517 views

Integral limits with amsmath in LuaLaTeX

Also reading the thread about Making integral ∫ use \limits by default with unicode-math I'm not quite happy with the solution. With pdfLaTeX I use the code \documentclass{article} ...
7
votes
1answer
125 views

Problem with \index in align enviroment

Please compile the following MWE. As you will then see, the typesetting of $\mu^{\otimes\downarrow n}$ in the index is strange! \documentclass{article} \usepackage{amsmath} \usepackage{imakeidx} ...
7
votes
1answer
320 views

Why does mathdesign result in a huge 'cases' environment brace in Tufte documents?

I'm getting strange results when I use the cases environment in Tufte-LaTeX documents with the mathdesign package. Instead of I get Is there something I can do to get rid of that huge brace? ...
7
votes
1answer
1k views

unicode-math and amsmath incompatible

When I compile the following mwe with xelatex, I am told: ERROR: LaTeX Error: Command \dddot already defined. --- TeX said --- Or name \end... illegal, see p.192 of the manual. l.571 ...
7
votes
1answer
626 views

Change the equation font locally

I want to change the equation font to mathbf in a single equation environment, equation or align. How do I do that? I tried \begin{align} \begin{mathbf} equation1 \\ equation2 \end{mathbf} ...
7
votes
2answers
202 views

Color fraction bar

What would be the easiest way to create a fraction whose bar can be coloured as desired? I know one can use the \genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} command ...
7
votes
1answer
812 views

Add Overbrace to describe a column of matrix

I want to add some over-braces to a matrix to get the following output: However, this this what I managed to get: I don't know how to get the neuron 1 and neuron 2 headings...I was thinking of ...
7
votes
3answers
739 views

A set of equations, vertically aligned, individually tagged, with subequations, and separate label

Can the following be achieved using just amsmath and mathtools? (If not, what other tools do I need?) I have a collection of equations \begin{align} A &= B \\ C &= D \\ E &= F ...
7
votes
1answer
82 views

\hat and \bar compatibility issue EDIT: It's a bug, workaround provided

I have two \newcommand defined as follows: \newcommand{\hvar}[1]{\hat{\delta #1}} \newcommand{\gbp}{{{\bar{\gamma}}_p}} And they look like this: \hvar{X} \gbp The problem is that, if I use ...
6
votes
3answers
161 views

align* not aligning properly with \sqrt

Using this, everything is aligned properly: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} 16x^2&=144&\text{| }&\text{sqrt}\\ 4x&=12&\text{| ...
6
votes
4answers
147 views

Multiple underbraces that span overlapping columns in matrix

I want to display the structure of a matrix as shown in the image below: The following code shows the structure of the matrix, without the underbraces: \documentclass{standalone} ...
6
votes
3answers
1k views

alignat makes 3 good alignments and 1 bad

I'm having a problem with the alignat environment. This code: \begin{alignat*}{9} &X_{12}&+X_{13}& & & & & & & &=1 ...
6
votes
2answers
5k views

Are \choose and \align incompatible?

I ran across a strange warning when trying to use the math command \choose inside the amsmath package's \align* environment: \documentclass{article} \usepackage{amsmath} \begin{document} ...
6
votes
3answers
227 views

Using $1\over2$ instead of $\frac{1}{2}$ under amsmath

I know that you should use $\frac{1}{2}$ instead of $1\over2$ to prevent warnings when you're using amsmath. But do those two expressions print differently? I know why, according to the amsmath ...
6
votes
4answers
1k views

Centering equations within alignat command

I want to centre the formula inside the equals. So far I have \begin{alignat*}{2} v_2(16)&=\frac{2}{5}[v_3(32)+v_3(8)] &&= 0, \\ v_2(4)&=\frac{2}{5}[v_3(8)+v_3(2)] &&= ...
6
votes
2answers
2k views

How can I put a matrix in a figure caption?

I would like to put a matrix in a figure caption. The following example demonstrates the idea: \documentclass{amsart} \usepackage{graphics, epsfig, psfrag} \begin{document} \begin{figure} ...
6
votes
2answers
572 views

Setting two math symbols directly above each other and vertically aligned

I am typesetting the Neyman Pearson decision rule and would like to set the greater than > and smaller than < symbols directly above each other. I tried \overset but that doesn't align the ...
6
votes
2answers
1k views

Does the intlimits option work in amsmath package?

AMSMath manual states that (1) "sumlimits (default) Place the subscripts and superscripts of summation symbols above and below, in displayed equations." (2) "intlimits Like sumlimits, ...
6
votes
3answers
448 views

Multiline equation with specific indentation style

I have a multiline equation of the following type: \begin{equation} \begin{split} f(x,y) & =a\\ & =b\\ & +c\\ & +d. \end{split} \end{equation} But the output I would like to have is ...
6
votes
4answers
745 views

Resetting alignment in the align environment

I have a few aligned lists of coefficients. One set of coefficients has three columns and the other has four. At the moment I display them with two align environments: \begin{align} \gamma_1 ...
6
votes
3answers
446 views

\everymath, AMS equations, beamer, and tikz not working together

In a beamer document, I have $ expressions embedded in displayed equations (using tikz to make, e.g., colored boxes around some expressions). I put \everymath{\displaystyle} in the preamble so that ...