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

learn more… | top users | synonyms

9
votes
1answer
389 views

Diagnosing the “too many math alphabets” error

I recently hit up against TeX's "too many math alphabets" error. I'm trying to diagnose what is using up my math alphabets, as I can't work out where they are going. Of course, I could just start ...
9
votes
2answers
1k views

Broken matrix - gaps in brackets

This is my minimal working example. \documentclass[12pt,a4paper]{mwrep} %\usepackage{amsfonts} \usepackage{amsmath} %\renewcommand\baselinestretch{1.5} \begin{document} \chapter{Example} ...
9
votes
1answer
2k views

Does amsmath provide any medium to auto-break equations?

I'm writing large equations in texlive with amsmath, and I want them to be automatically broken at the end of the line. Is there any way to do that with amsmath? What would you recommend me to do ...
9
votes
1answer
389 views

What causes this strange interaction between glossaries and amsmath?

MWE: greatly trimmed from a large document; XeLaTeX; full TeXLive2012 completely up-to-date: \documentclass{memoir} \usepackage{fixltx2e} \usepackage{amsmath} \usepackage{mathspec} ...
9
votes
1answer
89 views

\@ifnextchar inside pmatrix?

I created a function which handles a superscript followed after the function. I do that by using \@ifnextchar^. Everything works well, except in any pmatrix environment. Why? As a quick-and-dirty ...
9
votes
1answer
273 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!
9
votes
1answer
191 views

Ensuring that vertical space is consistent in list of polynomials

\documentclass{article} \usepackage[fleqn]{amsmath} \usepackage{mathrsfs} \usepackage{amsfonts} \pagestyle{empty} \setlength\mathindent{0pt} \begin{document} \[3x^3\] \[3x^2\] \[3x\] \[3\] ...
9
votes
1answer
2k views

Referencing subequations with cleveref

I try to refer to the parent number of subequations with \cref from the cleveref package. However, I would like to change the output "eq. (...)" into "eqs. (...)" when I refer to parent numbers ...
9
votes
1answer
2k views

Why doesn't lineno number a paragraph when it is followed by an indented equation?

While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included, e.g. the ...
9
votes
1answer
1k views

Putting limits *underneath* new operators

I'd like to declare a new math operator called the "strong limit" as follows: \DeclareMathOperator{\slim}{s-lim} So it's just "lim" (i.e., \lim), but with an "s-" in front. I want to be able to ...
9
votes
2answers
1k views

Lower overbrace in math enviroment

I would like to achieve the following inside an math environment But i can't get the text below the equation \operatorname{min} \left| \overbrace{\text{Hadamard product}}^{\begin{pmatrix} X \circ X ...
9
votes
1answer
512 views

Alternative ways to format the cases environment in display math-mode

The cases environment of amsmath package is useful for defining a function that takes different values in different regions. For example: \documentclass{article} \usepackage{amsmath} \begin{document} ...
9
votes
2answers
236 views

Cleveref: Parentheses around references to subequations using \labelcref

Using the Cleveref package (v0.19) i have a problem with missing parentheses when referencing to subequations, using the \labelcref command. Here is a MWE: \documentclass{article} ...
9
votes
1answer
539 views

ignoring vertical space due to overbraces in cases environment

In the following formula, I would like to change the rendering such that the lower end of the "cases" brace looks as if there were no underbraces. Is that possible? I already tried \smash and negative ...
9
votes
1answer
9k views

Aligning the right parts in multiple \begin{cases}

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than ...
9
votes
1answer
2k views

Vertical spacing before and after equation environment: empty line or not?

The vertical spacing in front of and behind the amsmath equation environment is different whether I insert a blank line or not (im using KOMA-Script with parskip=half if this is important). I'd like ...
9
votes
2answers
529 views

amsmath align within list

In the code below, the equation within the itemize environment is too wide for the page, but I don't get an overfull hbox warning (which I find annoying because it's sometimes useful to know exactly ...
8
votes
3answers
20k views

How can I use an align environment flush left?

Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page? MWE: \documentclass{article} ...
8
votes
2answers
292 views

Writing specific versions of an operator for display and inline modes

I'm busy answering a question by constructing a new math operator that uses the sum symbol and some TikZ placed on top. My answer as it stands can be found here. It looks (I think) pretty good in ...
8
votes
2answers
298 views

Boxed equation with number

My minimum working example: \documentclass{report} \usepackage{amsmath} \begin{document} \begin{center} \boxed{K_{k+1}=P_ka_{k+1}^T(a_{k+1}P_ka_{k+1}^T+I_N)^{-1}} \end{center} \end{document} ...
8
votes
3answers
203 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 ...
8
votes
4answers
565 views

How to add partial horizontal lines in horizontally aligned math environments

I'm having trouble writing a proof of a theorem in LaTeX, where I need to sum a set of inequalities and continue the proof with this sum. The problem I have is that I'd like to introduce this step ...
8
votes
3answers
407 views

How to force alignment of “cases” brackets in an enumerate environment?

I am using the enumitem and amsmath packages to give the recursive definition of the valuation function $\nu$ for classical first order logic. The way I have it set up, the brackets of the cases are ...
8
votes
2answers
2k views

In exponents, parenthesis too small, \big too big

When something big (a fraction, a sum, an integral...) appears within a pair of parenthesis, one can typically use \left(...\right) to get delimiters large enough to surround the contents. The ...
8
votes
3answers
3k views

How to put your symbol explanation for the formula?

