{math-operators} is about operators in math mode. These include sums, integrals and similar, text operators like sin, cos, etc.

learn more… | top users | synonyms

96
votes
7answers
27k views

What's the proper way to typeset a differential operator?

I can't seem to find any consensus on the right way to typeset a differential operator, whether it is: in a standalone context: as part of a derivative: as part of an integral: In all of these ...
67
votes
4answers
4k views

Spacing around \left and \right

Why does the addition of a \left and \right introduces an extra space around the formula? Specifically, why do $\cos(\theta)$ and $\cos\left(\theta\right)$ render differently? Is there a way to use ...
63
votes
3answers
21k views

What's the difference between \mathrm and \operatorname?

I apparently can't see the difference in a compilation (pdflatex) between \mathrm and \operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what ...
58
votes
4answers
58k views

Command for argmin or argmax?

How can you get the argmin or argmax in Latex? Two solutions I found are: \underset{x}{\operatorname{argmax}} \DeclareMathOperator*{\argmin}{arg\,min} Any other ideas? [1] ...
44
votes
3answers
8k views

What is the difference of \mathop, \operatorname and \DeclareMathOperator?

One sees all kind of versions in source files for defining something like a limit etc. So my question is which one serves what purpose. Is there any "best practice" in chosing one over the other?
36
votes
8answers
2k views

How can I specify a long list of math operators?

The preambles of my LaTeX documents often include many many lines of \DeclareMathOperator instructions, e.g. \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} ...
33
votes
2answers
10k views

newcommand vs. DeclareMathOperator

As far as I understand, whatever can be done using DeclareMathOperator can also be achieved using newcommand, but not the other way around. If this is the case, what are the circumstances where ...
32
votes
6answers
8k views

Define additional math operators to be typeset in roman

Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log. How can I define additional ...
32
votes
3answers
34k 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 ?
29
votes
5answers
5k views

How to present a vertical multiplication/addition

How do I present vertical (columnar) multiplication and addition in LaTeX. Like this: http://mathworld.wolfram.com/LongMultiplication.html 3 8 4 x 5 6 --------- 2 3 0 4 1 9 2 0 --------- 2 ...
27
votes
3answers
1k views

How are big operators defined?

I would like to create a new "big operator", by which I mean something like the Σ character used for summations. I know about the \DeclareMathOperator* command, which creates an operator whose ...
22
votes
2answers
665 views

how can I create the negation of mathcal letters

I know that the negation of < is got by \not <. The same with many symbols. But this doesn't work with mathcal letters for example, like \not \mathcal{R} or \mathcal{\not R}.
21
votes
2answers
526 views

Typeset assigments +=, -= etc nicely?

Could someone please show me how to get LaTeX to properly typeset the -=, += assignment operators. I have tried $a -= 1$ $a\texttt{-=}1$ $a\verb!-=!1$ but they all look really ugly. I have been ...
20
votes
2answers
251 views

Defining arithmetic operators that insert brackets according to usual precedence rules

I have a program that generates bits of Tex code like these: $\product{a}{\add{b}{c}}\leftrightarrow \add{\product{a}{b}}{\product{a}{c}}$ $\add{a}{\add{b}{c}}\leftrightarrow \add{\add{a}{b}}{c}$ ...
19
votes
3answers
42k 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! ...
17
votes
5answers
477 views

Brackets around a sum that has no top limit

MWE: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \thispagestyle{empty} \[ \mathcal{F} \left\{ \sum_j e^{-2i\pi\nu_j t} \right\} \] \end{document} Result: The sum only ...
17
votes
2answers
498 views

How do you create .+?

I would like to display a = b .+ 1 But it is displayed as a = b. + 1 (moves . next to b).
17
votes
7answers
9k views

Average integral symbol

Is there in LaTeX a symbol or a macro for the average integral with a horizontal slash? I know about \strokedint, but I'd prefer the dash to be horizontal.
16
votes
2answers
3k views

Lower and upper Riemann integrals?

How can I make an integral symbol with a bar above it or a bar below it?
16
votes
1answer
609 views

Customized summation symbol

I am interested in defining some customized math symbols out of existing ones. For example I would like to distinguish between different types of sums, so beside the usual symbol I would like to ...
16
votes
2answers
8k views

double perpendicular symbol (for independence)

I found from http://jblevins.org/notes/latex that I could use the independence symbol: \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} ...
16
votes
1answer
584 views

Load integral sign from eulervm

I want to write a book for university and I want to have the "german" integral symbol in it. I tried using mathabx and wasysym but I don't like them. But I like the integral symbol in eulervm. How do ...
15
votes
3answers
221 views

Printing the first N terms from a telescoping series

I would like to produce a LaTeX document that generates the first N terms of the telescoping series sum(1/k-1/(1+k)) where k=1,2,3...,N, such that it displays at least the first 10 terms. I want the ...
15
votes
3answers
429 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 ...
15
votes
2answers
4k views

Getting the expectation symbol to behave like $\sum$ instead of $\Sigma$

How can I get an expectation symbol which behaves like $\sum$? Specifically, I want the underscore to be like that of a summation. At the moment I use $$\mathbb{E}_{x\in A}$$ However, I do not ...
15
votes
2answers
3k views

How do I do a one-shot MathOperator?

The amsmath packages helpfully define a macro \DeclareMathOperator which does what it says on the tin: it declares a mathematical operator such as \sin or \Null or whatever and typesets it all nice ...
15
votes
1answer
826 views

Making a unary operator out of a binary operator or relation symbol

