{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
227 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 ...
1
vote
1answer
95 views

Very wide equation ruins consecutive side edges

I've just created a set of equations in matrix form which looks fine. It also seems to fit in the space of my document, but in the following space after the equation, the side edge is suddenly gone, ...
10
votes
2answers
163 views

Math equation typeset problem

I would like typeset equation on the figure below. I have problem with subsript text 1, 2, 3 and 4 under integrals. I try something like this: \begin{align}\label{fyz:eq_fey_null2} ...
0
votes
0answers
32 views

Remove extra space to the left of aligned environment [duplicate]

To typeset a collection of equations with alignment, I am using align* from amsmath. Some of these equations have right-hand sides that have multiple lines that should be indented. So far I am using ...
8
votes
2answers
131 views

Text misplacement with certains combinations of \mathring and \overline

If I try to compile the following document \documentclass{article} \usepackage{mathtools} \DeclareMathOperator{\Op}{Op} \begin{document} \[ 1 + \mathring \Op(4) = 2 \] \[ \overline{ 1 + \mathring ...
5
votes
3answers
129 views

alignat inside align enviroment?

Why can't I nest an alignat environment in an align environment? \begin{equation} \label{eq:115} \left\{ \begin{aligned} \begin{alignat*}{2} ...
15
votes
2answers
239 views

Strange behaviour of binomial coefficient's delimiters

While writing down my Combinatorics exercises I found that the binomial coefficient's delimiters weren't displayed as indicated inside the amsmath documentation. By subsequent trials and errors I was ...
0
votes
1answer
25 views

How to prevent aligned equations to shift when adding a non-aligned line break?

I have an equation in the aligned environment to align the equal signs together. However, the last equation is too long, and I want to break it up. When I insert a linebreak, all the equations above ...
8
votes
1answer
145 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, ...
0
votes
0answers
103 views

Better extensible arrows

Using amsmath and extarrows packages, we have many extensible arrows. But these arrows look ugly, since some parts in an arrow are boldfaced. Are there any better-looking extensible arrows?
5
votes
1answer
107 views

Automatic way to match matrix heights

I have a simple matrix equation, but one of the matrices has subscripts and superscripts on both lines: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} ...
5
votes
1answer
139 views

commath and \ifinner

The commath package use the TeX command \ifinner to select between inline math mode and display math mode. Because of this, it fail to work properly with some display math environments. In the breqn ...
5
votes
2answers
114 views

Matrices with llncs class

I have the following snippet to display a matrix equation using the regular amsmath packages: \begin{equation} S(x) = \begin{pmatrix} 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & ...
8
votes
3answers
199 views

Reduce space between 'genfrac' and indices

\documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \DeclareRobustCommand{\eulerian}{\genfrac<>{0pt}{}} \begin{document} % Source: ...
16
votes
3answers
1k views

Guidelines for typesetting fractions

I realize that this question is to some extent subjective. However, I suspect that there are some common standards regarding how fractions ought to be typeset in mathematics. The guide Mathematical ...
0
votes
0answers
27 views

Undefined control sequence error when using \abs [duplicate]

I have the following line of code that is throwing up an undefined control sequence error: \begin{equation} \vec{N} = \frac{\vec{T'}(t)}{\abs{\vec{T'}(t)}} \end{equation} The problem is with the ...
5
votes
1answer
108 views

How to get proper spacing when typesetting an expression such as $f\left(\frac{y}{2}\right)

I am trying to typeset the value of a function $f$ for $x = \frac{y}{2}$ (or something other which requires more vertical space). To get properly sized parentheses I tried: f\left(\frac{y}{2}\right) ...
4
votes
1answer
85 views

Spacing within equation

I've got the following equation: \begin{align*} y_{i} &= f(x_{i}) + \epsilon_{i} \nonumber \\ &\approx \underbrace{f(x_{0})}_\text{=$\beta_{0}$} + ...
22
votes
2answers
10k views

What is the difference between \dfrac and \frac?

The title says it all, both \dfrac{a}{b} and \frac{a}{b} make fractions, so what is the difference between the two?
3
votes
1answer
157 views

Matrix environments not working

I have a strange problem. It seems I cannot use any of the matrix environments (matrix, bmatrix, pmatrix etc.). The following code will not render on my machine \documentclass[12pt]{article} ...
4
votes
1answer
324 views

How to place the QED symbol at the end of equation using IEEEproof environment?

I was wondering how one can place the QED symbol at the end of an equation when using the IEEEproof environment? With the standard proof environment of amsthm this is done by simply placing \qedhere ...
5
votes
3answers
90 views

How to get for to stand separate in an equation?

I have the following equation: \begin{equation} C_k = \frac{1}{N}\sum\limits_{n=1}^N k_n for k \in {1,\dots,K} \end{equation} How can I get the for, and everything after it, to stand ...
8
votes
2answers
177 views

Glossaries in Align Environment

Using glossaries commands in align environment seems to screw up the tag alignment. How can I use gls{...} commands in align environments without the tag position being altered? Consider the ...
3
votes
2answers
54 views

Make limit in inline mode same position as display mode

If I use: $$\lim_{x\to3}f(x)$$ Then the x to 3 is placed below the limit. But if I write: Given $f(x)=x^2$, evaluate $\lim_{x\to 2}f(x)$, ... Then the limit is put below right of the limit ...
6
votes
1answer
106 views

Long formula in align environment

Usually, if I have a very long formula, I will use two lines in the align environment and \qquad to space things out nicely. For example, \begin{align*} % First line \rho\left(\frac{\partial ...
1
vote
1answer
179 views

Changing align environment tag styles and colors [duplicate]

I'm using amsmath and amsfonts to typeset my homework, and since it will be read on a screen, I would like to make \tag{comments inside equations} differently colored, and optimally downsize them by a ...
0
votes
0answers
27 views

How can I create multiple lines of equations in flashcards? [duplicate]

I have flashcards that work perfectly, but on a few of my flashcards I want to be able to give 2 equations on separate lines. Normally I know how to do this....such as using gather or align but when I ...
14
votes
1answer
238 views

align* environment left-aligned with LuaTeX and RTL math direction

When using LuaLaTeX, with the math direction set right-to-left, the contents of an align* environment is left-aligned instead of centered. Why does this happens? How can I fix it? ...
2
votes
1answer
66 views

Hyperlinks to repeated & variant equations with \tag{} don't work

Suppose I have the following equation (42), a variant version of it (42ᵇⁱˢ), and then a repeated version of (42). Here is how I would express them in my document: Original equation: \begin{equation} ...
1
vote
0answers
100 views

autonum, amsmath and \qedhere

I have a weird behavior of the \qedhere command while using amsmath in combination with autonum. Consider the minimal (not working) example below: In unreferenced equation with \qedhere (Theorem 2) ...
4
votes
1answer
116 views

How to use lineno with \intertext?

I would like to number all lines of a document to help its reviewing. The lineno package is working fine, except for the \intertext{...} paragraphs that I use between aligned equations. ...
3
votes
1answer
365 views

Using Linux Libertine fonts for math without newtxmath

I'm trying to use Linux Libertine as the math (and main) font, and I used this answer to set the math fonts. However, the math output is still CM. \documentclass{minimal} \usepackage{amsmath, ...
1
vote
1answer
165 views

Increasing margin of left side tag/number in amsmath align enviroment

I asked this on the lyx user list but haven't got an answer (http://marc.info/?l=lyx-users&m=137891444218650&w=2). I would like to include text lines in align environment using 'leqno' option ...
0
votes
1answer
105 views

cases-like without brace

I want to know if there is a cases-like environment which has no braces? I want to do the following without a curly brace: \documentclass[12pt]{scrartcl} \usepackage{amsmath} \usepackage{mathtools} ...
7
votes
1answer
88 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 ...
7
votes
2answers
313 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 ...
5
votes
2answers
302 views

How to number each equation of simultaneous equations grouped by a left curly brace?

Consider the following MWE. \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \\ px ...
3
votes
2answers
574 views

! Package amsmath Error: \tag not allowed here

I want to use \tag in my LaTex file at https://www.sharelatex.com/. For example, I want to do: If $x \equiv x' \pmod{N}$ and $y \equiv y' \pmod{N}$, then: $xy \equiv x'y' \pmod{N}\tag{Substitution ...
5
votes
1answer
126 views

Amsmath and tikz - conflict?

I have a problem with: \documentclass{minimal} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{amsmath} \usepackage{tikz} \begin{document} \pgfmathparse{ifthenelse(1<0, ...
6
votes
1answer
214 views

Create multiline fraction

How to create an equation like in the image below. I tried to use \cfraq and \hline but with no success. I am asking for the layout only, not the formulae.
2
votes
2answers
140 views

Equation conditions

I am in doubt of how to properly write (multiple) conditions to an equation. Right now I have a+b=c,\quad a>0,b\ge 0 Which gives But I dont think it looks very nice. How can I make it look ...
4
votes
2answers
2k views

How to put the QED symbol of a proof at the right place inside align?

When a proof ends with a formula in equation or equation* environment, putting \qedhere after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which ...
2
votes
1answer
174 views

Equation numbers under equations

I have three similar equations which I want on a same line. I put them in tabular environment nested within subequations following this: subequation in tabular. Now I have this code: ...
30
votes
2answers
805 views

Equation connected by lines

I have written a code that defines a new environment in which aligned equation are connected by lines as in the image: I think it is useful when, inside the align environment, there is the need of ...
4
votes
2answers
104 views

Text to the right of piecewise equation

I have the following piecewise functions: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align*} K(u) &= \begin{cases} \frac{1}{2} & -1 \leq u \leq 1 \\ 0 & ...
12
votes
3answers
424 views

Multiple letters without spacing in Math [duplicate]

Is there something I can add to the preamble of my document such that multiple letters without spacing in a Math environment (such as $NP$) do not have extra spacing between them and are not ...
0
votes
1answer
715 views

How to Copy Latex from MS Equation Editor 3.0 [closed]

I've one word document having equations typed using MS Equation Editor 3.0 ; One Sample Screenshot is mentioned below: How can I get underlying AMS-Latex code for equation added using MS Equation ...
2
votes
1answer
62 views

How to indent the equation number a bit to the left?

How can I add space after the equation numbering? MWE: \documentclass{book} \usepackage{amsmath} \begin{document} \begin{align} a = b + c \end{align} \end{document} So I want to move the ...
5
votes
1answer
187 views

Sequential equation numbering when using 'report' class [duplicate]

I would like to use sequential equation numbering but I am using the report class which defaults to numbering equations within chapters. I would really appreciate if someone could help me with this.
3
votes
1answer
2k views

“!Missing $ inserted” error using amsmath environments

I am trying to compile a document with equations but whenever I use \begin{eqnarray}..\end{eqnarray} or \begin{align}...\end{align} or anything like this I get the error msg !Missing $ ...