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

learn more… | top users | synonyms

8
votes
1answer
2k views

Trick LaTeX into doing double superscripts

I have a function in my .sty sheet that does a second partial derivative: \newcommand{\hpartdsq}[2]{\dfrac{\partial^2 #1}{\partial #2 ^2}} But I'd like to pass it something that already has a ...
8
votes
1answer
1k views

eqref in captions with mathtools

I've now tried mathtools for the first time, for the sake of showonlyrefs. It works fine, except if I put an \eqref command into a figure caption, in which case I get: ! Argument of \@caption has an ...
8
votes
2answers
734 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 ...
8
votes
1answer
256 views

\vec{p_{\bar p}} renders strangely

When I do: \vec{p_{\bar p}} I get: instead of with the \vec shifted over a bit. Why does this happen? (Also, \vec{\mbox{p_{\bar p}}} renders identically, even though \mbox{p_{\bar p}} looks ...
8
votes
1answer
158 views

How to increase the vertical space surrounding mathematical equations?

How can I, in a systematic way, increase the vertical space surrounding mathematical equations? \documentclass{article} \RequirePackage[ansinew]{inputenc} \usepackage{amsmath} \begin{document} Ah, ...
8
votes
1answer
164 views

Adaptively sized delimiters that don't go beyond the size of \bigl and \bigr

I would like adaptively sized delimiters, but only up to \bigl/\bigr-size. That is, there is variation only between ordinary/normal size and one size higher. \documentclass{article} ...
8
votes
1answer
6k views

Multiple labels in aligned environment

I would like to format an optimization problem by \documentclass{article} \usepackage{amsmath} \begin{document} We want to label each line separately. The inserted text and formulas have to be ...
8
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 ...
8
votes
1answer
197 views

\cee command (from mhchem package) doesn't allow \\[10pt]

when using \cee command (from mhchem package) within align environment, \\[10pt] doesn't work. It works in align environment without \cee. Is there a workaround? here is a MWE: ...
8
votes
2answers
114 views

Please help me input the following formula correctly

This is the formula I want to be made in LaTeX. The problem is to make this formula aligned. I've made something like this \begin{gather} 1 = \cos \, (\bar x, \bar x) = \cos^2 \, (\bar x, x) + ...
8
votes
2answers
218 views

Delimitershortfall in align environment

Can you explain why the \delimitershortfall cannot be modified inside a align environment? This is a MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
8
votes
2answers
406 views

minipage is wider than I wanted

Occasionally, the width of a minipage environment seems to be ignored. I've not kept accurate records of when this has happened. But below is purely illustrative code that shows the issue. ...
8
votes
1answer
341 views

Makeindex error when ! used in \index in align environment

See MWE below. The symbol ! in the \index causes an error. This is only the case in align environments (not in equation). So it seems to have to do something with amsmath. If ! is put in an \mbox ...
8
votes
1answer
2k views

Multiply defined labels using hyperref

I'm using the stackrel command to indicate important steps in the transformation of formulas. E.g. I would write: A\stackrel{(!)}{=}B so that I can later explain in text why exactly A equals B. I've ...
8
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 ...
8
votes
1answer
137 views

Switch between leqno and reqno options (of amsmath) in the same document

I'd like to know if it is possible switch between the leqno and reqno options in the same document keeping the numbering of the equations. Namely i use the reqno option (default for amsmath and the ...
8
votes
2answers
217 views

Underarrow with smaller depth, shorter minimum length, and smaller arrow head?

I am using underarrows from amsmath to decorate messages with their direction, as in $\underleftarrow{\mathsf{msg}}$ () and $\underrightarrow{\mathsf{msg}}$ (). I am looking for a better underarrow, ...
8
votes
1answer
488 views

\eqref to give reference to a sequence of subequations

Suppose I have the following code \begin{subequations} \begin{align} a+b = c \label{eq.1}\\ d+e = f \label{eq.2} \end{align} \end{subequations} I want now that upon giving the reference, it ...
8
votes
1answer
1k views

What is the advantage of using the equation environment in latex?

My flatmate uses \flalign for all of his equations in LaTeX and after thinking about it, it makes sense. Is the \equation environment not just more restrictive? Is there ever an advantage to using the ...
8
votes
2answers
345 views

Revtex's tensor macro interferes with nested amsmath split and align environments

I've encountered a strange collision between RevTeX and AMSLaTeX. If I nest a split environment inside an align environment, it works as it should, but then the next time I use the RevTeX \tensor{} ...
8
votes
2answers
284 views

Typesetting a pattern matching equation

I want to typeset an equation for a paper. In the field of computer science we can define an equation that depends upon the form of one of it's arguments. I want to typeset this with LaTeX & ...
8
votes
2answers
1k views

Equation numbering problems in AMSMath environments with \pause

I'm writing a beamer presentation, and trying (unsuccessfully) to use \pause to step through a numbered array of equations, with the equations appearing in turn, and the corresponding numbers ...
8
votes
1answer
182 views

Align successive equations through the entire document

I am fairly new to TeX and need to create my math assignment with TeX. I have succeeded aligning all my calculations with the use of \begin{align*} and \intertext{}, however in my document i have ...
7
votes
2answers
343 views

What is wrong with defining \bal as \begin{align}?

I'm trying to define two commands \bal and \eal instead of inserting \begin{align} and \end{align} in my document, but in the code below, I'll get some errors. What is wrong with it? ...
7
votes
2answers
2k views

What's the difference between align and align*?

After some brief searching I can't find the difference between align and align*. Google summarily ignoring the * is making it harder I think. Can you tell me the difference between these two? ...
7
votes
3answers
2k views

Extra space above boxed multi-line equation

Well, this question is not new. It was asked back in 2007 in texhax, and answered at the same time. However, I couldn't apply the patch as mentioned in the answer, so I decided to ask it here. ...
7
votes
1answer
8k views

amsmath align environment: row spacing

How can I stretch the spacing between consecutive lines in an align* environment? I have a few lines with \fracs in which both the numerator and the denominator consist of textual phrases, not math ...
7
votes
2answers
371 views

Equation number with an apostrophe

I am writing two equations in an align environment: \begin{align} x^2+y^2=z^2, \\ x^2=7, \end{align} I would like the first equation to be labelled with e.g. (1.1) and the second equation to be ...
7
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} ...
7
votes
3answers
4k 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
365 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
2answers
159 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
222 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
918 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
2answers
286 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
988 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
2answers
115 views

Defining new split environment with reduced spacing

this is my first stackexchange question so apologies for any bad etiquette. I'm writing a document in double spacing. I don't wants the gaps between the lines of a multi-line equation to be that ...
7
votes
1answer
153 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
298 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
27k views

using subequations

I have an equation consisting of two parts and would like to use subequation for that. Here's the code: \usepackage{amsmath} \begin{subequations} \begin{equation} \operatorname{min}_{a,b,c} ...
7
votes
1answer
252 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
2answers
1k views

Nested Environ's give “! Argument of … has an extra }” error

I tried using two Environ's in a nested fashion, but I get the ! Argument of \marray has an extra } error. Any idea why this happens? \documentclass{minimal} \usepackage{amsmath,environ} ...
7
votes
1answer
872 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
187 views

Is gather* equivalent to displaymath?

Is gather* with one line of math equivalent to displaymath?
7
votes
1answer
864 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
2answers
6k views

overset text over equal sign in in an Align environment

Look at the following example \begin{align} & x \\ \overset{\text{some long explanation}}= & foo \\ & = bar \end{align} what is the best way to get the equal signs ...
7
votes
1answer
129 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
175 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
153 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
1answer
176 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 ...