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

28
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
28
votes
3answers
21k views

Math mode in tabular without having to use $…$ everywhere

\begin{tabular}{|l|l|l|} \hline Column A & Column B \\ \begin{math} x & y \\ \end{math} \end{tabular} This won't let me compile and gives a lot of errors, how do I enable math mode in a ...
28
votes
3answers
6k views

German language: use of comma in numbers

In German the comma rather than the period is used as a decimal separator and the dot is used as a thousands separator: 12.345,67. The comma creates some unwanted space when used as in $12.345,67$. Is ...
28
votes
3answers
9k 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
3answers
23k 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} ...
28
votes
2answers
3k views

Opposite of \ensuremath: ensure that I'm *not* in math mode?

I'd like a macro that is the opposite of \ensuremath: something like \ensurenotmath, which makes sure that its argument is not typeset in math mode. Is there such a macro, or a way to implement it? ...
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
8k views

How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)?

there is a part of my paper where I use the distributive property and it's not that clear for the reader to see (I'm using in proposional logic for a proof). The logic equation (part of) is: (l_{1}) ...
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
3answers
69k 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! ...
27
votes
3answers
23k 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?
27
votes
3answers
54k views

Is there a circle symbol?

Is there a circle symbol for the composition of two functions? Or do I have to resort to using other ways to represent that?
27
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 ...
27
votes
1answer
7k 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 ...
26
votes
5answers
8k 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
2answers
4k 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?
26
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, ...
26
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 ...
26
votes
3answers
54k views

how to write ceil and floor in latex?

Is there a macro in latex to write ceil(x) and floor(x) in short form? The long form \left \lceil{x}\right \rceil is a bit lengthy to type every time it is used.
26
votes
5answers
14k 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 ...
26
votes
1answer
39k views

Symbol for Gaussian distribution

What is the symbol for the normal density function in LaTeX?
26
votes
3answers
3k 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 ...
26
votes
1answer
22k 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?
26
votes
2answers
2k 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
1answer
738 views

What exactly is a “single character” or “symbol” in math mode?

There are at least three instances where single symbols in math mode receive a special treatment by the TeX engine: 1. when accents are placed, 2. when a math operator is created with ...
25
votes
4answers
1k views

A rather difficult ring like picture to be drawn

I desire a figure similar to the following: \documentclass[tikz,margin=10pt]{standalone} \usepackage{mathtools,amssymb} \begin{document} \begin{tikzpicture}[scale=2,transform shape] \draw (1,0) ...
25
votes
10answers
1k views

Best typesetting of formula

Consider the following example. \documentclass{article} \usepackage{amsmath} \newcommand*\mathsetfont{\mathbf} \newcommand*\DeclareMathSet[1]{% \expandafter\newcommand\csname ...
25
votes
4answers
4k 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 ...
25
votes
3answers
45k 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 ...
25
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 ...
25
votes
2answers
27k views

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

What are their uses and are they even standard?
25
votes
3answers
40k 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 ...
25
votes
3answers
2k 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 ...
25
votes
2answers
10k views

Upper triangular matrix with big zero in lower triangular?

I can represent an upper trapezoidal matrix say as shown below. I would like to replace all those zeros with a single big zero that spans across the low triangle rows and columns, and maybe also add a ...
25
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 ...
24
votes
3answers
828 views

Strange default exponent positioning?

Why is this red exponent so far away from the right parenthesis? To my eye it is too far away. \documentclass{article} \usepackage{xcolor} \begin{document} ...
24
votes
6answers
5k views

Is it possible to use Linux Libertine as a mathematical font?

I recently heard that there is a package called unicode-math that makes it possible to use an ordinary TTF/OTF font for mathematic typesetting. To what degree is that possible with Linux Libertine? I ...
24
votes
3answers
7k 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 ...
24
votes
2answers
4k 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
24
votes
3answers
10k 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 ...
24
votes
3answers
6k views

\DeclareMathOperator won't take arguments

I'd like to define a family of math operators that have the same superscript, but different subscripts. My first attempt was: \DeclareMathOperator{\Upd}[1]{U^M_{#1}} But the log tells me that: l.3 ...
24
votes
4answers
16k 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 ...
24
votes
3answers
2k 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 ...
24
votes
1answer
27k 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 ...
24
votes
3answers
580 views

How to capture the current math style?

\mathchoice helps to distinguish between math styles: \mathchoice {<something in \displaystyle>} {<something in \textstyle>} {<something in \scriptstyle>} {<something in ...
24
votes
3answers
15k 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.
23
votes
3answers
692 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 ...
23
votes
3answers
24k 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...
23
votes
3answers
2k views

maths nested superscripts and subscripts displayed incorrectly inline

I am having a strange bug when using nested superscripts and subscripts in inline math (displaystyle works fine). This behaviour is the same independently of the font used or the compiler (orginally ...
23
votes
1answer
54k 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.