{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
2answers
4k 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 ...
19
votes
3answers
7k 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 ...
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 ...
19
votes
2answers
8k 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 ...
19
votes
3answers
599 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
4answers
3k views

What free math font could/should accompany Linux Libertine and Linux Biolinum?

Well, the title of the question pretty much says everything. To be more precise: I'd like to know (1) what font would be visually suitable to use with Linux Libertine and/or Linux Biolinum as the ...
19
votes
2answers
3k views

Automatic thousands separators?

I want to typeset big numbers with a separator (e.g a space or a ",") between hundreds and thousands, etc... For example 1 Million = 1 000 000. I know the package siunitx which does it very well, but ...
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
750 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
339 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
756 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
501 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
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 ...
19
votes
1answer
17k 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 ...
19
votes
1answer
233 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
941 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
4answers
588 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
6answers
785 views

Rounding a number to its hundred

Does anybody know how I could have LaTeX round a number like 2,386 so that I finally get only written 2,300? I tried with siunitx and its option [round-mode=places,round-precision=-2] but it didn't ...
18
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 ...
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
481 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
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} ...
18
votes
1answer
870 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 ...
18
votes
1answer
303 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
740 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
2k 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
4k 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
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
681 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
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
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
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
404 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
857 views

Improving typesetting of sums with long limits

This piece of code \documentclass{article} \usepackage{mathtools} \begin{document} ...
17
votes
5answers
1k views

\Longrightarrow doesn't look good in 12pt

I'm using the standard CM fonts in 12pt (and amsmath if this is relevant). My problem is that \Longrightarrow gives something like this output, which I find a bit annoying. I know that it's a ...
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
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
146 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
4k 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
389 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
290 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
10k views

Double superscript error

I'm a relative beginner with Lyx. When I type in this code I'm hoping for T' to be followed by superscripts and subscripts. Instead I get a "double superscript" error when I try to view the pdf \[ ...