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

learn more… | top users | synonyms

15
votes
4answers
1k 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 ...
4
votes
1answer
67 views

math subarray/substack environment not working

I am trying to get stacked indices using subarray/substack using the following snippet, but I am not seeing stacking beneath the sum symbol. This is the type of output I am expecting, but this is ...
19
votes
2answers
9k views

\xRightarrow (text)

I know it's possible to have \xrightarrow (text), but if I try to do \xRightarrow (text) I get an error each time. Does anybody know if it's a syntax error or if there is a other way to produce the ...
1
vote
0answers
44 views

hyperref package within AMS latex environment

How can I use link references using hyperref package within AMS latex environment? Is it possible to use it with \cite{} or need to use anything else? When i try to create a dvi file I have an error ...
5
votes
2answers
108 views

How can I DeclareMathOperator* with spacing after it, preserving the alignment?

In the context of optimization problems, I'm using \usepackage{amsmath} \DeclareMathOperator*{\minimize}{\text{minimize}} \DeclareMathOperator*{\subjto}{\text{subject to}} to declare some operators ...
2
votes
3answers
53 views

Adjust spacing between linebreaks

I would like to adjust the spacing between two lines within a gather environment. My MWE is this: \documentclass[]{scrreprt} \usepackage{amsmath} \begin{document} \chapter{Chapter 1} Lorem ipsum ...
2
votes
2answers
106 views

Keep margins in latex when using inline maths equations for small equations

So say I have the following paragraph \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $\hat{\sigma}_w(kn)$ Here are some ...
3
votes
2answers
111 views

returning maths values in a new command

So I'm trying to construct a command which calls another command to make typing easier, but for some reason I'm not able to get the commands to return things properly. Here is what I have ...
4
votes
1answer
224 views

amsmath undefined control sequence

I am using \documentclass{report} and \usepackage{amsmath}. My problem is relation symbols such as \backsim \lesssim \gnsim are not working. Everytime I try to use such symbols error ...
6
votes
1answer
163 views

How to achieve no indentation for a single equation?

I'd like to have a single equation without indentation at all. I know I can set it globally with \setlength{\mathindent}{0cm} But I don't know how to return to the default value after the ...
6
votes
1answer
66 views

Failure of \text within theorem environment

I have an equation within the statement of one of my theorems. Within this equation, I have some text to name a function. However, when this equation appears within the theorem environment, the ...
4
votes
4answers
126 views

Dividing Long Equation using Split

I have a long equation as below, As the equation is too long, I am working to split it. Unfortunately it was not successful. Confused where could be the mistake. Could you assist to point it. MWE: ...
4
votes
3answers
68 views

Alignment using an alignat{2} environment

In the following code, I have the appropriate alignment. All the equal signs are aligned. There is one expression that is written on two lines; I wanted the first plus signs aligned. I used an ...
5
votes
2answers
301 views

How to produce aligned math with an extra symbol on the left.

In school, our teacher requires us to put a ⇔ sign on the left of our equations, when we do a tranformation on the equation. Usually, I use an align context to format multiple transformations of an ...
3
votes
2answers
3k views

AMS align: Left aligned text/math plus multicolumn align

This question is basically a combination of two previous posts: Adding left aligned text to an equation. and AMS align / Align multiple “=”, too much space (the latter being my own question). What I ...
4
votes
2answers
842 views

Multi-column delimiter in align

I want to set the following, but with all the <'s aligned horizontally Source of this failed attempt: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} ...
5
votes
4answers
6k views

Centering split equation

I am quite new to TeX. I want that each line in the following equation be centered, but I cannot find how to do it. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
10
votes
2answers
187 views

Different symbols in $…$ and align environments

Is there a way to force LaTeX to produce different symbols either in $...$ or \begin{align}...\end{align} environments? For example $ \mymacro $ should lead to A while \begin{align} \mymacro ...
9
votes
1answer
2k views

Blank lines in align environment

Is there a way to insert a blank line between two equations in align environment? From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this ...
1
vote
1answer
70 views

How to align numbering for equations

I can't seem to align the numberings on my equations. If anyone can help that would great! Here are my codes: \begin{multialign} \item 4x - 2 &< 3 && \\ 4x - 2 + 2 &< 3+2 ...
5
votes
2answers
348 views

Combined use of [fleqn] and \qedhere

It seems there is an issue within the ams packages, which results in an incompatibility between the fleqn option, and the \qedhere command. If those are used together, the qed symbol is flushed to ...
6
votes
1answer
235 views

Typesetting mathematical constants

Is there any command for typesetting constants in mathematical formulas? I would imagine something similar to \operatorname or \DeclareMathOperator, but for constants. I want the constant to be ...
4
votes
3answers
160 views

Align without display math?

Is it possible to use the align environment without the display math? For example, I would like \sum to look as if it were inline. The solution given here does not work, insofar as the summation ...
2
votes
1answer
40 views

aligning equations with a tag

\documentclass{article} \usepackage[a4paper, total={6in, 8in}]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{mathtools} \usepackage{amsmath} ...
9
votes
2answers
166 views

Kerning and long subscripts or superscripts