Often in physics, the symbol \sim is used as a unary operator to mean "approximately." For example, one might say "the energy of these processes is $\sim 4$ eV." However, this looks awkward because ...
14
votes
4answers
2k views

Spacing between triple vertical lines

I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like $|||\cdot|||$. I would like to know how to decrease the spacing between the vertical bars such ...
14
votes
2answers
6k views

Limits under multiple \sum

I would like to place a lower limit under two consecutive \sums, somewhere in between. So I have \sum_{j=1}^{\infty}\sum_{k=1}^{\infty} and would like to place j>k in the lower limit between the ...
14
votes
1answer
645 views

R-Integral symbol for my notes

I am typing up a set of notes for the Riemann Stieltjes integral. For reasons beyond the scope of the question, I would like to start with defining the Darboux's integral and then formulate Riemann's ...
14
votes
1answer
266 views

How to write a formula using box product

Can anybody help in writing the following formula... I am having trouble. LHS I can write, but not the RHS.
13
votes
3answers
307 views

How could LaTeX replace the tokens <= by the command \leq?

How could LaTeX replace the tokens <= by the command \leq efficiently? Example 1: I have this code: \[ 2x <= 4x - 2 \] And I want to get after the compilation this: Example 2: \[ ...
13
votes
4answers
596 views

Is there another symbol that is slightly different from \forall (likewise for \exists)?

What Is there a symbol that is slightly different from $\forall$ (e.g. having a second line from upper left to lower middle)? It should obviously mean "for all" but be sufficiently different to not ...
13
votes
4answers
385 views

Creating a circled operator which expands into a lozenge

I have a LaTeX document which has a binary operator called "composition". Normally, this is written as a circled letter, where the letter is passed as a parameter: \comp{x}. I can achieve good results ...
13
votes
3answers
12k views

Supremum of the infimum

Consider the following snippet: $$\text{d}_{H}(A,B) = \max\left\{ \sup_{a\in A} \inf_{b\in B} \text{d}(a,b),\sup_{b\in B} \inf_{a\in A}\text{d}(a,b)\right\}$$ In the output, the text under the ...
13
votes
1answer
292 views

Opposite product signs in the sense that black and white are interchanged

In a special algebra I use with amssymb the products \newcommand{\bDiamond}{\mathbin{\Diamond}} \newcommand{\bLozenge}{\mathbin{\blacklozenge}} \newcommand{\bCircledast}{\mathbin{\circledast}} ...
13
votes
1answer
194 views

How can I use German umlauts in DeclareMathOperator?

I would like to define a math operator Homöo, but when I try \DeclareMathOperator{\Homoo}{Homöo} \DeclareMathOperator{\Homoo}{Hom\"oo} I get Homo. How can I use German umlauts in ...
12
votes
5answers
391 views

Integration Symbol with Limits

How can I write the integration symbol in latex as shown in the picture?
12
votes
3answers
2k views

Correct spacing when using \sim as negation

When using \sim as a symbol for negation it gives incorrect spacing and this is clear if the spacing is compared to the spacing of \lnot: How can the spacing be corrected? \documentclass{article} ...
12
votes
2answers
2k views

Phantom width of binary operator

Using beamer. Let's say I want to write A+B but with the plus invisible in one slide and visible in the next one. I think I read somewhere that more space is left normally around the + for being a ...
12
votes
4answers
2k views

How to create my own math operator with limits?

How can i write my own math operator with limits? I want it to look like: \sum\limits_{e=1}^{m} but with a capital A (if possible bigger than the normal text) instead of the sum. Thanks for the ...
12
votes
5answers
3k views

Define strange operators

I' looking for a symbol rendering the connected sum of $n$ topological spaces (or other quite strange topological operations) in a "product-like" manner... What For example in writing $$ ...
12
votes
1answer
1k views

Double sum over i and j with i \neq j

I would like to represent a double sum with i\neq j. So I want two capital sigmas with text i\neq j underneath them. How can I achieve this?
12
votes
2answers
317 views

Better automatic spacing of differential d?

This question was basically about whether the differential d should be upright or italicized, not about how to achieve that in tex. However, this useful answer did suggest something like the following ...
12
votes
2answers
529 views

Symbol for skeptical consequence that matches the turnstile package

This might be seen as a follow up to Symbol for skeptical consequence. From it I got answers so that I could write that B is a skeptical consequence of A such as which Peter Grill's code produces. ...
12
votes
1answer
331 views

Problem with “equal” sign and glossary entry definition

I am using glossaries package and I encountered a problem in the symbol field. When I define it as $m=1$ I get the following error message: ! Missing $ inserted. <inserted text> ...
12
votes
1answer
21k views

LaTeX adjusting \sum limits

is there a way to show \sum limits partially in inline mode and partially in display mode? i.e., I want to write \begin{equation} \sum_{n=-\infty}^{+\infty} [...] \end{equation} but this way the ...
11
votes
4answers
364 views

Filled \Diamond-product sign

I use the multiple \Diamond-product sign (\bDiamond) as described in sign for multiple $\Diamond$-product. Now, in addition, I would like to have a filled \Diamond-product sign, i.e. filled with ...
11
votes
4answers
1k views

How do I put a circle around an operator?

For example, I want to put a circle around \land, just like one can put a circle around + by writing \oplus. Is there a general method to do this?
11
votes
4answers
478 views

How to construct a logic argument with colored hline with length under control?

How to construct a logic argument like this one? I can construct it like this: Latex of my argument: \documentclass[10pt]{article} \usepackage{newtxtext} \usepackage{newtxmath} ...