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

33
votes
4answers
30k views

Bold math: Automatic choice between \mathbf and \boldsymbol for Latin and Greek symbols?

This is a follow-up to this question. Suppose you want to denote vectors by upright bold letters; then \mathbf{u} works fine, except that if it's a Greek letter you have to use \boldsymbol{\omega} ...
32
votes
3answers
96k views

How to do the 'curvy L' for Lagrangian or Laplace Transforms?

I am new to TeX, working on it for about 2 months. Have not yet figured out how to script the 'curvy L' for Lagrangian and/or for Laplace Transforms. As of now I am using the 'L' - which is not good! ...
32
votes
3answers
30k 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?
32
votes
4answers
8k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ ...
32
votes
6answers
2k views

Is it possible to write all mathematical formulas in a separate file and add them in main file on-demand?

Consider this scenario: I have a report to write and I want to write all mathematical formulas in a separate file and then add them in the main report file on demand (i.e. include/import/add/call a ...
32
votes
4answers
58k views

Typesetting the “define equals” symbol

I'd like to typeset two compound symbols for making definitions. The following \newcommand{\defeq}{\mathrel{\mathop:}=} \newcommand{\eqdef}{\mathrel{\mathop=}:} are suggested by the CTAN symbol ...
32
votes
1answer
80k views

How to write two dot above a letter?

the two dots above a letter represents two derivative of varible t. My method: \documentclass[UTF8]{ctexart} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} ...
32
votes
2answers
9k 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} ...
32
votes
4answers
16k views

Prevent line breaking in inline math, but allow flexible spacing

How can I easily tell Latex to prevent line-breaks inside a part of an inline formula, without affecting inter-word spacing? Writing something like $ab(c+d)$ in Latex is bad: Latex might put a line ...
31
votes
2answers
615 views

When is it safe to type less and drop curly braces in math mode

I'm using tex a lot more now, and I'd like to get more efficient by typing less. I've partly been inspired by editing mathjax posts and seeing people write things like \frac12. However I've also had ...
31
votes
1answer
87k 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.
31
votes
5answers
34k views

Lowercase \mathcal

The standard font used for \mathcal does not include any lowercase characters. The Comprehensive LaTeX Symbols List suggests redefining \mathcal to use Zapf Chancery. However I do not particularly ...
30
votes
6answers
12k views

Faster way of writing \mathbf

Is there a quicker way of doing boldface in math mode instead of typing out \mathbf{} each time? (It gets cumbersome when you denote simple vectors with boldface...)
30
votes
4answers
4k 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 ...
30
votes
2answers
5k views

How to change default for spacing around binary relations?

In TeX and LaTeX, the math binary relations (like =, \parallel, <, \le ...) have a default (rubber-length) spacing to either side, which is too large for my liking. How can reduce it?
30
votes
2answers
38k views

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

What are their uses and are they even standard?
30
votes
2answers
4k views

Drawing a hypergraph

What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz? I'm trying to draw something like
30
votes
2answers
20k 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 ...
30
votes
4answers
26k views

Bold italic vectors

I am trying to display vectors as bold and italic. The command \mathbf sets the letters non-italic. I also googled a bit and stumbled upon \mathbf{\em y} or \mathbfit{y}, which all didn't work. I ...
30
votes
1answer
20k 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 ...
30
votes
3answers
19k 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 ...
29
votes
5answers
3k views

Macro for \left( and \right)

I know there has been discussion about this topic, but I haven't seen a working solution. Is it possible to define a macro within LaTeX, such that inside math mode, ( would produce \left( and ) would ...
29
votes
5answers
988 views

How to make a plus sign with arrowheads on each of the four endpoints?

There is a common operation in the sparse-direct literature (see pg. 7) called an "extend-add", and it is usually denoted with a particular symbol that looks like a large plus sign with arrowheads on ...
29
votes
5answers
5k 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 ...
29
votes
3answers
21k 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 ...
29
votes
6answers
19k views

Equations in section heading/title