For really long sub(super)scripts, does it look bad to decrease the kerning? i.e. \lim_{n\to\infty}{\dfrac{1}{s_n^2}\sum_{i=1}^n \int_{|x-\mu_i|>\varepsilon s_n} (x-\mu_i)^2f_i(x)dx}=0 ...
13
votes
3answers
7k 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. ...
3
votes
2answers
93 views

break an long line in an algorithm

I have a long line in an algorithm and want to break it into two lines. For similar case in equations, split can be used. How do I do this within an algorithm? \documentclass{article} ...
4
votes
2answers
112 views

Change numbering level for one chapter only

Apologies if this is duplicate but couldn't find it. I have a document using amsmath for chapter, section & subsection numbering, & everything (theorems, lemmas etc) uses the same numbering ...
4
votes
1answer
183 views

Change vertical space in overset

How can I decrease the space in overset? I found this solution online, but it doesn't look quite like the original overset (note I know it is difficult to come up with a solution to handle all cases ...
5
votes
1answer
121 views

Define certain letter in math-mode to be always non-italic

Imagine I have a 500 page book about complex numbers. But I always wrote just j in math-mode as the imaginary unit. But I should have written \mathrm{j}. Is there a command I could write into my ...
0
votes
0answers
36 views

{cases} does not work while amsmath package is used

I tried the following: $P_{ijt}^{bool}$: \begin{cases} 1 & \mbox{if } P_{ijt} > 0 \\ 0 & \mbox{else} \end{cases} \usepackage{amsmath} is in the beginning of the file. This should work ...
20
votes
4answers
3k 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 ...
1
vote
0answers
19 views

Separate labels in cases to then reference [duplicate]

How can I label each of these equations separately so that I can refer to each of them later on? \[ \begin{cases} u_t+uu_x=-p_x, \\ H_t+(uH)_x=0, \end{cases} \]
1
vote
1answer
81 views

Center-justifying first part of multline

Consider the following MWE. With my document setup, the equation has to be broken into two lines. Luckily I can get the entire matrix on one line, so I can break the equation after the equals sign. By ...
3
votes
4answers
86 views

How can I change the font of all equations?

I'd like to change my default font style in all equations of one document, not just single equation. I guess I am using \usepackage[utf8]{inputenc} and \usepackage{amsmath}, which may be related to ...
3
votes
1answer
62 views

How to typeset times in regular text

How should I enter in a time of day in latex in order to have it typeset properly, if I am using the amsmath package? I am using pdflatex. say I want to write "12:00". In math mode, this gives a ...
13
votes
2answers
2k 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 ...
4
votes
3answers
257 views

How to write two equations as part of one equation?

\begin{equation} \begin{align} \mathbf{x_{t}=f_{t}(x_{t-1},u_{t})}\\ \mathbf{y_{t}=g_{t}(x_{t},v_{t})} \label{eq:state-space&obs-equ} \end{align} \end{equation} I want that y(t) equation should ...
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 ...
12
votes
1answer
216 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} ...
2
votes
0answers
24 views

\dotsc or \dots in this case? [duplicate]

I know that we should use \dotsc with a comma and \dots if there is no comma. But what if I have a comma on the right side and no comma on the left side, for example in Pr[X_i | X_{i+1}, ... ] ...
3
votes
2answers
151 views

tips to make best estimate on aligning

Hey so I keep on using \ \ {text} to make sure all my equations are aligned. Is there any good ways to do this beside using the spacing systems? Like I had to print my project two times because ...
10
votes
3answers
3k views

Defining a command for amsmath's align environment

I'd like to define a shorthand command for \begin{align*} and \end{align*}. When I write \newcommand{\ba}{\begin{align*}} it works fine. But when I write \newcommand{\ea}{\end{align*}} ...
3
votes
1answer
98 views

Why the summation is printed like this?

The values of the upper and lower limits of a summation are usually printed below and above sigma. But I find TeX something very unusual. How to correct this? Here is the MWE: ...
6
votes
2answers
190 views

Align the n's in the equation

In the following code, how do I align the n's? Here is the MWE: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align} n \propto exp(-U/kT) \notag \\ \Rightarrow \quad n ...
6
votes
4answers
460 views

Different proofs in amsmath with different QED symbol?

I'm trying to expand the amsmath package to get two different proof environments: \begin{proof} ... \end{proof} and \begin{proof*} ... \end{proof*} so proof* should act exactly like proof except ...
5
votes
1answer
141 views

Why can't split with curly-brace be inside align but it can be inside gather?

The following code snippet will guide you through the issue chronologically. \documentclass[preview,border=12pt,12pt]{standalone} \usepackage{mathtools} \begin{document} \section*{gather+aligned} ...
0
votes
2answers
25 views

How can I position the tag of a “nested” aligned environment?

I have an equation that is two wide to fit on a single line, but it has \left(-\right) split over two lines, and I can't align to something inside these for some reason... The wanted output is ...
4
votes
1answer
71 views

How to make equations the same size

When I write an equation using the simple \[ and \], it comes out to the correct size, with the fractions bulging above and below the lines and the parentheses surrounding them. But when I use the ...
2
votes
2answers
54 views

set section environment to be math only, amsmath's begin{gather}

I want to create a small formulary, and for that virtually every line has to be math formulas. I use the gather-environment from the package amsmath, for example: ...