Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [amsmath]

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

5
votes
1answer
46 views

Equation number messes with horizontal alignment

I have an equation with long lines that doesn't align very well: Equations (9) and (10) are identical except for the equation numbers, and the first line of either equation marginally fits into the ...
6
votes
3answers
154 views

How to align and center standalone amsmath equations?

I had this code produce the following document. I wanted to align a few things. Particularly under the "degree sequence" heading: \documentclass[varwidth,margin=2mm]{standalone} \usepackage{amsmath,...
3
votes
1answer
26 views

Environment to hide number from numbered equations

I'd like to create an environment that hides equation numbers from numbered equations. I'd should work like this: \documentclass{article} \begin{document} % --------------------------- % \begin{...
2
votes
1answer
34 views

Hiding an environment but keeping equation labels and their numbers inside

I want to hide some of the proofs of some lecture notes that are given to students. I defined a new proof environment hiddenproof because I want to only hide some of the proofs. I can then hide this ...
5
votes
1answer
47 views

Why the various definitions of the thin space \,?

Knuths definition of \, is \mskip\thinmuskip. LaTeX changes this definition to \DeclareRobustCommand{\,}{% \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi } \def\thinspace{\kern .16667em } ...
3
votes
4answers
329 views

How to make a small $\varhexagon$ in latex?

I would like to have a command that shrinks down the size of $\varhexagon$ from the wasysym package in latex to a very small size. In principle, $\tiny \varhexagon$ does what I want, but apparently ...
4
votes
1answer
53 views

Interior of Set Notation

I would like to denote the interior of a set using the three letters "int". However, $\int$ clearly doesn't work as that is the integral sign. I would like it to look similar to how "min" looks when ...
1
vote
1answer
34 views

Conflict between some packages

Here are the packages I am using, but it keeps reporting an error: LaTeX Error: Command \theoremstyle already defined. Or name \end... illegal, see p.192 of the manual. Example: \documentclass[...
5
votes
2answers
124 views

Align centered, ragged right and ragged left in align environment

Writing \begin{align*} && a &= b\\ \Leftrightarrow&& b &= c\\ \Leftrightarrow&& c + 2 &= 3 + 5\\ \Leftrightarrow&& d + c + ...
-1
votes
1answer
57 views

“! Package amsmath Error: \begin{alignat} allowed only in paragraph mode.”, what is this?

I'm encountering a issue with amsmath. I'm trying to compile this code: \documentclass[border=1pt]{standalone} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \begin{document} \begin{...
7
votes
5answers
428 views

How do I write a formula in words in LaTeX?

I want to write this equation in LaTeX: This my LaTeX code for the equation: \begin{equation} \nonumber q^*_1 =\frac{\text{number of women who had their second birth in 1971}}{\text{number of ...
2
votes
2answers
36 views

how to write double superscript over \xrightarrow

Instead of one line above the arrow I want to be able to write two lines over it. How can I achieve this? With this code I can only achieve one line: \xrightarrow[]{something}
0
votes
2answers
40 views

How do you type allocation rule?

I am trying to type this allocation rule in to my latex document I can't figure out how would you type it.
11
votes
1answer
307 views

Warn me when the equation number is pushed to the next line

Is it possible to let amsmath warn me when the equation is too long and pushes the number to the next line? I expect either it prints Equation (1) too long to console or it makes the (1) part red. \...
3
votes
1answer
22 views

Centering a symbol with overset

I'm attempting to center the \faPiedPiper symbol over a single letter like so: \documentclass[letterpaper,12pt]{article} \usepackage{fontawesome, amsmath, fourier} \begin{document} $\overset{\text{\...
0
votes
1answer
30 views

Limit controls must follow a math operator

I'm receiving "Limit controls must follow a math operator" error. Googled it, tried, nothing helped. Appears on Overleaf 2.0, using makefile in Cent OS, Fedora. Using pkgs geometry, amsmath, amsthm, ...
2
votes
3answers
69 views

Trouble with long equation in LaTeX

I'm using the following packages: \usepackage{mathrsfs} \usepackage{mathtools} \usepackage{amsmath,latexsym} in order to write the following equation. \begin{eqnarray*} \frac{\partial\mathscr{L}}{\...
5
votes
3answers
162 views

fontspec breaks capital greek letters in DeclareMathOperator

Using fontspec together with amsmath breaks the use of capital greek letters in \DeclareMathOperator. Instead, the greek letter just is omitted. Here is a minimal working example: %! TEX program = ...
1
vote
1answer
32 views

Align exponent and number below each other

I´m trying to align the exponent with a normal number below each other using align. However I´m not able to use the & in the exponent to tell where it should be aligned. The desired output should ...
11
votes
1answer
651 views

Typing Amharic inside a math equation?

I want to type the following Here is my MWE: \documentclass{article} \usepackage{ethiop,amsmath} \begin{document} \[ \int_{\mbox{'alamenahe}}^{\mbox{'abAs}} \mbox{'abAs}=\mbox{'abAs} \] \end{...
1
vote
1answer
28 views

Overset alignment above text and inserted whitespace

I'd like to insert an annotation above equations without breaking the spacing of that equation. The annotation should be aligned to the left, and begin with an arrow that points down on the first ...
1
vote
1answer
44 views

fontspec + amsmath - problem with kerning in math-mode

I have a file that loads a Times-like font and then a package that use the font in math-mode. Everything works fine under pdflatex including proper kerning of \operatorname{} % To be processed with ...
0
votes
1answer
33 views

How to add vertical spacing between definitions

I'm trying to add vertical space between definitions, theorems, etc. For example, if set up something like: \begin{definition} blah blah blah \end{definition} %%%should be space here but there's ...
0
votes
2answers
46 views

argument of @sect has an extra run away argument

I am new to latex, so excuse me. I keep getting "argument of @sect has an extra run away argument" and I don't know how to fix it. Thanks \documentclass{article} \usepackage{amsmath} \usepackage{...
4
votes
1answer
42 views

Create a line break in a subscript-position term

My code is \documentclass{article} \usepackage{amssymb,bm} \begin{equation} \nabla_{\theta} \bm{J}(\theta) = \mathbb{E}_{s \sim T^{\bm{\pi}}, a \sim \bm{\pi}_{\theta}} [\nabla_{\theta} \log \bm{\...
5
votes
4answers
72 views

How to get rid of & in cases environment but still get the same space in the surroundings

Recently I asked a question on chat but I was told that I have to ask it on the main site, so here I am. I am using cases environment to create multiple system of equations separated by a symbol e.g. ...
2
votes
3answers
35 views

Spacing in matrix entities

I will try to get something like in the picture below: I have tried a code but the spacing are quite large compared to the spacing in the picture \begin{equation} \begin{matrix} \xi_1 & = &...
0
votes
2answers
43 views

Is there a way to draw the little black square at the end of proof without using the environment \begin{proof}?

Is there a way to draw the little black square at the end of proof without using the environment \begin{proof}... \end{proof}? I know that one way is like says in this question but I'd like to know ...
2
votes
1answer
44 views

How to type summation notation with a vertical line in Latex?

I need to type the following summation symbol in Latex. Could anyone help me? Literally, there needs to be a vertical line in a summation symbol, and $\hat{\beta}_2$ is just a subscript. Thanks in ...
2
votes
2answers
32 views

Centering math while having comments to the right

I'm trying to have math like in the gather* environment, where the math equations are centered within their space, but also have comments to the right explaining the steps. How can I do this? Below is ...
5
votes
2answers
117 views

Border strip tableau

I would like to draw border strip tableaux in Latex. Such a tableau is a tiling of a partition shape (or skew-partition shaped) diagram with labeled border strips such that in each row and column, the ...
4
votes
2answers
50 views

Renewcommand with ensuremath and brackets

I'm making a .sty file (which is called my-macros.sty and is in my home /texmf directory) where I define some commands that I constantly use. Among these commands, there are the following \newcommand{...
1
vote
2answers
67 views

How to align a variable whose sign is absent with a variable whose sign is present while both are inside `\begin{cases}\end{cases}`?

I can't seem to align variables properly since one of them leaves its sign behind on alignment. \documentclass{standalone} \usepackage{amsmath} \begin{document} % NO ALIGNMENT $\begin{gathered} |x|= ...
2
votes
1answer
47 views

Vertical spacing in fraction unbalanced [duplicate]

I have some math structured like the following in a display math environment: \left( \frac{ \left( \frac{a}{b} \right)^{e} }{L} \right) Apparently, the outer fraction is centered vertically in the ...
3
votes
1answer
35 views

Aligning reaction equation with amsmath

Basically, I'm trying to use amsmath to align the 2 possible outcomes of a reaction, which naturally does not include an equals sign. \begin{equation} \ce{^{2}_{1}H} + \ce{^{2}_{1}H} &\rightarrow ...
0
votes
1answer
44 views

Align doesn´t align equations at equal sign [closed]

I´m trying to align multiple equations below each other using align. However the equations are aligned at the right end instead of centered and aligned at the equal sign. My Latex code looks like ...
1
vote
2answers
72 views

Is it just me or $f(x) = x^2 + 17 \mod 43$ adds too much space before the mod operator?

\documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} Instead of $f(x) = x^2 + 17 \mod 43$, I prefer $f(x) = x^2 + 17\hspace{-1mm}\mod 43$. \end{document} Why was the modulo ...
3
votes
2answers
46 views

Alignment building blocks: in center and normal math fonts

I want a style like the 1., 2. and 5. in the figure, but make the "0" aligned in the center with the top equation. In other words, I like the alignment of 3. in the figure, but I want the fonts to ...
0
votes
2answers
43 views

Using different fonts for theorem label in header

In the accepted answer to Put current theorem-like item's name/number in header it's shown how to put the label of the current theorem in the header. Is there a way to use two different fonts for the '...
2
votes
0answers
45 views

Change main font without affecting the math environment

I changed my document font from the default one to Akkurat with setmainfont from fontspec: \usepackage[no-math]{fontspec} % ... \setmainfont{}[ Path = fonts/AkkuratPro/, UprightFont = ...
4
votes
1answer
62 views

Align vector symbol with upright math letter

So basically I need to put a vector symbol (\vec) on an upright letter for which I use \mathrm in math mode. For example: \vec{\mathrm{E}} While Katex seems to get the alignment right on all the ...
1
vote
1answer
32 views

How to ensure the statement about 'a' does not become centered and moved from “For every”

I wrote this in latex and the 'a' contained in (0.1) became centered and I need it to remain part of the sentence. Please help if possible. Thank you.
1
vote
1answer
31 views

Using align property for equations without numbering, when referencing other equation number

I am trying to create a master list of equations (called 'Models'), which are then referenced in main text (the idea is that not all the equations in the master list appear in the main text). I would ...
1
vote
0answers
16 views

`\adjustlimits` does different things if different order

The MWE \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \[ \adjustlimits\lim_{x\rightarrow 1^-}\lim_{n\rightarrow\infty}\,\sum_{k=0}^n a_kx^k =\...
1
vote
2answers
65 views

Underscript, subscript and superscript add the same time possibly via \mathoperator* without trailing space

I have a symbol, which I want to give a underscipt, subscript and superscript. I tried: \DeclareMathOperator*{\wmat}{w} \wmat_2_i^j But now I get a space between my symbol and the sub and ...
5
votes
0answers
47 views

Can you have a bibliography of equations?

I am creating revision notes for a Mathematics module at university and I was wondering if there was a way to take all of the equations that I have written throughout the document and have them all ...
1
vote
1answer
94 views

Package amsmath Error: Multiple \label's

Sorry about the previous errors in the code. Could any one help with the numbering in the \overset or \underset in equations? I need to add number above/below certain variables in the equations ...
3
votes
1answer
32 views

Alignment of equations with implies and equals to

In amsmath package, the following doesn't get aligned properly. Here is the code. \begin{alignat*}{2} & 0 &= \dfrac{1}{4}(2(-1)+1)+C\mathrm{e}^{2(-1)}\\ & \implies 0 &= \dfrac{-1}{4}+...
2
votes
1answer
84 views

Prime in sequences

I would like to type prime above n in phrases: a_n\prime but I need help. Prime is next to a_n. I'm using: \usepackage{amsmath} and I should expect this as in the image that I have attached.
4
votes
1answer
54 views

Bad neighbours: amscd and mtpro2

The following code shows how amscd and mtpro2 do not play well together with the subscriptcorrection option enabled: \documentclass{article} \usepackage[subscriptcorrection]{mtpro2} \usepackage{...