# Tag Info

92

There are many differences. The main one is in the fact that \mathrm{xyz} behaves like an ordinary letter, while \operatorname{xyz} behaves like function names such as \sin. Here's an illustration $\sin x + \sin(x+y) + a\sin z$ $\mathrm{sin} x + \mathrm{sin}(x+y) + a\mathrm{sin}z$ where it's clear that the second line is wrongly typeset. Even if your ...

73

As Pieter says in his comment, \DeclareMathOperator*{\argmin}{arg\,min} is indeed the correct LaTeX way to do that. This requires \usepackage{amsmath} (actually amsopn would be sufficient, it's automatically loaded by amsmath which is recommended for math typesetting anyway). Note: the * that follows \DeclareMathOperator sets the underscored option (the ...

65

There is a standard: it should be upright, not italicized. Read Typesetting mathematics for science and technology according to ISO 31/XI I suggest using the commath package to correctly typeset differentials.

64

I've found an answer in a usenet post by Heiko Oberdiek and another by Donald Arseneau. Improved code thanks to shiznick. The issue is that \left and \right introduces an inner atom (see The TeXbook, chapter 18, section 4), which has different spacing rules than ordinary atoms, produced by ( and ) (and the other delimiters). To remove this spurious ...

59

\DeclareMathOperator is designed to create commands that should typeset operator names such as sin and lim. Some of these are already defined in base TeX or LaTeX so one writes 2\sin\theta instead of 2sin\theta giving correct spacing and font. If you need an operator of this type that is not predefined, then you create it with \DeclareMathOperator, ...

53

\DeclareMathOperator{\foo}{foo} and \DeclareMathOperator*{\hocolim}{hocolim} for sub- and superscripts in the limits position.

50

When is it better to use \operatorname (or its wrapper \DeclareMathOperator) instead of \mathop? The answer is easy: always, unless you know precisely what's the behavior of \mathop. First of all, one must of course recall that \operatorname and \DeclareMathOperator are provided by the amsopn package, which is automatically loaded by amsmath, but is also ...

43

You have been told how to get a curved L. But here's some more general advice, which also applies in this situation: In cases such as this, always create your own shortcut macro, say \newcommand{\Lagr}{\mathcal{L}} This way, if you ever decide that that curly L is not quite the one you like, it is easy to switch. Also, even before you knew the answer to ...

41

the xlop package does this sort of thing. It does warn that it uses "french conventions", but at least for multiplication it looks fine, to me. disclaimer: i last did multiplication sums in school in the 1950s... \documentclass{article} \usepackage{xlop} \begin{document} \opmul{384}{56}\qquad \end{document}

39

I'd say it really depends on the context. As Emre pointed out, there's an ISO standard; according to wikipedia, ISO 31-11 was superseded in 2009 by ISO 80000-2. The latter carries the title "Quantities and units -- Part 2: Mathematical signs and symbols to be used in the natural sciences and technology". As a mathematician I think: Why should I use the same ...

32

You should place the expression in the subscript, as shown below. Most LaTeX books explain this. \documentclass{article} \begin{document} Display mode: $\max_{1 \leq j \leq n}$ Inline mode: $\max_{1 \leq j \leq n}$, $\max\limits_{1 \leq j \leq n}$. \end{document} Note how I used \limits to force the subscript under the operator in inline mode (if ...

30


29

tl,dr: It's complicated, but be consistent. I believe the answers here tend to miss the point. While Emre mentions that there is an international norm regarding typesetting mathematics that is very explicit about this topic, Hendrik Vogt makes the right argument, but doesn't take it far enough. This question doesn't have an answer as simple as yes or no, ...

29

Operators such as \sum are not defined with \DeclareMathOperator that should be used (with or without a *) for “textual” operators. The definition of \sum is \DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50} that becomes, internally, \mathchardef\sum="1350 The macro \DeclareMathOperator uses \mathop, which has a strange property: if its argument ...

27


22

\not is designed for negating relation symbols basically as wide as the equals sign. But it doesn't always work and, for instance, one should use \notin rather than \not\in because the membership sign is too high. Here's a possible solution for your “negated relations”: \documentclass{article} \usepackage{xparse} \NewDocumentCommand{\calrel}{sm} {% ...

22

\mathop allows you to perform operator-related things (like sub-/superscripting underneath/over top in display style) on non-operator symbols: \documentclass{article} \begin{document} $\mathop{\sum\sum}_{i\neq j}$ \end{document} Using amsmath, it is also possible to declare a new operator, say \sumsum, if you're using this notation on a more ...

22

The package mathtools has implemented a general solution for that problem. It defines the command \DeclarePairedDelimiter that you can use as follows: \DeclarePairedDelimiter\parentheses{\lparen}{\rparen}. With this single declaration you have a new powerful command for several cases: \parentheses{x} just replaces $(x)$ \parentheses*{x} will do the right ...

22

The scalerel package allows you to scale a symbol to the size (and vertical positioning) of another symbol. So in this case, I define \foo to scale \maltese to the size of \sum. Thus, it piggybacks its sizing off the well defined behavior of \sum. It wasn't clear to me if the questioner wanted to keep the maltese cross the same size in all operations. ...

21

Something like: \mathop{\sum_{j=1}^{\infty}\sum_{k=1}^{\infty}}_{j>k} maybe? Looks like this: Or if you want it on the same line as j=1 and k=1, then maybe: \mathop{\sum^{\infty}\sum^{\infty}}_{j=1\ j>k\ k=1}

21

\newcommand{\periodplus}{\mathbin{{.}{+}}} $$a=b\periodplus 1$$ TeX (and so LaTeX) doesn't interpret spaces in the code for math formulas, but relies on its predefined rules. For TeX a, . and b represent "ordinary" symbols and + a binary operation symbol. Consecutive ordinary symbols are set without any space between them; instead, the combination ...

21

\mathop is the most primitive command, declaring the class of a character or subformula to be a unary math operator like \sum, for instance. This has consequences for spacing, compared to binary operators declared with \mathbin or binary relations declared with \mathrel, for instance. Most math operators are written out as textual names. Some definitions ...

20

Solved this for Inline mode by using $\underset{1 \leq j \leq n}{\max}$, however this approach requires the amsmath package.

20

You are looking for \mathop: http://www.giss.nasa.gov/tools/latex/stackrel.html If you really want to do exactly what amsmath does then \operatorname is a better choice.

Only top voted, non community-wiki answers of a minimum length are eligible