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

learn more… | top users | synonyms

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
66 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
340 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
227 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
152 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
162 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
78 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
107 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
143 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
116 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
75 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
84 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
61 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
253 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
106 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
206 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
97 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
188 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
383 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
133 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
24 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
64 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
51 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: ...
0
votes
1answer
112 views

“Dimension too large” using geometry package

So, I have an interesting problem with a really (really really ...) large equation that I am trying to typeset. Basically, crunching the file through pdflatex gives: This is pdfTeX, Version ...
2
votes
2answers
97 views

Latex Alignment

So I got help for my LaTeX problem. I am in need of a little more help to get this example to look perfect. I want to perfectly align everything in the words section of each of my equations. I would ...
10
votes
2answers
131 views

How to Align systems

I am having a hard time of getting my texts and equations aligned. Idk what pack to use. Sorry the way I listed the codes are not the very best. This is my first time going on to this forum. Here's a ...
2
votes
1answer
71 views

Problem with align*, having & inside \dfrac arguments

To center align two equations, I need to place the & inside a \dfrac argument (I am using AMS LaTeX) but if do that, I get an error message and the code does not compile. The only alternative way ...
5
votes
0answers
68 views

Is using DeclareMathOperator for functions the right thing to do?

I'm wondering if I use the \DeclareMathOperator for the wrong things. For example I have a cost function cost(x,y) which takes two arguments. I would declare it as \DeclareMathOperator*{\cost}{cost} ...
0
votes
1answer
49 views

Add vertical space in aligned environment and explanation of the unequal space between two gather/align environments

I want to leave some space between the aligned environments and some below the texts in the environments so to have a nicer output. How can I do that? \documentclass[12pt]{article} ...
5
votes
2answers
65 views

How to make \dots from amsmath and ellipsis work together

The amsmath package changes the \dots command to have different vertical alignment depending on context (I'm not sure if it does anything else to it). The ellipsis package changes the \dots command to ...
3
votes
1answer
105 views

What does \normallineskiplimit do?

In this excellent answer, one of the tools used is to redefine \normallineskiplimit. I cannot find this macro in any reference, although it does show up in this answer. Where is this length originally ...
6
votes
2answers
146 views

What's the difference between split and aligned?

I don't understand the difference between the split and aligned environments introduced by amsmath, so I'm posting this question as a place to collect what subtle details there may be. One thing ...
3
votes
1answer
66 views

How to align terms in alignat: too much spaces and too few

Please, help me this code has too much spaces and too few, how can I fix it? \begin{subequations} \begin{alignat}{2} \forall i \in[m] && \sum \limits_{e \in N_{out(s_{i})}} y(i,e) - \sum ...
6
votes
2answers
1k views

Big forward slash in math

I have a equation in from of a=VERYBIGSTUFF / VERYBIGSTUFF And I would like to have a "verybig" forward slash in the middle of them. I dont like \frac mode, as I would like to have them ...
0
votes
0answers
19 views

amsmath: error using subequation environment “Missing \endgroup inserted \end{align}” [duplicate]

Here's my minimal problem-causing example: \documentclass{standalone} \usepackage{fixltx2e} \usepackage{amsmath} \begin{document} \begin{subequations} \begin{align} a &= ...
3
votes
3answers
141 views

Why does `gather` behave this way, and what can we do about it?

Here's a simplified version of the code I'm having trouble with. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{center}\underline{First set of identities.}\end{center} \[x+x = ...
0
votes
0answers
88 views

Locally change font style from sfmath to amsmath

I am using the package sfmath. It is rather hard to explain why, but the reason should not matter for my question. If it is required I can try to explain why I need sfmath. Nevertheless, the main ...
18
votes
4answers
876 views

How to typeset an i with asterisk above?

I tried it with a modification of \overset as suggested by Werner in this question: Creating non-math mode substitutes for \overset and \underset not dependent on the amsmath package With the new ...
2
votes
1answer
106 views

tex4ht compile error using mathml switch using multline with pmatrix and easybmat

It took me a long time to find this and be able to make a MWE. I hope someone has an idea what is causing it and if there is a work around. This problem shows up in this small example, only when I use ...
0
votes
0answers
47 views

! Undefined control sequence \backsim [duplicate]

My latex file does not accept the command \backsim. This is what I wrote in the file: $ \backsim 2.5 \mu$ What is wrong?