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

21
votes
4answers
252k views

Not equal sign (≠) with a vertical bar

Is it possible to get a \neq but with a vertical bar instead of a slanted one? There are inequality operators like AMS's \gvertneqq that feature this kind of "not equal" but not without mixing it with ...
21
votes
2answers
7k views

\boxed{}, TikZ and colored equation background

I wonder if someone could provide me with a simple MWE for using TikZ together with \boxed to produce a colored equation background. If possible with rounded corners. I am using \boxed{} inside the ...
21
votes
2answers
4k 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 ...
21
votes
2answers
1k views

Percent sign in a box

Is it possible to make a symbol which is a % inside a square box? I would like to use it to represent the function f(n,m) = n-(n % m). As in n symbol m. Or... is there a better idea for this ...
21
votes
2answers
13k views

Non italic math mode symbols?

I would like to insert a \mu command to form $\mu$ m (micro meters) i.e. as a unit, not a variable. This means I do not want \mu to be italic. However, LaTeX only accepts the \mu command in math-mode ...
21
votes
2answers
11k 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 ...
21
votes
3answers
21k views

Size commands do not work in mathmode

MWE: \documentclass{article} \begin{document} $\wedge{\small\wedge}{\tiny\wedge}$ \end{document} All the \wedges have the same size...
21
votes
2answers
6k views

\overbrace with square bracket

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me ...
21
votes
1answer
1k views

Symbol for cube

I've searched the Internet, but got nothing. In LaTeX, we can use \square for square, but how can we get a cube, I want to use it in an equation. Here is the picture:
21
votes
4answers
1k views

How to turn a figure into a symbol?

I have some figures, for e.g., finite graphs, lattices or knots, that I have drawn in eps (or pdf) format. I would ideally love to have maps indexed by these figures. However, these figures are not ...
21
votes
1answer
45k views

tilde over a symbol Phi

Please suggest me a way to put tilde over a symbol phi. I can easily put it over a letter but coming to the case of symbols, it is giving problems. Thanks in advance.
21
votes
3answers
6k 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 ...
21
votes
4answers
12k views

How can I prevent inline math formulas from overflowing into the margin?

When I compile my document in LaTeX, some formulas in the document in math mode, between $ $, go into the right margin area beyond all the text. Is there a way to fix this aesthetic problem?
21
votes
1answer
5k views

mathtools vs amsmath

I read on http://en.wikibooks.org/wiki/LaTeX/Mathematics: The mathtools package fixes some amsmath quirks and adds some useful settings, symbols, and environments to amsmath. It sounds like ...
20
votes
3answers
12k 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 && ...
20
votes
3answers
12k views

How to put a brace on the right, not left, to group cases?

How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They ...
20
votes
3answers
338 views

Why does \[…\] do the wrong thing at the top of a page?

Upon reading What are the differences between $$, [, align, equation and displaymath?, I decided I really wanted to understand what was going on inside \[...\] and so I devised some tests. What I ...
20
votes
4answers
2k views

Underscore in textmode vs mathmode

I use _ character often in text mode, so I changed category of underscore: \catcode\_=12, but that applies also to mathmode and now I'm unable to make subscripts with underscore in mathmode. Is there ...
20
votes
2answers
13k 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 ...
20
votes
3answers
445 views

Create a new math mode

Motivation When I use math mode inside of itemize environments for multiline equations, I have to do something like the following ... \begin{itemize} \item $\begin{aligned}[t] equation stuff ...
20
votes
3answers
14k views

How to typeset function restrictions

I wonder how to typeset the restriction of a function to some subdomain, a la $f|_A$ or $f\restriction_A$ , but with the vertical bar being as big as possible.
20
votes
2answers
2k views

Typesetting Right-to-Left math

UPDATE: I've managed to produce something that is aesthetically correct, however with a lot of "hardcoding" and trial and error to manually measure my spaces. Not to mention that I have to write my ...
20
votes
3answers
679 views

Remove all math for spelling and grammar checking

I'm compiling a LaTeX file to pdf and then I use a pdf to text converter to convert the file to plain text. I then use LanguageTool to do grammar checking on that plain text file. The LaTeX source has ...
20
votes
3answers
986 views

How can I create a new extensible symbol?

Given an arbitrary thin vertical symbol, can I create a new math delimiter from it (and if so, how)? Edit: Ideally, I would like to be able to create an extensible symbol, either built out an ...
20
votes
2answers
2k views

Proper use of \mathchoice

I am trying to learn how to use \mathchoice. Before the solution was posted for Non-invasive replacement for \fbox?, I attempted to use mathchoice to adjust the size of the parameter before ...
20
votes
1answer
985 views

What does the tilde character (~) do in math mode?

What effect does the tilde character ~ have in math mode? Is it the same non-breaking space that it is in text mode? Is it bad style to use ~ in math mode? I've seen it used in some examples but ...
20
votes
2answers
6k 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 ...
20
votes
1answer
308 views

There's a bump in the implies glyph

Edit: I understand this question has been marked as a duplicate, but the question I linked to doesn't have a solution for me (unless I'm missing something obvious, which is likely). The effect is ...
20
votes
1answer
605 views

