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

learn more… | top users | synonyms

8
votes
2answers
353 views

Interaction between \hdotsfor and colortbl: Bug/Feature?

When using package colortbl, the command \hdotsfor fails (partially), leaving too much white space before and after the dotted part. The mwe \documentclass{book} \usepackage{colortbl} ...
3
votes
1answer
40 views

Spacing around align environments

I first learnt to use LaTeX using the equation environment, and liked to set out my .tex document with spacing around equations. Now that I use the align environment, putting this additional space ...
0
votes
0answers
34 views

Align environment immediately after section break

When I use an align environment immediately after a new section, there is a significantly increased line break between the section and the equation, too large for my taste. Is there a way to make this ...
5
votes
1answer
69 views

How can I align the first row of these equations?

\documentclass[ngerman]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} ...
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 ...
1
vote
0answers
37 views

Displayed equation is not centered

I'm planning to send my research paper to a journal using the provided template. However, i found that displayed math is not centered (paper publish in the journal have equation centered). Below i ...
6
votes
2answers
84 views

Align equations over multiple sections

Is there a way to make the math mode "align" work over multiple sections? Here is the code example: section*{Polynomials} Do the following polynomial devisions \begin{align} &(x^7 - x^4 - 21x^2 + ...
4
votes
1answer
33 views

Center some lines within an alignat environment nested in subequations environment

For typesetting a mathematical program I use the subequations environment to number the equations. The restrictions are aligned using the alignat environment (see MWE1). What I would like to achieve ...
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 ...
4
votes
1answer
31 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 ...
15
votes
2answers
7k 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
36 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 ...
6
votes
1answer
49 views

Opposite of \allowdisplaybreaks

If i load the amsmath package it doesn't allows to break by default alignments across the pages in the multline, align, gather, alignat environments and their starred versions. Howewer it exists the ...
44
votes
4answers
6k 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 ...
5
votes
2answers
97 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
41 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
69 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
88 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
43 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
130 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
64 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
105 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
51 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
276 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
821 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} ...
4
votes
4answers
5k 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
184 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
54 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
308 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
170 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
122 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
39 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
148 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 ...
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. ...
3
votes
2answers
38 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
72 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 ...
3
votes
1answer
51 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
99 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
33 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
64 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
78 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
51 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 ...
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 ...
4
votes
3answers
239 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 ...
7
votes
1answer
44 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
185 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} ...