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

6
votes
2answers
5k views

overset text over equal sign in in an Align environment

Look at the following example \begin{align} & x \\ \overset{\text{some long explanation}}= & foo \\ & = bar \end{align} what is the best way to get the equal signs ...
4
votes
4answers
223 views

Incorrect delimiter size in math mode

The following code \documentclass{article} \begin{document} \[ \left|\tilde{\theta}\right| \] \[ \left|\theta\right| \] \end{document} produces the following output using pdfLaTeX (TeXLive 2012 ...
25
votes
3answers
1k views

Why are so many symbols restricted to math mode?

A common beginner's mistake is to forget \(...\)/$...$ around symbols that require math mode. Why doesn't (La)TeX let people use isolated symbols in text mode by default? I am sure there are at ...
24
votes
1answer
15k views

Difference between \textrm{} and \mathrm{}

Can you explain me what is the difference between \textrm{} and \mathrm{} when they are used in math mode. In what context one is preferred over the other?
13
votes
1answer
4k views

A Matrix with labels, dashed lines

I'm trying to TeX the following matrix, from Guillemin and Pollack (1.4 #13) The best I've been able to do is get the dashed lines with \[ \left( \begin{array}{c:c} B & C \\ \hdashline D ...
12
votes
3answers
713 views

Replace the `$$ … $$` macro with the `\[ … \]` macros? - Prefer the way LaTeX lays it out, but `$` are faster to write

Is there a way to replace the $$ ... $$ macro with the \[ ... \] macros? (and replace inline mathmode as well) I realised the only way I can write the \sum_{i=1}^{10} t_i is between the \[ ... \] ...
11
votes
1answer
348 views

Which packages/practices are relevant for writing Structured Derivations? (similar to Dijkstra's calculational style of proofs)

Does anyone know of any packages that support this style of writing proofs? The only things that I've found are: tex-ewd, a bunch of plain TeX macros on CTAN written specifically with Dijkstra in ...
10
votes
2answers
991 views

Exchange meaning of : and \colon

I usually use the colon symbol : to denote maps. For set syntax there is the braket package. So as the spacing of : is not appropriate, I want it to behave like \colon. I tried ...
10
votes
3answers
339 views

How to color just the `\vec` symbol?

How do I color only the vector symbol in \vec f? I'm using beamer, so xcolor is already loaded. Extra "points" to an answer that also explains how to fish..and not only gives me the fish. Thanks!
10
votes
3answers
517 views

The line produced by \not looks bad on wider symbols

When using \not together with wider symbols such as \Leftrightarrow the diagonal line produced by \not is placed too far to the left. How can the line be properly aligned? For example the following ...
10
votes
5answers
928 views

A symbol for the field of formal Laurent series

In my area of math one of the objects that pops up quite often is the field of all formal Laurent series. Now the trouble is that the notation for this field is $\mathbf{C} (( t ))$. Now the two ...
9
votes
3answers
377 views

Inline math or \textit for author defined math constants?

Wondering if people here have a thought on what the best practice is here (if it matters). I used to use baskerville (well, the baskervald package) as my main font and charter as my math font (since ...
9
votes
1answer
4k views

displaystyle, dfrac, dcases

Am I correct in saying that the dcases environment replaces \frac with \dfrac? The replacement only occurs at the outer-most level of \frac, so if I have \documentclass{article} ...
8
votes
2answers
1k views

LaTeX color setting for math mode

I'm wondering if it's possible to do something like this in LaTeX: For all numbers (0, 1, ..., 9) in math mode, color it red. For alphabets (a, b, ..., z, A, B, ..., Z) in math mode, color it green. ...
8
votes
3answers
3k views

Rotation in \ddots

I want to write a math equation that needs power of dots. I tried these code {2^{2^{2^{\ddots^{2}}}}} But the dots needs to be rotated
7
votes
3answers
830 views

The modulo two sum sign in LaTeX

I would like to know how I can obtain the 'modulo two sum' sign (unicode 2A0A i.e., the letter sigma with a circle in its middle). I know I can obtain it by using the unicode-math package. But does ...
7
votes
3answers
787 views

Math letter's italic correction

Are there a way to display PS and TN and CD and so forth (product of two variables) more beautifully? The normal CM font puts a wide space between the left letter and right letter. If use the ...
5
votes
2answers
1k views

Change math font for figures only (including TikZ environments within figures)

In my document, I want the main text to be in the times font, and the math to be in the txfonts font. This I can do with the help of the txfonts package. However, I want everything that shows up in my ...
4
votes
3answers
1k views

Using oldstyle figures of palatino (mathpazo) in math mode

I am using \usepackage[osf]{mathpazo} for oldstyle figures and the dcolumn package to align the contents of tables at their decimal point. The problem is that dcolumn automatically sets the aligned ...
14
votes
2answers
2k views

Equations, change the font size

How do I change the font size of something like this: I want to increase the font but it always seems to remain the same. \documentclass[30pt]{article} \DeclareMathSizes{20}{20}{20}{20} ...
13
votes
3answers
1k views

mathop shifts the baseline, DeclareMathOperator doesn't

Here is a little example that illustrates this strange behaviour: \documentclass{article} \usepackage{amsmath} \DeclareMathOperator\foo{\mathbf{l}} \begin{document} ...
11
votes
1answer
236 views

Compatibility between amsmath and exscale

Both the amsmath package and the exscale package define the delimiter macros \big, \Big, \bigg and \Bigg based on the internal macro \bBigg@. However, as the following minimal example reveals the ...
10
votes
2answers
670 views

Weird relative positioning of superscript and subscript with \dot, \bar

Minimal working example: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ {A^\mu}_\nu \] \[ {\bar{A}^\mu}_\nu \] \end{document} The result is. Why is the placement of ...
8
votes
3answers
511 views

How to achieve line break in simple $formula$-mode

I want to have inline math text like Figure \ref{figure:example graph} shows an example of a graph $G = (\{v_{1}, \dots, v_{5}\}, \{(v_{1}, v_{2}), (v_{2}, v_{3}), (v_{1}, v_{3}), (v_{2}, v_{5}), ...
6
votes
2answers
180 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 ...
6
votes
2answers
305 views

Using a negative space \! to differentiate between functions and products

In Physics, I often have functions like f(x), but also multiplications like y(-x). I would like my math to be easy to understand, so I am looking for a way to suggest function calls and ...
6
votes
1answer
230 views

Automatic reduplication of equal sign in the beginning of broken formula

Suppose we have the following code \documentclass{article} \begin{document} $a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z$ \end{document} which produces the following result I want to have ...
5
votes
1answer
120 views

Typeset WHOLE document in sans-serif, Including Math Mode

The reigning answer for the Simplest way to typeset entire document in sans serif (Helvetica) completely disregards math-mode. This might be preferred when all math equations are set display style, ...
5
votes
2answers
1k views

Relation spacing error using =& in aligned equations

The middle equation in the following example seems to have wrong spacing around the = sign. The only difference is that I used =& for aligning around the = sign rather than &=. This worries ...
4
votes
1answer
113 views

Why aren't the braces showing

I have this tex: \(\mu_{A}\left(x\right)\in \[0,1 \right\]\) The issue here is that [ and ] are not showing around 0,1, why is that? Thanks.
4
votes
2answers
755 views

Problem with \mathpalette and \mathchoice

When working on an additional answer to this question of mine, I stumbled across the following problem with \mathpalette. For simplicity I give an example where in practice it is ridiculous to use ...
3
votes
1answer
690 views

Positioning of equations

How would I shift my whole set of equations/calculations at the left, to be aligned with "Example"? \documentclass[11pt,a4paper]{report} ...
3
votes
2answers
1k views

Force aligned equation (all the way) to the left?

How do I force the following aligned output all the way to the upper left (right next to the enumerated list item)? I still want the 2nd and 3rd lines to be aligned with it's above equal sign. ...
3
votes
1answer
5k views

How do I make a blackboard 1? [duplicate]

Possible Duplicate: Blackboard bold characters I want to make a blackboard "1" character to show an indicator variable, but $\mathbb{1}$ doesn't work. How do I do it?
49
votes
9answers
5k views

LaTeX/Math jokes [closed]

Lighten up a bit guys. How about the following \documentclass{article} \usepackage{graphicx} \begin{document} If~~$\displaystyle\lim_{x\rightarrow8}\frac{1}{x{-}8}=\infty$ ...
45
votes
2answers
10k 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 ...
25
votes
5answers
5k 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?
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? ...
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 ...
16
votes
2answers
25k 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 ...
20
votes
1answer
481 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
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 ...
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
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, ...
21
votes
3answers
12k 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 ...
20
votes
3answers
14k 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?
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? ...
16
votes
3answers
3k 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 ...
12
votes
3answers
6k 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" ...
11
votes
4answers
18k views

Write fraction out of equation

I want to write as a math fraction 1/4 " ( a quarter of inch). I want to write this fraction out of an equation because is a characteristic of an element.