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
19 votes
1 answer
36k views

What are the differences between $...$, $$...$$, \(...\), and \[...\]? [duplicate]

The title says it all. I haven't been able to find the answer yet, so any help would be appreciated.
Invariance's user avatar
19 votes
1 answer
4k views

How can I standardize my square root signs?

I've noticed that when square root signs get too large, their front leg goes vertical (1), and that otherwise, it angles to the right (2). How can I standardize all my square root signs to either ...
Alex Lee's user avatar
  • 191
19 votes
3 answers
12k views

How to draw a border around character in a formula?

So far everything I found on the matter of borders only applies to the text mode. I want to be able to do something like $x_i = y$ so the result will be like the ordinary "xi = z" formula with the ...
penartur's user avatar
  • 293
19 votes
3 answers
40k views

Shortcuts and/or user-defined shortcuts for math symbols in LaTeX?

I am very new to being able to use LaTeX to type up mathematical papers, and I just got my "system" set up. Currently I have installed TexWorks, and MikTex, and I have put together a 'hello world' ...
Spacey's user avatar
  • 1,159
19 votes
2 answers
10k views

Typesetting multi-letter variable names in math mode

In many applications variable names in formulas have more than one letter. In order not to mess up kerning, one cannot simply write $nameff=123$. People seem to use different approaches: \...
sheß's user avatar
  • 3,612
19 votes
3 answers
46k views

Align a linear program

I want to write my linear program so that it looks like in this picture: meaning I want to have the following: text aligned to the left all the x_{j} variables to be one another the i= and j= ...
Jessy09's user avatar
  • 717
19 votes
1 answer
5k views

Vertical position of punctuation following fractions in display-style equations

