{math-mode} is about typesetting mathematical content, e.g. tweaking the appearance of spacing and symbols in a formula, or producing specific mathematical constructs. For questions about "wrapper" environments like equation or align, consider the tag {equations}.

learn more… | top users | synonyms (2)

13
votes
3answers
4k views

How to raise a subscript?

For some reason, I need to write a “minus” sign as a subscript on some symbols, but if I simply write $\Pi_{-}$ the result looks kind of odd. I've found that $\Pi{\scriptstyle -}$ looks reasonably ...
13
votes
1answer
6k views

How can I have a bigger integral (\int) delimiter?

I'm writing some integrals and I don't like the way the \int symbol is displayed when it is followed by a big delimiter. Here's the code: \[ \int_S\biggl(\nabla\times\bar B - \mu_0\bar J - ...
18
votes
1answer
3k views

How to use more than 10 tab stops in \bmatrix?

I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
14
votes
4answers
2k views

Draw a line through one column of a matrix

I'd like to "cancel" (draw a line through) a column of a matrix (using \begin{pmatrix}..\end{pmatrix}). How can I do this?
9
votes
1answer
2k views

Decimal Long Division

Does anyone know of a package or macro that handles decimal long division? For example, I want to convert 3/8 to a decimal and show all of the steps. I found a macro for longdiv that works great for ...
17
votes
7answers
8k views

Average integral symbol

Is there in LaTeX a symbol or a macro for the average integral with a horizontal slash? I know about \strokedint, but I'd prefer the dash to be horizontal.
14
votes
4answers
7k views

Diagonal dots spanning multiple lines/columns of a matrix

I'm filling in large sparse matrices, for example \begin{bmatrix} 0 & -2 & 1 & & -1 & 2 \\ 2 & \ddots & \ddots & \ddots & & -1 \\ ...
14
votes
3answers
8k views

Footnote in math mode

How can I insert a footnote into math mode? I tried this (with required packages) \usepackage{amsmath} \usepackage{hyperref} \usepackage{ccaption} And i.e if I try \begin{eqnarray} foo && ...
10
votes
6answers
950 views

A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
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 ...
3
votes
2answers
494 views

Stealth arrow in math?

Is there an easy way to produce stealth style arrows in normal math mode? By "stealth" I'm thinking of TikZ stealth arrowhead. Something like \rightarrowstealth? The question originates from a limit ...
13
votes
5answers
1k views

Double superscript error involving tilde

When I write {{\tilde{C}}^{0}_{har}}^{\Gamma} (or the same with fewer curly brackets) in Tex I obtain a double superscript error and I can't solve it. Does someone know how to fix this?
8
votes
1answer
477 views

Can I redefine the dollar

I want to capture the math mode through a redefinition of the $. I thought about something like \def$#1${here was a formula} % to test $x+y=z$ I would expect "here was a formula" as output. Is it ...
4
votes
1answer
277 views

Typing Following notation in Latex [duplicate]

I need to generate following notation in LaTeX. It's used in differential geometry to denote vector fields. I can't find documentation and detexify is not helpful either.
3
votes
1answer
3k 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 $ ...
61
votes
3answers
19k views

What's the difference between \mathrm and \operatorname?

I apparently can't see the difference in a compilation (pdflatex) between \mathrm and \operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what ...
30
votes
2answers
20k views

\bm package versus \boldsymbol

I'm typing a bold vector small x with a tilde sign above it. Now when I want to write its derivative, I'm putting a dot on top of everything. This is giving me problems and I found one solution: ...
22
votes
5answers
8k views

What's the best way make an “augmented” coefficient matrix?

When studying systems of linear equations, it's nice to remind people that the last column of the coefficient matrix holds the constants. This is often done in books by putting a vertical line ...
26
votes
1answer
26k views

How to color math symbols?

One can use the command such as \textcolor[rgb]{1.00,0.00,0.00}{boundary} to color the word "boundary" in a document. Here is my question: How to color the math symbols in $$? For example, can one ...
24
votes
4answers
4k views

Numbers outside Math environment

Should numbers inside the text be placed inside a math environment? For example, if I am writing ...indent code by 4 spaces..., should I write it this way or ...indent code by $4$ spaces...? ...
34
votes
4answers
6k views

Should I \mathrm the d in my integrals?

When writing an integral, it seems like something should be done to separate the "d", as in \int f(x) dx, so as not to confuse it with a variable. I've seen it left as-is, bolded, and straightened. ...
30
votes
5answers
3k views

How to automatically resize the vertical bar in a set comprehension?

I have a simple command which I use to write set comprehensions so that the braces automatically resize with respect to size of the enclosed arguments, e.g. \usepackage{amsmath} ...
20
votes
4answers
8k views

Bold italic vectors

I am trying to display vectors as bold and italic. The command \mathbf sets the letters non-italic. I also googled a bit and stumbled upon \mathbf{\em y} or \mathbfit{y}, which all didn't work. I ...
12
votes
4answers
2k views

What is the correct way to do delimiters?

I've always used \left and \right with my delimiters, but Martin Heller's answer to another question indicates that this method gives incorrect spacing. The correction appears to be prepending ...
4
votes
1answer
814 views

How can I add some enhancement to the matrix [duplicate]

Possible Duplicate: Highlight elements in the matrix \documentclass[12pt,a4paper]{mwrep} \usepackage{amsmath} \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5} \begin{document} ...
12
votes
2answers
580 views

How to make a traditional division

How to make the traditional division? Like that: a |b_ r c
10
votes
3answers
2k views

Arrow between parts of equation in LaTeX