Elisions in mathematics

Knuth incorporated many of the typographical rules for mathematics in the TeX engine. However some rules were left out. One such case is the use of elisions in equations. Sometimes \cdots are used and ...
20
votes
1answer
602 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 ...
19
votes
5answers
1k views

How to typeset the limit of a sequence like so?

I want to write this: I tried with $x_n \to_{n \to 0} 0$ but the $n \to 0$ doesn't go under the right arrow, it goes under but on the right, and I want it under but in the center, as in the picture ...
19
votes
3answers
35k 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 ...
19
votes
3answers
1k views

How to align limits of double integrals?

I'd like to have the limits of two integrals vertically aligned. In this example, the x and b should be positioned on the same line. \[\int\limits_x^{\infty}\int\limits_b^{\infty} x^2+y^2 ...
19
votes
3answers
32k views

making a big summation sign

how can I make a big summation sign ? ‎\begin{align}‎ ‎\cos x‎ ‎=‎ ‎‎\sum\limits‎_‎{n=0}^{‎\‎‎infty‎} ‎\frac{(ix)^2n‎}{(2n)!}‎‎ \end{align}‎ this is the code which I'm using for summation
19
votes
3answers
989 views

Curly brace to insert something into an equation? Like an inverted underbrace

I have a generic equation, into which I want to "insert" something so that the reader can see what I inserted into the equation and at which point. E.g. \documentclass{plain} \begin{document} \[ f ...
19
votes
4answers
11k 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 ...
19
votes
4answers
22k views

LaTeX symbol for “does not divide”

What is the correct way to make the "does not divide" symbol in plain LaTeX 2e? I'm talking about the symbol that is a vertical bar with a slash through it. I prefer not to install AMS or other ...
19
votes
3answers
4k views

Guidelines for typesetting fractions

I realize that this question is to some extent subjective. However, I suspect that there are some common standards regarding how fractions ought to be typeset in mathematics. The guide Mathematical ...
19
votes
3answers
11k views

How to stack limits for maths operators?

I have a question on how is it possible to create a \sum with two lower limits directly positioned right underneath each other. I have tried hard and cant seem to get anywhere with it.
19
votes
3answers
634 views

Visually highlighting symbolic material

I have a diagram in which I need to indicate the difference between symbolic mathematics and English words (potentially to someone who doesn't know about it): Colour works beautifully for making ...
19
votes
3answers
31k views

\bar vs. \overline - when to use what, semantically?

Following the question "The \bar and \overline commands" which is simply about the lengths of both, I'd like to know when to use \bar and when to use \overline from a semantically viewpoint. I always ...
19
votes
2answers
13k views

How do I use a circle as a math accent (larger than \mathring)?

To denote the interior of a set, I'd like to have a command \interior. Now, as one can learn from this post, one possibility is to use \mathring. This is a neat command, but it produces a circle that ...
19
votes
2answers
9k views

What's the most elegant way to obtain Dirac operators? (slash notation)

What's the best way to achieve the Dirac slash notation for Dirac operators (contraction with Gamma matrices)? I would have thought the AMSmath packages would have this built in somewhere. (The ...
19
votes
2answers
923 views

How do I format a regular expression in math mode?

I want to display some regular expression, like the following, in LaTeX math mode. \[ (F+(A+I*)*)|(F*(A+I*)+)E \] However, the spacing is all wrong, because TeX formats + and * as binary operators, ...
19
votes
2answers
380 views

How to prevent superscripts from moving under \sqrt?

When I put an expression with superscripts under a \sqrt, the superscripts (here "vis") move down a bit. How can I prevent that, so that it looks consistent no matter whether it's under a root or not? ...
19
votes
2answers
2k views

Make mathfont respect the surrounding family

How can one make the math mode change its font according to the surrounding text? I have to use (pdf)latex. xelatex, luatex etc. are not possible alternatives in this case. \documentclass{scrartcl} ...
19
votes
2answers
5k 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} ...
19
votes
1answer
547 views

Why \( and \) were not defined as robust commands in the first place?

I am aware of the difference between using \(...\) and $...$ (in moving arguments, for example), and yes, I've read the answers to this question: Are \( and \) preferable to $?). I also know the ...
19
votes
3answers
2k views

Why LaTeX uses upright uppercase Greek letters by default in math mode?

Why upper-case Greek letters are typeset in upright font, i.e., \mathrm? While at the same time, some upper-case Greek letters those are also Latin Letters ,e.g., A for $\Alpha$, B for $\Beta$, are ...
19
votes
3answers
20k views

1st, 2nd and i-th?

Assume I wish to refer to the i-th object, or the n-th function out of some set, where i and n are letters and not numbers (as in "Multiply the $j$th row with the $i$th column and store the result in ...