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

learn more… | top users | synonyms

5
votes
1answer
1k views

`missing $ inserted` Error when not putting $ before and after array environment

Considering this answer I added $ before and after the array, i. e. before \begin{array} and after \end{array} in the following code. Then the former missing $ inserted Error was gone. ...
8
votes
3answers
212 views

Control the alignment of each “cell” in amsmath's aligned environment

In amsmath's aligned environment, the alignment of each "cell", or each "column" is predetermined, and seems to work in the following way: the first "column" is aligned to the right, the second to the ...
5
votes
2answers
104 views

How to create a math environment with one row on one side, and two on the other?

I have the following math equations: \begin{align*} &\mathcal{H} = \mathcal{H}^{(0)} + \mathcal{H}^{(1)} \\ &\mathcal{H}^{(0)} = -\frac{\hbar^2}{2m}(\nabla_{1}^{2} + \nabla_{2}^{2}) - ...
4
votes
2answers
697 views

Maths, functions in latex, really basic

I am trying to code the following; f:X->Y   x|->f(x) where -> is \longrightarrow and |-> is \longmapsto. However, my problem is that I am unable to get the x directly underneath the X. ...
2
votes
2answers
268 views

File ended while scanning use of \\definition

LaTeX noob here. Basically I get the following message in sharetex: main.tex: File ended while scanning use of \\definition. <inserted text> \par <*> main.tex I suspect you have ...
7
votes
2answers
238 views

Color fraction bar

What would be the easiest way to create a fraction whose bar can be coloured as desired? I know one can use the \genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} command ...
1
vote
1answer
139 views

IEEEeqnarray: \tag-like command?

Is there a IEEEtrantools command equivalent to amsmath's \tag? Example: Consider the well-known functor laws: \begin{IEEEeqnarray}{rCl} F(f \circ g) &=& F(f) \circ F(g) \tag{Fu1} \\ F(id) ...
3
votes
3answers
146 views

Changing theorem number systems mid document

I have a numbering system setup for most of my document using: \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} Which produces ...
2
votes
1answer
65 views

How to combine thmmarks with addtag for \[\]?

I have the problem, that I have quite a few equations in my text. As I am oftenly unsure if I will need them later as a reference, I searched for a way to avoid exchanging \[...\] with and equation ...
4
votes
2answers
117 views

Name of the section

I would like the following, which I have been unable to resolve: the section title should be of the form Section Sectionnumber. Sectiontitle (E. g. Section 1. On a theorem of Euler.) I have tried ...
4
votes
1answer
537 views

Equation reference undefined when using \cref and package{amsmath}

When I attempt to reference an equation using \cref{..} while also using the package amsmath the references appear as ?? in the outputted pdf. For example \documentclass[]{article} ...
5
votes
1answer
304 views

Changing the vertical alignment of `multlined` from the mathtools package

Package mathtools provides the vertical alignments top, center, and bottom: \documentclass{report} \usepackage{amsmath} \usepackage{mathtools} \begin{document} \makeatletter ...
4
votes
1answer
850 views

What does “Limit controls must follow a math operator” mean?

When I try to compile this: \documentclass{article} \usepackage{amsmath} \usepackage{nath} \DeclareMathOperator{\argmin}{arg\,min} \begin{document} \begin{equation} \argmin ...
2
votes
3answers
121 views

How to type dots whose slope is 1? [duplicate]

We know how to typeset the commonly used diagonal dots, i.e., \ddots, whose slope is -1. Now I want to produce dots with slope 1, which is perpendicular to \ddots. Does anyone know how to do it?
3
votes
1answer
92 views

How to wrap text with flalign*?

I am trying to left align some text as shown below: But the problem here is that the line is almost exceeding the page (shown by red arrow).What I want is somewhat shown in the blue line which ...
6
votes
1answer
323 views

alignment of equations in align environment with itemize

I am using amsmath environment and I want to align equations with multiple align environment. An example can be seen in the figure: Now what i want is shown in arrows. I want i=0,..2n in eq 2.4.2 to ...
9
votes
1answer
442 views

How to typeset row operations on augmented matrix

I would like to typeset row operations on a augmented matrix, but the "gauss"-package does not seem to support the vertical line just before the last column, any way to do this? Thanks!
6
votes
1answer
158 views

Gauss package: gmatrix not equivalent to corresponding amsmath environment

The following quote is taken from the gauss package documentation: The package defines a new matrix environment gmatrix which behaves just like Latex's and AMS-Latex's matrix. But when using ...
5
votes
4answers
193 views

Exam Class: how to avoid question going beyond margin

I'm able to create question paper using LaTeX code mentioned below: \documentclass{exam} \usepackage[margin=0.7in,headheight=3.5\baselineskip,headsep=1\baselineskip,includehead]{geometry} ...
3
votes
2answers
87 views

\newcommand for bmatrix of features using pgffor throws missing \endgroup error

There are two parts to this question. Mainly, I'm interested in implementing a \newcommand that can take an arbitrary number of arguments to be set in a single column of a matrix. I tried the ...
6
votes
1answer
152 views

Issue with bm and breqn packages - is there a way to use a package in only part of a document?

I am a long time stack exchange reader. I always found useful information here. This is however my first post. I have a little issue that I am working on that maybe someone can provide a quicker ...
3
votes
1answer
136 views

Indicator at end of theorem

