{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)

24
votes
6answers
2k views

Bad positioning of math accents for the beamer standard font

With a recent TeX distribution, the easy answer to this question is "load the sansmathaccent package" (which is Ariel's implementation of my answer). Actually, the corrected font should be loaded ...
54
votes
2answers
10k views

Two letter variable names

In math mode, TeX assumes "hidden multiplication" (so that two variable names put nearby have invisible multiplication between), so that, AFAICT, expressions like $ABC$ are rendered with small ...
32
votes
2answers
23k 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: ...
31
votes
4answers
4k views

Should subscripts in math mode be upright?

In one-letter subscripts, like $x_i$, the subscript is usually typeset italic. Is this the typographically right thing to do? Consider this case: The Boltzmann constant is often written as $k_B$, ...
28
votes
6answers
994 views

Is it possible to write all mathematical formulas in a separate file and add them in main file on-demand?

Consider this scenario: I have a report to write and I want to write all mathematical formulas in a separate file and then add them in the main report file on demand (i.e. include/import/add/call a ...
39
votes
4answers
7k 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. ...
19
votes
2answers
9k views

how to select math font in document

I want to show in one document different font examples of math fonts, for example Latin Modern, Times and Charter. I know the command \usefont{T1}{lmr}{m}{n}, but have no idea how to combine that ...
18
votes
3answers
12k views

Math mode in tabular without having to use $…$ everywhere

\begin{tabular}{|l|l|l|} \hline Column A & Column B \\ \begin{math} x & y \\ \end{math} \end{tabular} This won't let me compile and gives a lot of errors, how do I enable math mode in a ...
17
votes
4answers
9k views

Removing spaces between “words” in math mode

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how? E.g., what I get is: 1024 x 768 and what I want is: 1024x768
15
votes
2answers
1k views

How do I get different colors for math and for text?

I want to include something in my LaTeX article that will make all mathematical formulae appear in black, while all text (including everything inside \text{}s in the middle of mathematical formulae) ...
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 ...
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?
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 - ...
19
votes
2answers
9k views

\xRightarrow (text)

I know it's possible to have \xrightarrow (text), but if I try to do \xRightarrow (text) I get an error each time. Does anybody know if it's a syntax error or if there is a other way to produce the ...
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 ...
11
votes
2answers
869 views

Defining scalable “white curly brackets” {| and |} (⦃ and ⦄)

I would like to construct what Unicode calls "white curly brackets" that are in addition scalable. They look like ⦃ (≈{|) and ⦄ (≈|}) and have Unicode codepoints U+2983 and U+2984. unicode-math has ...
10
votes
2answers
6k 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 ...
17
votes
7answers
9k 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
8k 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
9k 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 && ...
13
votes
5answers
2k 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?
12
votes
1answer
4k 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 ...
10
votes
6answers
1k 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 ...
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 ...
3
votes
2answers
608 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 ...
8
votes
1answer
534 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 ...
6
votes
2answers
261 views

Fractions with large elements

What is best practice for typesetting fractions with large objects in the numerator and denominator? For example, fractions with limits, integrals, summations, etc... cause the expressions to look ...
4
votes
1answer
311 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
4k 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 $ ...
50
votes
2answers
11k views

Using \colon or : in formulas?

I noticed that in many documents you encounter $f: X \to Y$ instead of $f \colon X \to Y$. Another example are quantified expressions: $\forall x: P (x)$ versus $\forall x \colon P(x)$. I find the ...
67
votes
3answers
22k 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 ...
10
votes
2answers
35k views

Dot notation for derivative of a vector [closed]

If I want to use the dot notation for the time derivative of a vector is better (more common) to put the dot over the vector, or the other way around \dot{\vec{v}} \vec{\dot{v}} The first says ...
22
votes
3answers
17k views

Bold math: Automatic choice between \mathbf and \boldsymbol for Latin and Greek symbols?

This is a follow-up to this question. Suppose you want to denote vectors by upright bold letters; then \mathbf{u} works fine, except that if it's a Greek letter you have to use \boldsymbol{\omega} ...
32
votes
4answers
1k views

Is it ever bad to use \left and \right? [duplicate]

For mathematics, is it ever disadvantageous to use \left( and \right) in equations? I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( ...
30
votes
1answer
31k 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...? ...
20
votes
4answers
9k 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 ...
4
votes
1answer
884 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} ...
31
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} ...
13
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 ...
12
votes
2answers
682 views

How to make a traditional division

How to make the traditional division? Like that: a |b_ r c
9
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
9k 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
6k 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
7k 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
2k 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} . . . \[ ...
16
votes
1answer
5k 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
13k 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 ...