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

41
votes
2answers
8k 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 ...
35
votes
6answers
1k views

Microtypography on equations

Is there a way to make all three lines of math in the code below take up the same amount of length by use of font expansion? I know too little about microtype to even see if it could offer a solution. ...
9
votes
2answers
24k 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 ...
61
votes
5answers
2k views

{(x+y)}^2 or (x+y)^2?

This expression is just an example, of course. My question is: should one always specify the quantity being exponentiated by surrounding it with braces, or is it acceptable to drop those braces? ...
24
votes
5answers
4k views

Is there a wider equal sign?

I have defined the equal by definition sign: with this code: \newcommand{\eqdef}{\overset{def}{=}}. However, "def" extends over the edges of the equal sign. Is there a wider equal sign to use?
11
votes
1answer
819 views

Which version of LaTeX permits more than 16 alphabets?

Sometimes I receive a message: ! LaTeX Error: Too many math alphabets used in version normal. I know that there is a limit of 16 alphabets at most allowed to one article. However this message ...
27
votes
4answers
2k views

When to use math mode?

In my document, the numbers inside math mode appear differently than those numbers out. Sometimes, I have numbers like "10 squared" within a paragraph, so it seems useful to use $10^2$. However, maybe ...
20
votes
1answer
448 views

How would one design a math font?

There are (some very nice) text fonts which do not have math support. Though there are ways to 'remedy' this, such as the mathastext package and some others, these are hardly satisfactory. All accents ...
13
votes
2answers
20k views

How do you get \mathbb{1} to work (characteristic function of a set)?

I am trying to get the digit one printed the \mathbb{} font in math mode, however the command \mathbb{1} outputs some rubbish. I certainly saw the character I am after in some pdf's generated from ...
9
votes
3answers
3k views

Commutative diagram with rounded arrows

I want to draw a diagram which has some arrows between to points A and B. First arrow goes straight from A to B and above it should be a $\Psi$. Second arrow goes in a round way from A to B and above ...
25
votes
2answers
17k 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: ...
20
votes
3answers
9k views

Dot Derivative Discrepancy

I am trying to typeset some higher-order time derivatives using the dot notation, and I've noticed something strange. The expressions $\dot y + y = \cos(\dot y)$ $\ddot y + y = \cos(\dot y)$ give ...
16
votes
1answer
476 views

Which command should I use for textual subscripts in math mode?

