Questions tagged [math-mode]

{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}.

Filter by
Sorted by
Tagged with
13 votes
1 answer
8k views

Typesetting permutations with latex

I split the question into two parts and included some answers. 1. Alternatives to the permute-package The permute-package is very old (version 0.2, 1999) and can lead to problems in connection with ...
One's user avatar
  • 1,485
13 votes
5 answers
4k 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 ...
Hesam's user avatar
  • 1,971
13 votes
2 answers
5k views

How can I draw annotated braces over and under math expressions?

What LaTeX markup would one have to write to produce a result similar to the image below? Please excuse my Paint-and-mouse drawing skills. :-)
Bent Rasmussen's user avatar
13 votes
1 answer
3k views

blackboard italic font

I would like to make \mathbb{E} italic, i have tried \mathit{\mathbb{E}} and \mathbb{\mathit{E}}, both of them look like \mathbb{E}, I can not see the italic effect. Could anyone help? By the way, I ...
SoftTimur's user avatar
  • 19.8k
13 votes
3 answers
3k 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 ...
Christoph's user avatar
  • 2,913
13 votes
2 answers
4k views

How can i shrink (or expand) the vertical spacing in \stackrel?

I've seen the following command used a lot to make the triangle-equals operator that means "is defined as": \newcommand{\defeq}{\stackrel{\triangle}{=}} However, I don't like how far apart the ...
Brandon's user avatar
  • 1,951
13 votes
2 answers
1k views

How can I enable italic correction for LuaTeX?

LuaTeX ignores mathematical italic correction by default, as noted by Khaled Hosny. This leads to some awful errors when using some alphabet which is very slanted, like XITS' mathematical script ...
Mateus Araújo's user avatar
12 votes
1 answer
59k views

TeX question about double underlining in math mode [closed]

I am trying to define a macro for double underline in TeX (not LaTeX).
Carol Arlington's user avatar
12 votes
3 answers
1k views

\left and \right not working on parentheses within the same line when internal fractions are changed

I'm trying to show the product of two Legendre symbols. When I compile the following \documentclass{article} \begin{document} $$\left(\frac{x}{p}\right) \left(\frac{x}{p}\right)$$ \end{document} it ...
Antoine Ego's user avatar
12 votes
2 answers
875 views

How to globally put subscripts in math-mode in upright font using amsmath?

I'm often apply the subscript environment in math-mode to assign e.g. materials to material properties, $\eta_{oil}$, $\lambda_{air}$, etc. Not very mathematical but hey, I'm an engineer ;-) I'm ...
nici2go's user avatar
  • 121
12 votes
2 answers
5k views

Proper punctuation after cases environment

I know that when writing a displayed equation, it's correct to write punctuation before the closing \] as follows: This proves \[ x^2 = 3, \] and it follows that \[ x = \pm\sqrt{3}. \] If I'm using ...
Sophie Alpert's user avatar
12 votes
2 answers
4k views

mathabx and mathtools: \widetilde{} and \dot{} problem

The problem is the odd placement of g in the second line in the align environment. Strangely, the \dot{}-character is only misplaced if it is followed by another character. I need the mathabx package ...
gofvonx's user avatar
  • 245
12 votes
2 answers
691 views

Is there a way to stop the vertical spread of multiple super- and sub-scripts?

I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were ...
Andrew Stacey's user avatar
12 votes
4 answers
34k views

Insert symbols inside verbatim mode LaTeX

