{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

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 ...
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 ...
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 ...
36
votes
8answers
1k 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} ...
8
votes
4answers
970 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.
56
votes
4answers
57k 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] ...
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 ...
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 ...
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 ...
11
votes
4answers
990 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?
8
votes
2answers
292 views

Writing specific versions of an operator for display and inline modes

I'm busy answering a question by constructing a new math operator that uses the sum symbol and some TikZ placed on top. My answer as it stands can be found here. It looks (I think) pretty good in ...
10
votes
4answers
1k views

Swap definition of starred and non-starred command

I don't like the fact that I am required to use \abs* when I want the vertical line of the absolute value to automatically re-size. I pretty much always want it to re-size, so would like to swap the ...
17
votes
7answers
8k 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.
4
votes
1answer
287 views

Typing Following notation in Latex [duplicate]

I need to generate following notation in LaTeX. It's used in differential geometry to denote vector fields. I can't find documentation and detexify is not helpful either.
62
votes
3answers
20k 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 ...
42
votes
3answers
7k 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?
13
votes
3answers
11k 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 ...
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 $$ ...
10
votes
2answers
30k views

Dot notation for derivative of a vector [closed]

If I want to use the dot notation for the time derivative of a vector is better (more common) to put the dot over the vector, or the other way around \dot{\vec{v}} \vec{\dot{v}} The first says ...
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}} ...
13
votes
3answers
304 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: \[ ...
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 ...
10
votes
2answers
1k views

Exchange meaning of : and \colon

I usually use the colon symbol : to denote maps. For set syntax there is the braket package. So as the spacing of : is not appropriate, I want it to behave like \colon. I tried ...
7
votes
3answers
837 views

The modulo two sum sign in LaTeX

I would like to know how I can obtain the 'modulo two sum' sign (unicode 2A0A i.e., the letter sigma with a circle in its middle). I know I can obtain it by using the unicode-math package. But does ...
6
votes
1answer
334 views

how to place text on fraction for accounting formulas?

Sorry for the bad grammar. English is not my native language. I want to have text on a fraction type line to show up in an accounting formula, here's an example of what I want: So, I've tried ...
6
votes
1answer
233 views

Automatic reduplication of equal sign in the beginning of broken formula

Suppose we have the following code \documentclass{article} \begin{document} $a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z$ \end{document} which produces the following result I want to have ...
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 ...
12
votes
2answers
313 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 ...
15
votes
2answers
3k 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 ...
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 ...
11
votes
4answers
362 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 ...
8
votes
1answer
3k views

How do I write $\sim$ approximately with the correct spacing?

I would like to use the symbol $\sim$ as "approximately". e.g: \documentclass{minimal} \begin{document} There are $\sim 10^{80}$ atoms in the universe. \end{document} I think that I need to declare ...
11
votes
3answers
193 views

Easy command or package for properly formatted integrals?

I like to format my integrals so that there is less space between the integral sign and the integrand, more space between the integrand and differential, and so that the differential is upright. ...
10
votes
2answers
1k views

Too small space when using \DeclareMathOperator

Currenlty I'm writing a math script (ring theory, PDF). When I need a new math operator I use \DeclareMathOperator from the amsopn-package. However I noticed some strange behaviour when using an ...
9
votes
3answers
707 views

Space on the right hand side of a unary math operator

I know that \mathop{...} is used to give some space on the both sides of the binary operator. Could anyone tell what to use to give some space only on the right hand side of an unary math operator? ...
8
votes
1answer
111 views

Change spacing around binary operators

I'd like to change spacing around binary operators and this issue is discussed there: How to change default for spacing around binary relations? Is there way how to change spacing in math and ...
7
votes
3answers
439 views

How to extend the text under summation symbol without making extra space

I want to get the following: I tried the following \[ a(i,k) \leftarrow \min\Big\{0, r(k,k) + \sum_{i^{'} | i^{'}\notin \{i,k\}}\max\{0, r(i{'},k)\}\Big\} \] and got How can I make the ...
7
votes
2answers
437 views

Log-like operator with math inside (e.g. p-lim)

I am looking to make a log-like operator that looks the same as $p \text{-lim}$. The best way so far I found to do this is \DeclareMathOperator*{\plim}{\text{$p$-lim}} Question: Is this the ...
6
votes
1answer
125 views

sign for multiple $\Diamond$-product

I use $\Diamond$ as a product sign and want to have something like $\bigDiamond_{i=1}^{n}$ to note multiple $\Diamond$-products. Similar to $\wedge$ and $\bigwedge$ or $\vee$ and $\bigvee$. Is there a ...
5
votes
1answer
1k 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: ...
9
votes
2answers
578 views

Mixing math character classes (e.g. \mathord to the left and \mathrel to the right)

It is possible to have a symbol or group behave to the left as if it had one particular math character class and to the right as if it had another? One typical case where this comes up is when one ...
4
votes
1answer
118 views

How to redefine a command using \DeclareMathOperator

I'd like to declare some new operators using \DeclareMathOperator and some of the names are already taken by other commands (that I do not want to use). Is there an equivalent to the \renewcommand ...
1
vote
0answers
160 views

How to implement a template for math journal? [closed]

I want to design a math journal. Please give me a structure for it. For any article there is an individual .tex file. (Excuse me for my bad English :) )
14
votes
1answer
639 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 ...
7
votes
1answer
9k views

Two different calligraphic font styles in math mode

I have been succesful in using the calrsfs package together with the standard CM type1cm font. I have been able to obtain in separate documents different calligraphic symbols in math mode with ...
4
votes
2answers
1k views

How to declare an operator with automatic argument bracketing

I'd like to have an easy way to declare an operator that brackets its argument with a particular delimiter. As an example I'd like to be able to write \Pr{X} to mean the same as ...
17
votes
5answers
470 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 ...
13
votes
1answer
291 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}} ...
12
votes
2answers
520 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. ...