Assuming that one wants punctuation in equations, what is the best way to adjusting the vertical position of the punctuation if it follows a fraction? I am using Palatino and Euler here (which I ...
mforbes's user avatar
  • 5,561
18 votes
3 answers
67k views

To have two limits in double integral?

My tex \begin{equation} \iint \limits_{-\infty}^{+\infty} \end{equation} It looks like I want two limits there above and below. How can you have two limits above and below the two integrals?
Léo Léopold Hertz 준영's user avatar
18 votes
3 answers
8k views

Color box with rounded corners around a fragment of a formula

Is there any way in TeX to highlight some part of a formula with a box having colored background and rounded corners? At present, I need to export such formulas into an image, add those highlight ...
SasQ's user avatar
  • 281
18 votes
3 answers
25k views

Semicolon in set-builder notation

What is the best way to type ";" in the set-builder notation? I think \{\, x \in X \mid P(x) \,\} is a common way to type the set-builder notation. Someone use ":" instead of "|". Anyway, these ...
Orat's user avatar
  • 633
18 votes
3 answers
35k views

How to hide equation number with using align [duplicate]

I wrote the following to print a mathematical equation, but I do not need the number of equation to be appeared: \documentclass[conference]{IEEEtran} \usepackage{amsmath} \begin{document} \begin{...
Hamm's user avatar
  • 367
18 votes
3 answers
4k views

Correct alignment of multiple-line inequality

I want to display a set of inequalities to look like the code below this is the lower bound ≤ this is the thing to be bounded ≤ this is the upper bound My attempt to do this is the following: \...
I Like to Code's user avatar
18 votes
3 answers
5k views

How to align limits of double integrals?

I'd like to have the limits of two integrals vertically aligned. In this example, the x and b should be positioned on the same line. \[\int\limits_x^{\infty}\int\limits_b^{\infty} x^2+y^2 \mathrm{...
Matthias's user avatar
  • 183
18 votes
4 answers
11k views

Splitting root symbol

How can the \sqrt command be modified to split root symbol into two or more lines automatically? Example: \documentclass{standalone} \begin{document} \begin{minipage}[t]{0.8\textwidth} ...
m0nhawk's user avatar
  • 9,664
18 votes
1 answer
8k views

how to display upright letters in math mode without manually creating space?

\documentclass[11pt,a4paper]{article} \title{Title} \author{Author} \begin{document} \maketitle $\{ n \mid n\ \mbox{is\ even} \}$ \end{document} Since it is a relatively rare occasion for me to ...
Yes's user avatar
  • 1,639
18 votes
1 answer
23k views

Vertical spaces between lines in cases environment [duplicate]

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} X_i = \begin{cases} \left[\begin{smallmatrix} 0 \\ 1 \\ 2 \end{smallmatrix}\right] & \...
user19906's user avatar
  • 1,415
17 votes
2 answers
629 views

Interesting recursive behaviour with \frac error

I have this code below. Obviously it's not actually valid code because there's no second argument to \frac, but nonetheless I'm curious why it produces what it does. \[ \text{abc$\frac{123}$} \] ...
Ethan Lawler's user avatar
17 votes
2 answers
11k views

Ugly spacing around f in math mode

My paper contains many math expressions like $abcde$ or $abdefv$. Unfortunately, the latter looks very ugly, particularly in regards to the spacing around the f. In particular, there is a ...
A. Rex's user avatar
  • 273
17 votes
4 answers
1k views

Is the space after the differential d operator canonical when using a Times font?

I have this simple code, \documentclass[12pt]{book} \usepackage{mathtools} \usepackage{newtxtext} \usepackage[lite]{mtpro2} \begin{document} $d\bar{p}$ and $dt$. \end{document} with this output, I ...
Sebastiano's user avatar
  • 54.1k
17 votes
6 answers
4k views

Rounding a number to its hundred

Does anybody know how I could have LaTeX round a number like 2,386 so that I finally get only written 2,300? I tried with siunitx and its option [round-mode=places,round-precision=-2] but it didn't ...
Frednight's user avatar
  • 747
16 votes
2 answers
2k views

Fixing mathit spacing with unicode-math

I am using lhs2TeX to convert code into LaTeX. It typesets code into math mode. As I am also writing math formulas in the same document, I use unicode-math to switch between different math mode fonts ...
Tobias Gödderz's user avatar
16 votes
3 answers
2k views

Typesetting the square of a mathematical operator

Assume I want to typeset the square of some mathematical operator A. Using \operatorname (amsmath package), there are basically two ways to do that: \(\operatorname{A^{2}}\) (i.e., the exponent is ...
mhp's user avatar
  • 8,692
16 votes
3 answers
14k views

Spacing around \text{} in mathmode

Inspired by this question, here's my mathmode spacing bugbear. I quite often have equations that look like this: \begin{equation} \text{If}\ B_1 \succeq B_2 \ \text{and}\ B_2 \succeq B_3 \ \text{...
Seamus's user avatar
  • 73.2k
16 votes
1 answer
3k views

Putting limits *underneath* new operators

I'd like to declare a new math operator called the "strong limit" as follows: \DeclareMathOperator{\slim}{s-lim} So it's just "lim" (i.e., \lim), but with an "s-" in front. I want to be able to ...
Adam's user avatar
  • 161
16 votes
1 answer
398 views

Ligatures are not used in OpenType maths families?

The appended plain TeX example shows three cases: maths alphabets \rm, \bf, \it using plain TeX setup similarly maths alphabets loaded from "classical" Latin Modern fonts similarly maths alphabets ...
Will Robertson's user avatar
16 votes
2 answers
4k views

The font of operator names

What is the correct way of having all operator names be set in, say, sans serif? Saying \documentclass{article} \usepackage{amsmath} \makeatletter \def\operator@font{\sf} \makeatother \...
Mariano Suárez-Álvarez's user avatar
16 votes
1 answer
2k views

What document class should I use for a variable size image generator

Currently, whenever I want to make a math image, I head over to my Wikipedia Sandbox and use the WP math tag(which uses TeX). I then copy the image from the preview. I have TeXmaker (from USBTeX), ...
Manishearth's user avatar
15 votes
2 answers
1k views

Is direct utf8 input of combining diacritics in math mode possible with lualatex?

I am trying to typeset a document with combining diacritics directly input in it. I use LuaLaTex. Here is a minimal example illustrating the original issue: \documentclass{minimal} \usepackage{...
simeonz's user avatar
  • 253
15 votes
2 answers
12k views

In LyX, is there a way to toggle the display of TeX code in math expressions?

Is there a way to toggle the display of math expressions in LyX between the default, which makes an attempt at replacing TeX code with easy to read symbols (but is short of actual rendering), and the ...
orome's user avatar
  • 10.5k
15 votes
2 answers
18k views

How to switch to upright greek in math mode?

I use libertine and newtxmath font packages, they provide upright greek letters. However, there is no way to conveniently swith between italic and upright greek letters. I need a command, simillar to ...
Aydin's user avatar
  • 1,983
15 votes
1 answer
10k views

Unbroken en-dash

I am trying to get an en-dash by using two '-' characters, but instead of appearing as one long en-dash symbol, I'm getting --. Any idea how I can get an unbroken en-dash?
Isaac Kleinman's user avatar
15 votes
1 answer
520 views

When ending a sentence with the period, does it matter if the period is in maths mode or not?

Option 1: The area of the disk is \[\pi r^2.\] Option 2: The area of the disk is \[\pi r^2\text{.} \] Do they produce exactly the same result? If not, is the second option more "standard" ...
Zuriel's user avatar
  • 866
15 votes
4 answers
50k views

how to make maths equations start at the left?

how to make maths equations start at the left? $$ \lim_{ x \to 0} \frac{\log {10 + \log(x+ \frac{1}{10})}}{x} = 10 $$ this display on center we want to start it left
AJITH's user avatar
  • 151
15 votes
5 answers
9k views

Pushouts and pullbacks

How do I typeset that little symbol which indicates that a commutative square is a pushout or pullback square? I usually draw my diagrams in XY-pic, so I'd be most interested in how to do it there. ...
K.J. Moi's user avatar
  • 251
15 votes
3 answers
6k views

I want a really small underbrace

This question is related to, but distinct from Oversized \underbrace's label causes unwanted spacing. My issue isn't with the spacing of the label, but with the size of the underbrace itself. ...
jdc's user avatar
  • 1,245
15 votes
2 answers
939 views

How to detect whether a command enters math mode behind the scene?

Commenting out the %\usepackage{hyperref} in the following code snippet will produce some warnings. Using \usepackage{hyperref} and \section{} to detect whether a command enters math mode may not be ...
Display Name's user avatar
  • 46.9k
14 votes
3 answers
120k views

Capital cursive E in math mode? [duplicate]

How do I get a capital Cursive "E" in math mode? See picture encl.
WobblyWindows's user avatar
14 votes
2 answers
15k views

Any good way to write mathematical induction proof steps in LaTeX?

I need to write some mathematical induction using LaTeX. Are there any packages that I can use for that purpose?
prosseek's user avatar
  • 6,033
14 votes
1 answer
7k views

What math font is a good complement for Charter font?

(update) Just in case anyone else is interested in this, here's a combination I just found that comes close to being ideal, for my taste. Similar math font as that of the mathdesign package, but ...
Bert Zangle's user avatar
14 votes
2 answers
19k views

Double Slash close together

I am looking for a certain symbol. It looks like // but closer together and in mathematics refers to a GIT quotient. Any help would be greatly appreciated! Thanks!
Tyler Kelly's user avatar
14 votes
2 answers
2k views

two fonts in math mode

In math mode (e.g. between $ $) I would like to use by default computer modern math but to define a new character with a different font e.g. mathpazo. Practically, i want to define a new command \...
PanAkry's user avatar
  • 595
14 votes
6 answers
4k views

Sum of (example: 0+1+2+3 = 6 , 0+1+2+3+4+5+6+7 = 28 and so on)

Can anyone help please? I need to know how to make the sum of value S(n) = 0+1+2+3+4...+(n-1)+n (example: 0+1+2+3 = 6 , 0+1+2+3+4+5+6+7 = 28 and so on) on Latex
rudstep's user avatar
  • 141
14 votes
6 answers
2k views

Defining `$$$ $$$` to align

I would like to define $$$ \zeta(s) = \dfrac1{1^s} + \dfrac1{2^s} + \cdots $$$ as a short hand for \begin{align} \zeta(s) = \dfrac1{1^s} + \dfrac1{2^s} + \cdots \end{align}` How should I go about ...
Adhvaitha's user avatar
  • 307
13 votes
2 answers
43k views

Why are minus signs not working in this equation?

In the below equation I'm writing, 2 minus signs are not visible, why is that? $\phi (s, \lambda) = C \frac{ 1 + \beta^2 − 2 \beta cos( \frac{2 \pi s}{\lambda} ) }{ \lambda^5 \exp( \frac{ h c }{ \...
Ryan's user avatar
  • 133
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
13 votes
1 answer
4k views

Set math fonts to predefined color

I am trying to define math text is some predefined color as in my preamble: \setbeamercolor{math text}{pmsGreen} \everymath{\color{pmsGreen}} \everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}...
BaRud's user avatar
  • 2,179
13 votes
2 answers
13k views

Centering an item in cases environment [duplicate]

I wish to center the 1 in the following LaTeX code: \begin{align*} v'(k,\CS)= \begin{cases} \displaystyle\frac{G_{max}(k){-}q_k'(CS)}{G_{max}(k){-}\Gmin(k)} & \text{if }G_{max}(k) {\neq} G_{...
william007's user avatar
  • 4,781
13 votes
4 answers
6k views

What is a simple way to create a binary relation symbol on top of another?

What is a simple way to have \ll on top of \gg with equal size and vertically center aligned and have them work as a binary relation symbol like \lessgtr? The commands \underset and \overset cannot be ...
sawa's user avatar
  • 357
13 votes
2 answers
4k 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
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

1
14 15
16
17 18
42