For reasons that are beyond me, the following MWE \documentclass{scrreprt} \usepackage{classicthesis-ldpkg} \usepackage{bm} \usepackage{amsmath} \begin{document} \section{The values of $\beta$ for ...
29
votes
4answers
3k views

Can I have a flexible partial derivative macro?

I was thinking about writing a partial derivative macro that has a similar syntax to the Mathematica D function. (example) The syntax could be like this: \D{f}{x} expands to \frac{\partial ...
29
votes
3answers
34k 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...
29
votes
1answer
4k views

\{ & \} vs \lbrace & \rbrace

So, what is the difference in using \{ and \} to using \lbrace and \rbrace? Which one is preferred, and when one has to take care?
29
votes
1answer
9k views

Is there a difference between \ge and \geq (or equivalentely between \le and leq)?

I have always used \geq, but recently saw a document where the person uses \ge. Once compiled, they look the same, but I searched to see if there was any difference between the two or a guideline as ...
28
votes
3answers
11k views

Why isn't \prime automatically set to be a superscript?

In math mode, writing \prime gives too big a "prime" symbol, and it isn't a superscript, like it always is in textbooks. Why is this? This isn't a question about how to get \prime to be a ...
28
votes
4answers
20k 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.
28
votes
3answers
4k views

Beamer: Uncover underbrace

I've got an underbrace (\underbrace{foo}_{bar}) which I want to uncover (i.e. foo should be there from the beginning, while the underbrace and the bar should be uncovered on the next slide. I've tried ...
28
votes
1answer
2k views

xelatex problem: Missing chars in TeXLive 2013 / \textfont XXX is undefined errors in miktex

I'm trying to track down the source of a problem with the new xetex binary in miktex. I think it is related to the following problem in TeXLive 2013: \documentclass{article} \usepackage{unicode-math} ...
27
votes
4answers
9k views

Why is LaTeX used as the defacto standard for math equations?

In almost every application I've ever seen that uses math equations, it always supports LaTeX. If LaTeX does so much more than just math equations, why is it the defacto standard for math equations? ...
27
votes
4answers
3k 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, ...
27
votes
3answers
863 views

How can I write something above and below the signs?

I have a relation called Likelihood Ratio Test which has a special format. As you see in the picture, there are two non-equality signs and also somethings above and below them. How can I write these ...
27
votes
5answers
57k views

Real number symbol (UTF-8: ℝ) in XeTeX

How can I get the 'real number' sign (something like \mathbb{R} with the amssymb package in LaTeX) in XeTeX?
27
votes
1answer
36k 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 ...
27
votes
3answers
16k 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 ...
27
votes
4answers
18k 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?
27
votes
2answers
3k views

How to get a \mid binary relation that grows

This question relates to one about getting a vertical bar longer than \mid. How to get a vertical bar which is longer than \mid ? However while the given \middle| solution works for me, it no longer ...
27
votes
2answers
3k views

Is there an easy way to add hover text to all incidents of math mode where the hover text would contain the LaTeX code?

Adding hover text (I believe the technical term is a tooltip) to any part of any LaTeX document can be accomplished using cooltooltips.sty, as I have recently learned. I would like to do something ...
26
votes
5answers
9k 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?
26
votes
9answers
1k views

Best typesetting of formula

Consider the following example. \documentclass{article} \usepackage{amsmath} \newcommand*\mathsetfont{\mathbf} \newcommand*\DeclareMathSet[1]{% \expandafter\newcommand\csname ...
26
votes
4answers
6k views

What does \right. do?

I have tried searching for \right. in many places but have not been able to decipher its magical properties. Many texts use the arcane symbol but none that I have found explain it. The composition of ...
26
votes
3answers
8k views

Overlay symbol with another

Is it possible to overlay a symbol with another? I want to write an equal sign with a question mark overlayed (or the other way around). Note I don't want \stackrel{?}{=} I want the question ...
26
votes
6answers
3k views

Bad positioning of math accents for the beamer standard font

With a recent TeX distribution, the easy answer to this question is "load the sansmathaccent package" (which is Ariel's implementation of my answer). Actually, the corrected font should be loaded ...
26
votes
2answers
6k views

Difference of the \dots*

I came to wonder, what is the difference between the following? \dotsc \dotso As well as between: \dotsb \dotsi \dotsm
26
votes
3answers
3k views

Getting a tikz picture to have an equation number

I make a lot of commutative diagrams and am trying to switch to Tikz from amcd,diagrams, etc. I often have to refer to these diagrams in the text and would rather have them as equations (i.e. with and ...