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

19
votes
1answer
46k views

How to write N x N (with a multiplication symbol, for matrix dimensions)?

I need to write something like NxN in LaTeX but I do not get how... How to do such thing?
19
votes
1answer
24k views

Symbol for Gaussian distribution

What is the symbol for the normal density function in LaTeX?
19
votes
1answer
8k views

typesetting modulus operator, as in remainder

Is there a standard way to typeset the modulus operator (as in arithmetic remainder)? The percent sign (%) is often used by programming languages and mathematicians tend to use mod, but because of the ...
19
votes
2answers
739 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
332 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
3answers
740 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 ...
19
votes
1answer
495 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
1answer
229 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 ...
19
votes
2answers
931 views

Placement of subscripts using unicode-math. Is it XeTeX bug?

I don't like placement of subsripts when using unicode math fonts under XeLaTeX. In contrast to CM fonts the subscripts are placed at different vertical positions obviously depending on the depth of ...
18
votes
3answers
13k 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?
18
votes
4answers
580 views

Is there any difference between quad in math mode and text mode?

Is there any difference between $a \text{\quad text\quad} b$ and $a \quad \text{text} \quad b$? I cannot see the difference as shown in the following figure. If there is no difference, which one ...
18
votes
2answers
13k views

What do the pieces of LaTeX, \left and \right, respectively mean?

What are their uses and are they even standard?
18
votes
3answers
595 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 ...
18
votes
3answers
3k 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 ...
18
votes
3answers
448 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 ...
18
votes
3answers
1k 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 ...
18
votes
1answer
301 views

Drawbacks of redefining math accents with extra leading {}?

As I discovered through the non-bug latex/4253, TeX has a (mis)feature whereby it ignores braces around a \mathaccent construction: ${a_b}_c$ works, but ${\tilde a_b}_c$ fails with a "Double ...
17
votes
4answers
1k views

wavy division sign wanted

I would like to find or create a math relation symbol that resembles a division sign, except that the horizontal bar would instead be a tilde (\sim). Can anyone help with this?
17
votes
5answers
3k views

Upright Lowercase $\pi$

On pg. 144 of Kopka and Daily's A Guide to LaTeX, they mention that the symbols $e$, $i$, $d$, and $\pi$ should be displayed upright in math mode (for their usual uses). This is easy to do for $e$, ...
17
votes
3answers
704 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 ...
17
votes
4answers
1k views

What is the command for a sum symbol superimposed on an integral sign?

I want to express a sum over all discrete states and an integral over all continuum states. Usually, the sign for this is a $\sum$ superimposed on an $\int$. Is there a command to make this symbol? If ...
17
votes
3answers
13k views

How to put a big bracket under different parts of a equation so that I could write e.g. a text specific to that part in the equation?

How to put a big bracket under different parts of a equation so that I could write e.g. a text specific to that part in the equation? For example : f = x^3 + 2 |___| |__| | | ...
17
votes
4answers
3k views

Subscripts for primed variables

When I add a subscript to a primed variable, the subscript is rendered lower than when it is a subscript to an unprimed variable. For example, when I compile $l_x l'_x l_x l'_x l_x l'_x$ I get ...
17
votes
2answers
3k 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 ...
17
votes
3answers
2k views

Vertically asymmetric size variation for parentheses

One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols ...
17
votes
2answers
497 views

How do you create .+?

I would like to display a = b .+ 1 But it is displayed as a = b. + 1 (moves . next to b).
17
votes
2answers
679 views

Display math deadly sin in l2tabu

As a follow-up to Why is \[ ... \] preferable to $$?, what really is wrong with the vertical spacing as stated in l2tabu introduced by using $$...$$ instead of \[...\]? As there does not seem to be ...
17
votes
3answers
3k views

Nice-looking p-th roots

When I take the pth root, the bottom of the p comes very close to the \sqrt symbol. In the New Century Schoolbook font (which I am using), the p actually intersects the \sqrt symbol, which looks even ...
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.
17
votes
2answers
1k 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} ...
17
votes
2answers
9k 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 ...
17
votes
4answers
8k 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?
17
votes
1answer
394 views

How do I make a macro require math mode?

I have defined a macro that I would like to be used exclusively in math mode. In order to enforce this, I would like the macro to throw an error message whenever it is used outside of math mode. What ...
17
votes
2answers
831 views

Improving typesetting of sums with long limits

This piece of code \documentclass{article} \usepackage{mathtools} \begin{document} ...
17
votes
2answers
16k 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 ...
17
votes
1answer
16k views

Square brackets in math mode without the bracket symbols

Is there a way to typeset a square bracket without using the symbols [ and ]? What I am looking for is like \vert instead of |. Motivation is a need for a workaround in using LaTeX formulas inside ...
17
votes
2answers
7k 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 ...
17
votes
1answer
831 views

How can I standardize my square root signs?

I've noticed that when square root signs get too large, their front leg goes vertical (1), and that otherwise, it angles to the right (2). How can I standardize all my square root signs to either ...
17
votes
1answer
141 views

Microtype gives wrong letterspacing in math mode

Using the \lsstyle command gives wrong math latterspacing afterwards. I came upon this problem when using the classicthesis and putting math in a section (microtype is used there too). After the ...
17
votes
1answer
3k 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 ...
17
votes
2answers
387 views

Issues with TeX sub-formula formatting

As generally acknowledged TeX offers superb formatting capabilities for math in an automated fashion. Nevertheless there are some areas with clear deficiencies that one either has to accept or ...
17
votes
1answer
289 views

How to implement the Russian typographical traditions?

As is well known, TEX uses four styles in mathematics: display (D), text (T), script (S) and script-script (SS). This style defines the size of fractions and mathematical operators, the style for how ...
16
votes
4answers
1k views

How do I write $\notin$ backwards?

I write $P \niton x$, but it does not work. How can I write the symbol $\notin$ backwards?
16
votes
3answers
887 views

Typesetting old fashioned factorials

I would like to typeset an old fashioned factorial symbol and was wondering whether there was an elegant way of doing this that scales with font size. Ideally what I would like is to invoke ...
16
votes
4answers
8k 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
16
votes
5answers
642 views

Giving an equation between \[ \]'s a number

I usually use \[ ... \] to typeset equations in latex and sometimes I come back and realize that I want to have an equation number and label. I have been coming back and editing it to \begin{equation} ...
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
6answers
2k views

Automatically replace all |foo| with \abs{foo}

Technically speaking, this isn't a LaTeX specific question, but there are so many useful tools in LaTeX, and I'm using it to solve a LaTeX problem, so I thought here would be a good place to ask. I ...
16
votes
1answer
2k views

Colored symbols

First of all, I apologize if this is a repetitive question. I searched, but couldn't find it. I was wondering if I can change the color of symbols in latex. For example \ast always give me a black ...
16
votes
2answers
7k views

Difference between \langle and <

Is there any difference between \langle S \rangle and \left< S \right>? Or is \langle just an alias for < that by default works on one line without having to use \left?