I want to make an arrow under an equation pointing from one part of the equation to another. A bit like an underbrace, but with an arrow. How can I do this?
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} ...
8
votes
1answer
1k views

How to organize labels when there are too many equations?

I'm writing a moderately long text using LaTeX, and it's great to be able to organize chapters, sections, appendices, and everything else almost automatically. One thing has been bothering me though. ...
19
votes
2answers
3k views

How can I prevent LaTeX from breaking inline formulas globally?

I am using the acmsmall template and my inline formulas are being broken at equal signs and arrows; how can I prevent them from being typeset like that globally (i.e. without having to put tildes ...
16
votes
4answers
8k views

How to typeset indices before a symbol?

I know how to write a usual index with the help of the underscore, but I seem to be unable to find out how to write an (upper/lower) index in front of a letter/text. These kind of indices are common ...
16
votes
1answer
5k views

How to reference equations using letters and numbers

Sometimes it is convenient to refer to a group of equations by a letter and a number. For example: 2+1 (A1) 2+4 (A2) x^4 (B3) x^e (B4) Placing ...
10
votes
2answers
6k views

A lateral brace to group a set of equations with labels

I have a set of equations that I'd like to display together (as an example, the Maxwell's equations). Requirement #1: I'd like to have them labelled like in an align environment \begin{align} ...
5
votes
2answers
1k views

Underbraces in Matrix Divided in Blocks

How to put underbraces, inside the parenthesis of a matrix, to name both sides of the blocks? \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{array} \begin{document} . . . \[ ...
14
votes
3answers
17k views

How to write a function (piecewise) with bracket outside?

How to write this Piecewise function using LaTeX? I tried $ \begin{array}{cc} \{ & \begin{array}{cc} 0 & x\leq 0 \\ \frac{100-x}{100} & 0\leq x\leq 100 \\ 0 ...
14
votes
1answer
4k views

How To Change Math Font Only?

I'd like to keep my text in Helvetica as usual but would like to have my equations and formulas in Roman or MT Extra. So far, I've tried using different packages but that changes both the text and the ...
13
votes
3answers
11k views

Supremum of the infimum

Consider the following snippet: $$\text{d}_{H}(A,B) = \max\left\{ \sup_{a\in A} \inf_{b\in B} \text{d}(a,b),\sup_{b\in B} \inf_{a\in A}\text{d}(a,b)\right\}$$ In the output, the text under the ...
11
votes
6answers
444 views

Typesetting 144…4 with “n times” under the 4's is easy, but what about \sqrt{144…4}?

Inspired by this question on the math StackExchange, suppose you want to typeset the square root of the number 144...4, that is, 1 followed by n 4's. If you write $\sqrt{1\underbrace{44\ldots4}_{n\ ...
10
votes
3answers
599 views

How to create vertical and horizontal dotted lines in a matrix?

Similar to this question, I am trying to output a similar matrix with dotted line instead of dashed line. Is there anyway to do this? I also try to use these three packages: ...
10
votes
2answers
5k views

How to make math font huge

I would like to typeset a simple-to-medium-difficulty math formula on an A4/letter paper. It needs to be huge and preferably centered and portrait. I can take care of the paper size, the orientation ...
10
votes
2answers
2k views

Force line break inside a \lim argument in align environment

Inside an align environment I have a \lim with two variables which should be displayed in two lines: \begin{align} ... f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\ ...
14
votes
2answers
379 views

Why does \widehat behave differently if I insert \hspace{0pt}?

I am getting some inexplicable behaviour from \widehat: \documentclass[12pt,a4paper]{article} \usepackage{amsfonts} \begin{document} \[ \fbox{$\widehat{\mathcal{C}}$}, ...
12
votes
4answers
2k views

How to edit the linear programming in LaTeX?

How to edit a linear programming as the following: Max z = x1 + 12x2 s.t. 3x1 + x2 + 12x3 ≤ 5 x1 + x3 ≤ 16 15x1 + x2 = 14 xj ≥ 0, j=1,2,3. I want the format to be ...
8
votes
4answers
367 views

How to construct a long equation that is split in LHS and RHS to occupy a narrow column?

I have a homework document using 2-column article document class as follows. \documentclass[twocolumn]{article} \usepackage[a4paper,margin=1cm]{geometry} \usepackage{amsmath} \begin{document} ...
7
votes
1answer
1k views

Coloured math in beamer

I have a question: Is there any way to have math (everything between $s) in different colour than text (for example, green) in beamer?
7
votes
7answers
3k views

frown and mathop/stackrel/overset

I need something like \stackrel{\frown}{MM'} to express the fact that MM' is some path. But I am not really satisfied by the look of the result. The \frown is too high. Would you please have a ...
5
votes
2answers
2k views

How to put something at the top of the \longrightarrow?

I would like to put something at the top of the \longrightarrow, something like \longrightarrow^{k\rightarrow\infty}. However, instead of putting k\rightarrow\infty on the top right corner, I would ...
0
votes
2answers
723 views

\begin{equation}: “Display math should end with $$” error?

I'm pretty new to LaTeX, completely new actually, and there is one thing I can't quite understand. I get the error "Display math should end with $$" when writing an equation like this: ...
13
votes
1answer
295 views

\ifmmode doesn't seem to work correctly inside an array environment

I’m struggling with getting \ifmmode to work correctly when used inside an array environment which is inside a displaymath environment. Here is a minimal example: \documentclass{article} ...
12
votes
1answer
3k views

How can I position equation numbers always to the left side?

Equations and amsmath environments put equation numbers to the right side by default, the output of \begin{multline} some equation \end{multline} is: equation (number) How can I change it this ...