I'm writing a text with some very long theorem-environments in it and I find the italicised theorems visually not pleasing when they are rather longish. So I'm using the definition theorem style most ...
6
votes
4answers
223 views

Multiple underbraces that span overlapping columns in matrix

I want to display the structure of a matrix as shown in the image below: The following code shows the structure of the matrix, without the underbraces: \documentclass{standalone} ...
1
vote
0answers
221 views

Failed to display math formula in beamer [closed]

This is my preamble for a beamer \documentclass{beamer} \usepackage{beamerthemesplit} \usepackage{graphicx} \usepackage{verbatim} \mode<presentation> { \usetheme{Boadilla} % Pretty neat, ...
10
votes
4answers
229 views

How to vertically align each comma in the following 2 identical sequences?

The following output seems to be difficult to look up an item in the upper sequence with its corresponding item in the lower sequence as the commas are not vertically aligned. ...
3
votes
1answer
64 views

Controlling pgftable numeric output

Please consider the following \documentclass{article} \usepackage{filecontents} % For tables \usepackage{pgfplotstable} \usepackage{booktabs} \usepackage{array} \usepackage{etoolbox} ...
9
votes
3answers
1k views

Underbrace in a matrix

I want to display the structure of a matrix as shown in the image below: Can this be done using pmatrix and \underbrace? My attempt at combining pmatrix and \underbrace results in a compile error. ...
9
votes
4answers
408 views

Highlighting equation with arrow

I want to create an equation with highlighting as shown bellow. But using following code: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} ...
3
votes
1answer
272 views

Align environment {amsmath} inside subfigure {subcaption} breaks figure numbering

When I put an equation in align environment into a subfigure, it breaks figure numbering. In the example below, the whole figure gets number 2, not 1 as I want. How do I fix it? \begin{figure} ...
2
votes
1answer
63 views

Equations alignment in Split enviornment

\documentclass[12 pt]{article} \usepackage{graphicx,epsfig,setspace,subfig,url,amsmath} \usepackage{setspace} \usepackage{indentfirst} \usepackage{listings} \usepackage{array} \usepackage{multirow} ...
2
votes
0answers
285 views

Problem with hyperref and amsmath [closed]

I was running into trouble with hyperref when labeling propositions in the appendix. It would get confused between Proposition 1 (in the main body of the article) and Proposition A.1 (in Appendix A). ...
1
vote
1answer
191 views

Latex math encapsulating complex expression in bracket

Latex newbie here. I've clumsily built the following math expression in Latex \begin{align} &W_{i'}(\alpha) = \cdots \notag\\ &\vdots \notag\\ &W_i(\alpha) = ...
0
votes
0answers
30 views

How to remove indentation when using the aligned environment? [duplicate]

I want to align equations inside an enumeration, so I use the aligned environment and its [t] option to make the first equation appear on the same baseline as the item label: \documentclass{article} ...
11
votes
2answers
564 views

$\VDash$ Symbol in AMS math packages?

I'm trying to typeset some homework that deals with set theory and in particular I'm trying to write the "model-theoretic" notion of forcing. I put model-theoretic in quotes because I don't know the ...
7
votes
1answer
115 views

Is it necessary to give a \\ before \intertext?

I am not sure which one is correct when using \intertext or \shortintertext. Adding \\ before them or not. \documentclass[preview,border=12pt]{standalone} \usepackage{amsmath} \begin{document} ...
6
votes
1answer
153 views

Match upper horizontal line of two fractions with different roots

I'm learning LaTeX and encountered a problem which I'm not able to solve after reading several related problems (e.g.: Align \sqrt with baseline of other mathematical input). I will present my actual ...
1
vote
0answers
95 views

amsmath.sty And bad compilation! [closed]

I am experiencing problems with teXMaker and my latex TeXLive installation. I CANNOT obtain a good compilation from math. amsmath.sty not found error plus a bad pdflatex output (without fractions ...
2
votes
0answers
330 views

Undefined control sequence \nmid [duplicate]

I need to express that "a is not divisible by b" in my LaTeX document. It is my understanding that I should use the \nmid symbol for this case, as in $b \nmid a$. LaTeX gives me the following error: ...
11
votes
2answers
278 views

Equation number enclosing parentheses misplaced with Polyglossia+Hebrew+amsmath

I am compiling the following MWE using XeLatex within TeXnicCenter and get a garbled equation number: \documentclass{article} \usepackage{amsmath} \usepackage{polyglossia} \setmainlanguage{hebrew} ...
5
votes
2answers
189 views

How to redefine the colon-symbol with unicode-math (spacing problem)

I want to change the usual role of : and \colon. Consider the following code \documentclass{scrreprt} \usepackage{amsmath} \usepackage{unicode-math} %\unimathsetup{colon=literal} ...
3
votes
3answers
109 views

Aligning the right hand side of multiline equations

I would like to align the RHS of the multiline equations and assign equation number for whole as one. \begin{multline*} \frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}=\tfrac ...
4
votes
2answers
199 views

equations inside matrix/array — aligning on charater

Suppose I have a system of equations I'd like to present as a vector. Using amsmath, something like \begin{equation} \begin{pmatrix} (2)(2)+(-1)(-3) \\ (4)(2)+(3)(-3) \end{pmatrix} \end{equation} ...
7
votes
2answers
311 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
100 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
201 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
35 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
137 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
149 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
275 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
29 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 ...