{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
1answer
2k views

Large $\forall$

How to get larger $\forall$ symbol? Adding \Big$ doesn't work.
4
votes
1answer
1k views

smashoperator overlaps big parentheses with limits

\smashoperator pulls big parentheses too close causing them to overlap with the limits. Is there any workaround? Edit: An ad-hoc solution is to force an appropriate amount of empty space to the right/...
19
votes
4answers
3k views

No space present after ensuremath

When I insert a short maths section in a sentence, it renders fine with a space each side as expected: ...returned $\mathcal{P}$ from... If I define a command to do the same thing, it also renders ...
34
votes
2answers
4k 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? ...
54
votes
1answer
158k views

How to write N x N (with a multiplication symbol, for matrix dimensions)?

I need to write something like NxN in LaTeX but I do not get how... How to do such thing?
7
votes
6answers
5k views

Use \mathrm by default

How can I get roman font by default in math mode?
3
votes
2answers
3k views

How to typeset a multiline text in math environment?

I am using lhs2TeX to render Haskell code in LaTeX. It preprocesses the code into complex LaTeX code which is rendered (in one mode of operation) in math environment. Now, I have in this code also ...
11
votes
3answers
2k views

Replacing greek glyphs in math mode

I want to switch fonts, away from computer modern. I'm pretty sure that I will end up with a mixture of fonts. I can't provide a full list of required features, but Linux Libertine's feature set ...
6
votes
1answer
233 views

Nested expressions in equations

Is it possible to type something like this (in math mode): A = B and put something below the = sign (such as x\rightarrow\something)?
14
votes
2answers
18k views

Command for text in math mode that does not become italicized inside theorem statements

This has probably been answered somewhere, but I can't find it from some searching. I sometimes want to write something like Leb for lebesgue measure, and I would like it to be non-italicized, so I ...
2
votes
1answer
980 views

Change the equation number in alignat

I have the following equations with-in alignat environment $\begin{alignat}{4} &p^0\colon\od{u_0(x)}{x} = 0 \quad &\text{with} \quad u_0(0) = 1, \\ &p^1\colon \od{u_1(x)}{x} -u_{{0}} \...
1
vote
1answer
3k views

Good environment for writing math examples [closed]

I am writing a mathematical report. where i need to include some examples, e.g., solving odes. is there a package which provide a good environment for writing examples?
12
votes
1answer
266 views

\rightarrow^* flipped to the left?

Is it possible to create something like $\rightarrow^*$ only flipped to the left? Someone suggested using $\mathbin{{}^*\leftarrow}$ but this still doesn't give me the same spacing.
3
votes
2answers
389 views

Problem with slanted numerals when combining siunitx and arev

There is a strange interaction between the siunitx and arev packages, whereby all the numerals appear slanted when using commands such as \num or \SI. \documentclass{article} \usepackage{siunitx} \...
20
votes
1answer
693 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 ...
0
votes
1answer
3k views

How to use greek letters in \text environment inside math?

I tried something like $(\lambda x. x\ x)(\lambda x. x\ x) \text{cannot be \beta-reduced to something else}$. How can I make TeX output a real beta where I want?
7
votes
3answers
853 views

Square with a diamond in it

In math mode, I'm trying to make a square with a diamond in it. My failed attempt has been to put the following in the preamble: \newcommand{\sqdiamond}{\mathbin{\rlap{$\mspace{2mu}\diamond$}\hbox{$\...
20
votes
5answers
3k views

Giving an equation between \[ \]'s a number

I usually use \[ ... \] to typeset equations in latex and sometimes I come back and realize that I want to have an equation number and label. I have been coming back and editing it to \begin{equation} ...
9
votes
1answer
2k views

Decimal Long Division

Does anyone know of a package or macro that handles decimal long division? For example, I want to convert 3/8 to a decimal and show all of the steps. I found a macro for longdiv that works great for ...
11
votes
2answers
5k views

What packages will let me use Cyrillic characters in math mode?

Note I'm not actually planning on writing any, for instance, Russian prose or even any Russian words. It's just that, on paper, I've always had the habit of denoting sets by uppercase roman letters, ...
4
votes
1answer
2k views

Newline in equations

The code looks something like: $$ If \ abs(dx) = abs(dy) \ then \\ step = abs(dx)\\ else \\ step = abs(dy)\\ $$ I want the '\\' to ...
15
votes
2answers
3k views

Change math font only in some parts of a document?

Within a larger document with lots of formulas, I use a self-defined "Example" environement for illustrational purposes from time to time. In order to better set it apart from the rest of the text, I ...
6
votes
2answers
4k views

How can the \textmu symbol be used in math mode and resize correctly?

I wish to use an upright mu character in various places in my document, and so I've put the following in my preamble: % textcomp, for its upright mu \usepackage{textcomp} % some user macros \...
4
votes
1answer
670 views

Wrapping relational operators

If an expression $A = B$ (or say, $A \leq B$) occurs in a sentence and there is only enough space in the current line to accommodate $A$, LaTeX will place the equals sign beyond the margin and cause ...
32
votes
4answers
30k 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 ...
6
votes
3answers
2k views

cancel package downward arrow

Let's say that I want to cancel the denominator of a fraction and also assign him a value. Something like that \cancel{2}\cdot\dfrac{9}{\cancelto{2}{4}}. The problem here is that the fraction doesn't ...
4
votes
1answer
6k views

Multiple subscripts [duplicate]

Possible Duplicate: Separate long math text under sum symbol into different lines? I'm trying to produce a product which has two subindices. Like this: \[ \phi_n(X)=\prod_{z\in \mu_n \\ z \...
19
votes
1answer
594 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 ...
25
votes
2answers
6k 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 ...
7
votes
3answers
759 views

How to make \left<\overrightarrow{b}\right> look good?

I want a 'b' with an arrow on top, enclosed in angle brackets. \left<\overrightarrow{b}\right> gives angle brackets which are far too high. <\overrightarrow{b}> gives far too much ...
13
votes
1answer
3k views

How do I create the negated arrow on \xrightarrow?

Say I have $x\xrightarrow{\rm mb}y$ as in the first line below, but I want a negation symbol like the one defined in \nrightarrow, as in the second line, but extendable. Does anyone know how I can do ...
5
votes
2answers
3k views

Vertical spacing with underbrace command

How can I set how much vertical spacing is put between my equation and the curly bracket used in underbrace? As an example, I feel like the following just puts the brace too close to the equation: \...
22
votes
2answers
27k views

Sums in math mode: how to display index under the sigma sign?

I have a fraction with sums above and under the line. How can I convince LaTeX to write the indices of the sums under the sigma instead of next to it? \begin{displaymath} \frac{\sum_{s \in S} s^2}{\...
1
vote
1answer
157 views

Spacing of characters in a mathematical set, displayed inline in paragraph

I have a mathematical set notation that I want to display inline in a paragraph of text. However, when I write this, the output is not very beautiful: $\{ (w_j,\dots,w_{j+n-1}) | 0 \leq j \leq k-1-n\}...
1
vote
1answer
819 views

Text crossing the page margin in math environment

I have some long text (a single sentence) which I want to put inside a math environment. But my text just goes accros the page margin and ignores the textwidth specification given in the preamble. ...
8
votes
2answers
1k views

remove additional space before `:`

In this math code: \exists^\omega n : \alpha [0,n] \notin A it adds some empty space before and after :. I want to avoid/remove the space before it. How?
1
vote
1answer
346 views

combine several align-environments

I want to combine several align-environments but reset the alignment at some point. Esp., I want to combine these: \begin{align*} & \lim(\emptyset) = \ext(\emptyset), \lim(\Sigma^* a_1 \Sigma^* ...
9
votes
4answers
2k views

How can I define a math operator behaving like \lim or \sum with limits?

I want to define \ext to behave exactly like \lim. I tried \newcommand{\ext}{{\mathrm{ext}}\,} but that doesn't behave exactly like \lim.
1
vote
0answers
345 views

large integral symbol, matching a matrix of 3 rows [duplicate]

Possible Duplicate: How can I have a bigger integral (\int) delimiter? Please tell me where could I find a large integral symbol, matching a matrix of 3 rows.
2
votes
2answers
1k views

Mirror image of the neg symbol?

Is there a mirror symbol for the $\neg$ symbol, or a symbol like $\vdash$ without the bottom part of the vertical line? I couldn't find it. Thanks.
4
votes
1answer
4k views

How to insert a triple line integral?

A formula I want to typeset contains a tripple line integral, i.e. a symbol that has three integral signs that are encircled. How can I do this? I tried \oiiint, but that does not work. \iiint works ...
57
votes
3answers
94k views

How to add text under symbol in equation ?

I was trying to make something like this (something similar to \substack in \sum) in equation. How to do this ?
2
votes
1answer
2k views

How to change the position of underset?

In the command: \underset{t \rightarrow x}{\limsup} f(t) = \underset{t \rightarrow x}{\liminf} f(t) I get the {t \rightarrow x} lower under the limsup then the liminf (due to the "p" in limsup). ...
3
votes
3answers
5k views

Darker fonts for TeX output to PDF

Sources for darker fonts for math fonts and AMS math symbols for PDF output via, say, dvipdfm.exe? (1st response -- copied from by moderator) Many thanks for the help. I'm just using TeX and not ...
8
votes
3answers
10k views

Small caps for the math mode

How do I make "E" in this equation a small cap? $x^E$
34
votes
4answers
8k views

How to have overlapping under-braces and over-braces

I am trying to typeset an equation that has overlapping over and under braces as per the image below: I have managed to typeset it using a sort of a hack, by typing the equation twice, once using \...
0
votes
1answer
2k views

Cannot make latex multicolumn work

I am trying to make a matrix in LaTeX. Now I am trying to make a table with multicolumn like a b c d у So I coded \usepackage{arydshln} \usepackage{array} \usepackage{amsmath} \usepackage{...
7
votes
3answers
4k views

How do I typeset vertical and horizontal lines inside a matrix?

(From the notation used in course notes for Stanford CS229 available online.) I'm trying to typeset the following matrices made up of row or column vectors: Any ideas?
6
votes
1answer
701 views

Math symbols not being printed.

I am having problems printing an equation. I have the following definitions: \documentclass{scrreprt} \usepackage{mathspec} \defaultfontfeatures{Mapping=tex-text,BoldFeatures={Weight=2}} \...
26
votes
3answers
9k 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 ...