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

24
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 ...
24
votes
1answer
13k views

How to get a little frac

I am wondering how to make a fraction in LaTeX small enough to fit on a line, or at least just a little larger. I could have sworn I had seen this before but I just cannot find it. In particular, I ...
23
votes
5answers
5k 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...)
23
votes
4answers
24k views

Math symbol question: Vertical bar for ''evaluated at …''

How do I insert the line "|" after the equation in LaTeX (see image below)? I'm using LyX so if you can point me to the symbol of that line is also OK. I don't know if this line has a proper name ...
23
votes
2answers
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 ...
23
votes
3answers
493 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 ...
22
votes
5answers
2k 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 ...
22
votes
5answers
4k 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 ...
22
votes
5answers
8k views

What's the best way make an “augmented” coefficient matrix?

When studying systems of linear equations, it's nice to remind people that the last column of the coefficient matrix holds the constants. This is often done in books by putting a vertical line ...
22
votes
3answers
1k 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 ...
22
votes
2answers
10k views

What is the difference between \dfrac and \frac?

The title says it all, both \dfrac{a}{b} and \frac{a}{b} make fractions, so what is the difference between the two?
22
votes
2answers
2k 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 ...
22
votes
1answer
14k 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?
22
votes
5answers
19k 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 ...
22
votes
1answer
531 views

is there a “size-independent” method for overlaying two symbols to form a composite?

in this question a composite symbol "diamond plus" is requested for use with plain TeX. a good-looking version was provided, but it works in only one size. if the same symbol is needed for a title or ...
21
votes
3answers
5k 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 ...
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 ...
21
votes
2answers
792 views

Percent sign in a box

Is it possible to make a symbol which is a % inside a square box? I would like to use it to represent the function f(n,m) = n-(n % m). As in n symbol m. Or... is there a better idea for this ...
21
votes
1answer
1k views

Symbol for cube

I've searched the Internet, but got nothing. In LaTeX, we can use \square for square, but how can we get a cube, I want to use it in an equation. Here is the picture:
21
votes
3answers
3k 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 ...
21
votes
3answers
15k 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} ...
21
votes
2answers
2k 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 ...
21
votes
1answer
4k 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 ...
20
votes
5answers
2k views

Huge matrix in my document. Possible ways to make it look better?

The following is the source for a matrix I'm using in my document: \documentclass{scrartcl} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{amsmath} ...
20
votes
2answers
30k 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?
20
votes
3answers
318 views

Why does \[…\] do the wrong thing at the top of a page?

Upon reading What are the differences between $$, [, align, equation and displaymath?, I decided I really wanted to understand what was going on inside \[...\] and so I devised some tests. What I ...
20
votes
4answers
102k views

Not equal sign (≠) with a vertical bar

Is it possible to get a \neq but with a vertical bar instead of a slanted one? There are inequality operators like AMS's \gvertneqq that feature this kind of "not equal" but not without mixing it with ...
20
votes
5answers
8k 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 ...
20
votes
2answers
1k 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
20
votes
2answers
2k views

\overbrace with square bracket

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me ...
20
votes
3answers
418 views

Create a new math mode

Motivation When I use math mode inside of itemize environments for multiline equations, I have to do something like the following ... \begin{itemize} \item $\begin{aligned}[t] equation stuff ...
20
votes
2answers
1k views

The mysteries of \mathpalette

I would like to make a macro, \vfrac, which output would look like: $$\displaylines{ \displaystyle\raise.25ex\hbox{$\displaystyle1$}\!/\!\lower.5ex\hbox{$\displaystyle2$} \cr ...
20
votes
4answers
806 views

How to turn a figure into a symbol?

I have some figures, for e.g., finite graphs, lattices or knots, that I have drawn in eps (or pdf) format. I would ideally love to have maps indexed by these figures. However, these figures are not ...
20
votes
2answers
2k views

Typesetting Right-to-Left math

UPDATE: I've managed to produce something that is aesthetically correct, however with a lot of "hardcoding" and trial and error to manually measure my spaces. Not to mention that I have to write my ...
20
votes
2answers
1k views

Proper use of \mathchoice

I am trying to learn how to use \mathchoice. Before the solution was posted for Non-invasive replacement for \fbox?, I attempted to use mathchoice to adjust the size of the parameter before ...
20
votes
1answer
357 views

Sloppy \left and \right?

The \left and \right commands often produce improvidently large delimiters. It almost always looks better to use delimiters that are just slightly too small than delimiters that are too large. With ...
20
votes
4answers
7k 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 ...
20
votes
2answers
5k views

Is there a difference between the `displaymath` and `equation*` environments?

The amsmath documentation says Basic LaTeX doesn’t provide an equation* environment, but rather a functionally equivalent environment named displaymath. Are they really the same or is there a ...
20
votes
1answer
569 views

Elisions in mathematics

Knuth incorporated many of the typographical rules for mathematics in the TeX engine. However some rules were left out. One such case is the use of elisions in equations. Sometimes \cdots are used and ...
20
votes
1answer
475 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
38k 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! ...
19
votes
5answers
998 views

How to typeset the limit of a sequence like so?

I want to write this: I tried with $x_n \to_{n \to 0} 0$ but the $n \to 0$ doesn't go under the right arrow, it goes under but on the right, and I want it under but in the center, as in the picture ...
19
votes
2answers
2k 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?
19
votes
3answers
794 views

Curly brace to insert something into an equation? Like an inverted underbrace

I have a generic equation, into which I want to "insert" something so that the reader can see what I inserted into the equation and at which point. E.g. \documentclass{plain} \begin{document} \[ f ...
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
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
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
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
4answers
1k views

Underscore in textmode vs mathmode

I use _ character often in text mode, so I changed category of underscore: \catcode\_=12, but that applies also to mathmode and now I'm unable to make subscripts with underscore in mathmode. Is there ...
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 ...