I have a formula written in LaTeX. What is the best way to explain what the symbols mean in the formula? For example I have this equation with a where: symbol definitions \begin{equation} ...
8
votes
2answers
321 views

Is $ … $ okay to use, while $$ … $$ is not recommended? [duplicate]

Possible Duplicate: Are \( and \) preferable to $? According to Why is \[ ... \] preferable to $$?, $$ ... $$ should not be used. My understanding is, it is because $$ ... $$ is not ...
8
votes
3answers
958 views

How do I make the \min and max bold?

Refering to this question How to make the table fit into the column? How should I make the \min and \max bold?
8
votes
2answers
816 views

\frenchspacing not setting the space factor codes correctly?

When I type \showthe\frenchspacing, I get the following output: > \frenchspacing=macro: ->\sfcode `\.1006\sfcode `\?1005\sfcode `\!1004\sfcode `\:1003\sfcode `\;1002\sfcode `\,1001 . Shouldn't all ...
8
votes
4answers
757 views

Better transitive closure of labelled arrow

I think the answer will be easy, but I haven't found it yet: I use labelled arrows like \xrightarrow\tau a lot. Sometimes, I need the transitive closure of such relations, which I write ...
8
votes
2answers
1k views

How to get the AMS mathbb font while using Palatino elsewhere

I'm a Latex user. I've been using Palatino for typesetting a piece mathematical text: \usepackage{mathpazo} \usepackage[scaled=.95]{helvet} \usepackage{courier} The results are good, however I ...
8
votes
3answers
213 views

Reduce space between 'genfrac' and indices

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

Clash between aligned environment and TikZ?

The following code mis-renders the multi-line label: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{equation} \begin{aligned} \begin{tikzpicture} \node (A) at ...
8
votes
5answers
6k views

How to properly subscript in a superscripted fraction?

the title says it all. It attached a MWE to display the different relative sizes of a subscript within a normal fraction and a superscripted fraction. As you can see, in the superscripted fraction the ...
8
votes
3answers
7k views

AMS Split inside AMS Align

I'd like to have multiple lines inside a single align cell like so: \begin{alignat*}{1} = & \begin{split}x+\\ y\end{split} \end{alignat*} But I get an error like: \end{alignat*} \An extra ...
8
votes
2answers
369 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} ...
8
votes
1answer
3k views

Minimum length for \xrightarrow

I want to place text over arrows. The obvious choice is to use the amsmath command \xrightarrow{#1} However, sometimes the text above may be a single digit: %Example 1 \xrightarrow{1} other times ...
8
votes
2answers
135 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 ...
8
votes
2answers
187 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 ...
8
votes
2answers
202 views

How to align multiple symbols for a long equation?

\documentclass[11pt]{article} \usepackage{xfrac, array, tabu, multirow, graphicx, setspace, dcolumn, tikz} \usepackage[fleqn]{mathtools} %the argument for d specifies the maximum number of decimal ...
8
votes
2answers
1k views

\mathrel conflict with \left,\right,\middle

I refer to this question and particularly to this answer. I defined \set by \usepackage{mathtools} ... \DeclarePairedDelimiterX\set[2]{\{}{\}}{#1 \mathrel{\delimsize|} #2} where ...
8
votes
1answer
734 views

Amsmath has problems with $e^{\sum{x}}$

Running the code: \documentclass{article} \usepackage{amsmath} \begin{document} Test: $e^{\sum{x}}$ \end{document} Dies, yet it runs just fine with the \usepackage{amsmath} commented out. The logs ...
8
votes
1answer
2k views

Trick LaTeX into doing double superscripts

I have a function in my .sty sheet that does a second partial derivative: \newcommand{\hpartdsq}[2]{\dfrac{\partial^2 #1}{\partial #2 ^2}} But I'd like to pass it something that already has a ...
8
votes
1answer
1k views

eqref in captions with mathtools

I've now tried mathtools for the first time, for the sake of showonlyrefs. It works fine, except if I put an \eqref command into a figure caption, in which case I get: ! Argument of \@caption has an ...
8
votes
2answers
634 views

Is it possible to typeset text inside math without amsmath?

Is it possible to typeset text properly inside math without amsmath? Typically I typeset short text using mathrm, or text (amsmath) within equation: $M_\mathrm{effective mass}$ $M_\text{effective ...
8
votes
1answer
251 views

\vec{p_{\bar p}} renders strangely

When I do: \vec{p_{\bar p}} I get: instead of with the \vec shifted over a bit. Why does this happen? (Also, \vec{\mbox{p_{\bar p}}} renders identically, even though \mbox{p_{\bar p}} looks ...
8
votes
1answer
152 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, ...
8
votes
1answer
153 views

Adaptively sized delimiters that don't go beyond the size of \bigl and \bigr

I would like adaptively sized delimiters, but only up to \bigl/\bigr-size. That is, there is variation only between ordinary/normal size and one size higher. \documentclass{article} ...
8
votes
1answer
153 views

\cee command (from mhchem package) doesn't allow \\[10pt]

when using \cee command (from mhchem package) within align environment, \\[10pt] doesn't work. It works in align environment without \cee. Is there a workaround? here is a MWE: ...
8
votes
2answers
107 views

Please help me input the following formula correctly

This is the formula I want to be made in LaTeX. The problem is to make this formula aligned. I've made something like this \begin{gather} 1 = \cos \, (\bar x, \bar x) = \cos^2 \, (\bar x, x) + ...
8
votes
2answers
190 views

Delimitershortfall in align environment

Can you explain why the \delimitershortfall cannot be modified inside a align environment? This is a MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...