I cannot insert mathematics symbols inside a verbatim mode in LaTeX. This how I do: \usepackage{alltt} \begin{verbatim} 1- Train triggers model \( X_{i} \) -> Y_j (X_i: source phrase ...
Poisson's user avatar
  • 339
12 votes
2 answers
12k views

Proper way to use \ensuremath to define a macro useable in and out of math mode

Based on this solution related to defining a macro I came up with this macro to help me define a macro that I can use either in or outside of math mode. The example as is functions as I want. However,...
Peter Grill's user avatar
12 votes
1 answer
407 views

Replace individual page numbers with mathematical expressions

I'd like to replace a few individual page numbers in a document with mathematical expressions, like $a^0$ for page 1, $2(2)^1$ for 4, etc. I don't have a ToC or index, so I'm not concerned about the ...
Keila's user avatar
  • 581
12 votes
3 answers
357 views

Text across several summation symbols

I have a question on how to have the following in an equation. Here is some working code to start with: \documentclass[12pt]{article} \begin{document} \begin{equation} P(X)=\sum_{X\in A}\cdots \...
JACKY88's user avatar
  • 2,207
12 votes
3 answers
4k views

Matrix inside matrix

How I can make a matrix inside a matrix as shown in this picture? Indeed, I want to treat every block as a separate matrix. For example, I want to add braces over and under the second matrix by ‎\...
Qaher's user avatar
  • 1,242
12 votes
1 answer
15k views

How to use system font for equation in XeLaTeX?

I am trying to use system font for LaTeX. I am able to do it for text but not for the math part. Here is an example (compiled using XeLaTeX), where I use the font "Broadway", but it doesn't work for ...
Sumit's user avatar
  • 223
12 votes
2 answers
5k views

vertical equality in

How does one get inline or at least formula space typography of the following sort in an easy to parse (for the editor) way when writing formulas, for instance: Yes, I know, the equalities ... can be ...
Gottfried William's user avatar
12 votes
2 answers
25k views

math mode coloring [duplicate]

I want to color some of the symbols in math mode, but not their subscripts. However, when I do this, the subscripts are broken and escapes from the text. I have prepared a minimal example to ...
Kartal Tabak's user avatar
12 votes
4 answers
8k views

How to break this long radical into multiple lines?

I've got a very long radical in a display-math environment, so long that the equation spills in the right margin. How can I break that equation over multiple lines, so that it doesn't go into the ...
minthao_2011's user avatar
  • 4,534
11 votes
2 answers
3k views

How to change the default font of math operators

How to change the default font of math operators? The problem is that if I use the command \DeclareMathAlphabet\mathrm{U}{eur}{b}{n}, only new defined operators will be changed in terms of its font. ...
Qian's user avatar
  • 317
11 votes
3 answers
1k views

Squares for answer choice options and perfect alignment to mathematical answers

Since 2005, I have generally used this model to create multiple-choice tests for my students. I kindly ask you if there are packages or macros, or particular strategies to have squares with the ...
Sebastiano's user avatar
  • 54.3k
11 votes
2 answers
769 views

Why is exponent so low when used with hat-quantity in a fraction? Is this a bug?

Here is the MWE: \documentclass{article} \begin{document} \[ \hat{R}^2\quad\frac{1}{\hat{R}^2} \] \end{document} which give (I highlight with red for better see the lower "2" in the second ...
quark67's user avatar
  • 4,176
11 votes
1 answer
2k views

Interaction of \boldmath and \not

It seems that using \boldmath (or \bm) along with the \not does not quite work so well. Here is an example using \not\subseteq and \not\le where the line representing negation does not stretch ...
Peter Grill's user avatar
11 votes
4 answers
66k views

How continue an equation next line

How can continue the equation of the rectangle red in next line? \documentclass[11pt,a4paper,twocolumn]{article} ... \begin{equation*} \left| \dot{r} \right| = \sqrt{{- \, {e}^{-t} \left( \...
LuisPac's user avatar
  • 443
11 votes
4 answers
1k views

Depth and height confusion

I create two equations: $x \notin \mathbb{N}$; and $x \in \mathbb{N}$. As it turns out, both have the same depth value: Depth = 0.39098pt Height = 7.5pt Depth = 0.39098pt Height = 6.88889pt ...
implicit_knowledge's user avatar
11 votes
1 answer
17k views

Systeme package

I am using the systeme package to create an equation system. I am also using the mtpro2 package for mathematical notation. When I want to create a 2x2 system with a curly bracket, it works just fine ...
mac's user avatar
  • 1,479
11 votes
1 answer
4k views

What is a good method for producing a unary plus/minus sign that always works?

Say I have a macro that does something in math mode (say, change the mathalphabet). This macro, \somecommand, takes one argument. I might want use is like this, feeding an empty argument into it: \(\...
Lover of Structure's user avatar
11 votes
4 answers
45k views

How to typeset an isomorphism symbol ($\simeq$) with a long bar

Is there any way to typeset in LaTeX a \simeq with a longer bar, or equivalently \stackrel{\sim}{\longrightarrow} without the arrowhead?
user avatar
11 votes
2 answers
847 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
Peter Grill's user avatar
11 votes
2 answers
2k views

Color fraction bar

What would be the easiest way to create a fraction whose bar can be coloured as desired? I know one can use the \genfrac{left-delim}{right-delim}{thickness}{mathstyle}{numerator}{denominator} command ...
azetina's user avatar
  • 28.9k
11 votes
3 answers
469 views

uncommon form of continued-fraction expression

I have a copy of the text from the book to do. But I have been working in latex for a month and I have a problem with remaking these continued fractions. My code is looking like this: \[ \frac{n_{0}}{...
Cloudy's user avatar
  • 111
10 votes
3 answers
4k views

How do I get italic sans-serif in math mode?

I have a paper in which I originally used mathit, bold mathit, mathcal and bold mathcal to distinguish various types of entities. Reviewing the paper on-screen it appears that \mathit{C} and \mathcal{...
shmuel's user avatar
  • 1,449
10 votes
7 answers
2k views

Why doesn't TeX/LaTeX interpret multi-letter sequences as functions / parentheses as \left/\right in math mode by default?

I am in constant search for an alternative to LaTeX, but it seems I am stuck for it for a long time, and I am trying to see the bright side of it. The other day one thought struck me, I think, LaTeX ...
nimcap's user avatar
  • 5,145
10 votes
2 answers
418 views

If fractions are Inner atoms, why don't they have thin spaces on either side?

The TeXbook says that fractions are Inner atoms. But if so, they don't seem to have thin spaces on either side when Inner atoms have them. For instance, in \documentclass{article} \usepackage{...
MSC's user avatar
  • 2,722
10 votes
1 answer
25k views

Substitute \frac for a slash (/) only on inline math mode

I was wondering if there is a way to have LaTeX interpret $\frac{a}{b}$ as $a/b$, but \[\frac{a}{b}\] as \[\frac{a}{b}\]. It is a little tedious to change a inline equation $a/b$ to a display ...
josinalvo's user avatar
  • 1,177
10 votes
1 answer
2k views

Consistent vertical positioning of superscripts

This is somehow a follow-up question to this one. I've got the following math expression: \nabla_y u_0^{(i)}\nabla_y v^{(i)} However, no matte, whether I enclose the v in curly brackets or not (as ...
Torbjörn's user avatar
  • 761
10 votes
3 answers
391 views

Best practice for printing and evaluating formulas with the minimal coding

Can the following MWE be reduced by creating a command that can accept a formula then print and evaluate it without the need to write it twice in two different forms for both evaluating and printing ...
Diaa's user avatar
  • 9,599
10 votes
1 answer
4k views

Typeset an upright ell

The $\ell$ character in math-mode is clearly slanted to match the usual slant of math-mode characters. Is there a way to typeset an upright version, that won't look slanted amid other upright-math-...
thecommexokid's user avatar
10 votes
2 answers
8k views

Easy way to type more kinds of arrows?

There is \rightrightarrows to produce two parallel arrows, \longrightarrow to produce a longer arrow and \xrightarrow to produce an extendable arrow. But is there an easy way to produce two long ...
user565739's user avatar
  • 5,492
10 votes
4 answers
20k views

Reduce Spacing In $<a>$

In math, one often needs to put a letter inside the symbols <>, e.g. to denote a cyclic group <x> generated by some element x. However, plain text displays the symbols < and > as an ...
Jeff's user avatar
  • 393
10 votes
2 answers
1k views

Wedge with vertical bar

I'm making a summary sheet of a course in LaTeX. There are, however, I have no idea how to draw two of the symbols. One of them is some sort of \wedge with a vertical bar through it, the other a \vee ...
rcannood's user avatar
  • 203
10 votes
2 answers
24k views

What does double backslash in LaTeX mean?

What does double backslash in LaTeX mean ? (please see example below) label 2-1 & label 2-2 & label 3-3 & label 4-4 & label 5-5 \\ \verb= http:\\www.chinatex.org=\\ some line have \\...
Peter Zhu's user avatar
  • 259
10 votes
5 answers
3k views

Same height for list of comma-separated vectors

I am trying to typeset a list of vectors spanning a multidimensional space, using the notation span{v_1,v_2,...,v_n} (I haven't found out how to inline it as rendered latex) i.e.: span \{ \begin{...
jonny's user avatar
  • 1,117
10 votes
1 answer
1k views

MinionPro, including math, in ConTeXt

A rather simple question, which probably will have a complex answer. I'm trying to migrate to ConTeXt, since I want to have a layout not easily achieved with LaTeX (grid...). In LaTeX, MinionPro is ...
Michel's user avatar
  • 1,672
10 votes
2 answers
935 views

What do empty math character class symbols ("\mathpunct{}") do, and when are they used?

Every once in a while, one will encounter empty math characters with a specific math character class. For example, amsmath uses \mathpunct{} in its definition of \colon: \renewcommand{\colon}{\...
Lover of Structure's user avatar
10 votes
5 answers
26k views

Math and Times font

I am trying to use the Times font for normal text and variables, and the default math font (CMR) for math. I tried using the Times package. This partially solves the problem. But I want the text in ...
Bernhard Heijstek's user avatar
10 votes
2 answers
20k views

Simpler way to add color to equations in math mode?

I was looking for a simpler way to add color to math mode. Specifically, I wanted different parts of an equation to have different colors in order to better correlate with colors in a figure. The ...
G. Khanna's user avatar
  • 518

1
15 16
17
18 19
43