Textual subscripts like in W_{total} should be typeset in an upright text font (so that code isn't good practice), as has been discussed in various questions here. Now there are several ways to ...
16
votes
3answers
2k views

Color box with rounded corners around a fragment of a formula

Is there any way in TeX to highlight some part of a formula with a box having colored background and rounded corners? At present, I need to export such formulas into an image, add those highlight ...
9
votes
2answers
731 views

Fixing a code to highlight formulas and text on several lines

In this post I've found the following amazing code to highlight text on several lines. The problem is that code dosen't work well with formulas : for example, fraction using the mode display are ...
8
votes
1answer
918 views

Using \DeclareMathVersion

It is my understanding that \DeclareMathVersion can be used to switch between math font variants. I am wondering how this can be used in a document that leverages two fonts: Times Roman for body text ...
24
votes
4answers
2k views

How to get a good “divisible by” symbol?

In addition to the "divides" relation, denoted b | a, there is also a "divisible by" relation expressing the converse (a is divisible by b), often designated with three vertical dots. Up until now, ...
20
votes
2answers
4k views

Is there a difference between the `displaymath` and `equation*` environments?

The amsmath documentation says Basic LaTeX doesn’t provide an equation* environment, but rather a functionally equivalent environment named displaymath. Are they really the same or is there a ...
16
votes
2answers
11k views

Differences between \stackrel and \stackbin

What are the differences between \stackrel and \stackbin? In what situations is it better to use one or the other?
16
votes
2answers
3k views

Period after math-mode equation

If I write If $x \rightarrow y$, then $y \rightarrow z$. it looks fine. But if the sentence is more involved and formulas longer, I tend to change $...$ to \[...\]. In many cases I think the result ...
15
votes
1answer
548 views

How to fix the math-spacing when a lot of \phantom, \mathrlap, etc. are used?

This question led to a new package: underoverlap Introduction Based on this question and then this question, I'm trying to perfect the \overunderbrace macro. Right now, I'm trying to get the ...
15
votes
2answers
2k views

Common baseline in TikZ and Mathmode [duplicate]

Possible Duplicate: How to align a series of TikZ pictures at the baseline I want to mix my formulas with some TikZ graphics. For example: \documentclass{article} \usepackage{tikz} ...
10
votes
4answers
4k views

Is there a Copy-and-Paste List of Popular Math Formulas?

I prepare lessons for my students in printed form as well as on a Wordpress blog. All my prep is done in a simple text editor in Markdown, and I have generally avoided putting in math formulas and ...
10
votes
2answers
634 views

Is there a command for large middle delimiters consistent with \bigl and \bigr?

After browsing through related threads, I am now of the understanding (please correct me if I am wrong) that the rule of thumb is to use the \bigl,\bigr pair with brackets, parentheses, etc. for ...
9
votes
4answers
7k views

Is there an equation editor for Windows?

Is there anything like LaTeXit, a Mac-only program, that converts math equations into LaTeX code, for windows?
22
votes
1answer
5k views

\varepsilon vs. \epsilon

I cannot remember anyone writing the letter epsilon in any other way than \varepsilon in any math class; but in LaTeX \epsilon and \varepsilon are different symbols. Do anyone of you know why there ...
19
votes
2answers
25k views

Is there a circle symbol?

Is there a circle symbol for the composition of two functions? Or do I have to resort to using other ways to represent that?
16
votes
3answers
2k views

Is \mathrm really preferable to \text? [duplicate]

It seems to be the de facto standard to use \mathrm for upright letter notation in math mode as opposed to \text. Would it not be better to use \text in general? One particular problem I am thinking ...
14
votes
2answers
5k views

Limits under multiple \sum

I would like to place a lower limit under two consecutive \sums, somewhere in between. So I have \sum_{j=1}^{\infty}\sum_{k=1}^{\infty} and would like to place j>k in the lower limit between the ...
13
votes
2answers
2k views

How can I change the whitespace above and below math displays?

I'm looking to squeeze an article written in LaTeX with amsmath to a set number of pages. In the text, I have a number of numbered math displays which I refer to throughout. However, they take up ...
12
votes
2answers
6k 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 ...
10
votes
1answer
307 views

Correct alignment of multiple-line inequality

I want to display a set of inequalities to look like the code below this is the lower bound ≤ this is the thing to be bounded ≤ this is the upper bound My attempt to do this is the following: ...
10
votes
3answers
5k views

How to provide a definition for symbols in a LaTeX math equation?

Say I have an equation: x = R + E What's the best way to provide a definition for R and E? Is there a way to include a line under the equation saying what the variables mean (i.e. a "where" ...
10
votes
5answers
2k views

How do I stack more than two arrows in math mode?

The command \rightrightarrows (from amssymb) draws two arrows, one on top of another. How do I get three arrows arranged in a similar fashion? An example of this (and other fancy arrow stackings) ...
6
votes
3answers
8k views

Making a shorter minus

I am doing some display typography with an equation in it using the mathpazo package. At one point I have this fraction: $\sqrt{-\frac{1}{9}}$ To me, the minus looks too long. I would like to make ...
16
votes
2answers
6k views

Force upright Greek letters with isomath

The isomath package makes it possible to typeset upright Greek letters via \mathrm and \mathbf. Is it it possible to force all Greek letters to be typeset upright unless specified otherwise, e.g. to ...
14
votes
3answers
4k views

\hfill in math mode

Is there any easy way of declaring a new command which emulates \hfill in math mode. I don't want flalign or something similar. I want to use the command in the same way (and with the same freedom) I ...
13
votes
1answer
211 views

How to find out if a math list consists of a single character?

When accents are placed, the TeX engine gives single characters a special treatment; see the TeXbook, Rule 12 on page 443. See also this question and its accepted answer for details. Thus, ...
13
votes
2answers
717 views

two fonts in math mode

In math mode (e.g. between $ $) I would like to use by default computer modern math but to define a new character with a different font e.g. mathpazo. Practically, i want to define a new command ...
13
votes
4answers
4k views

Intertext vertical spacing

How do I reduce the vertical spacing of \intertext?
12
votes
3answers
3k views

Calculator style base 10 notation in LaTeX

What is the best way to write something like 6.22E-21 in LaTeX, given that I don't want the numerals to be \tt, I do want the E to be small, and I may want the exponent to be negative (without the ...
11
votes
1answer
2k views

How do I create the negated arrow on \xrightarrow?

Say I have $x\xrightarrow{\rm mb}y$ as in the first line below, but I want a negation symbol like the one defined in \nrightarrow, as in the second line, but extendable. Does anyone know how I can do ...
11
votes
2answers
11k views

Cursive lowercase ell

What is the easiest way to make a cursive lowercase ell in latex math mode?
10
votes
2answers
196 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
10
votes
2answers
6k views

How to get less spacing in math mode

LaTeX commands like this: Here again, four different simulations are run on networks of size $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and ...
10
votes
5answers
6k views

How can I get a big cross to denote a generalized cartesian product?

I'm trying to get a big cross which I can subscript in order to denote a generalized cartesian product (much like how \bigcup works for generalized unions). How can I accomplish this?
9
votes
4answers
9k views

Typeset mathematical symbols also in sans serif font?

For creating the graphics for my thesis (function graphs, flow charts, line art sketches) I've chosen to use the sans serif font by \renewcommand\familydefault{\sfdefault} However when I use ...
9
votes
4answers
1k views

Substituting character $l$ with $\ell$ throughout math mode

How do I overwrite the default $l$ character so that it is substituted by $\ell$ throughout math mode? (More generally, is there an easy way to make such symbol substitutions?)
8
votes
2answers
230 views

How can I use color in a mathematical expression without losing horizontal spacing?

How can I use color in a mathematical expression without losing horizontal spacing? \documentclass{article} \usepackage{xcolor} \definecolor{red}{HTML}{dd0000} \begin{document} \[3+(-5)-2+3\] ...
8
votes
1answer
318 views

Can I make siunitx commands use serif fonts like the rest of the math in beamer?

In a beamer presentation I can use \usefonttheme[onlymath]{serif} to typeset the math in a serif font while the rest of the presentation is in a sans-serif font. But the \SI command from siunitx ...