Skip to main content
71 votes
Accepted

How do you make your own symbol when Detexify fails?

If it's really not in Detexify, check the Comprehensive LaTeX Symbol List to see if your symbol can be found in an existing package. Note, The Comprehensive List is long! Over 300 pages. But it is ...
Sandy G's user avatar
  • 46.6k
54 votes

double perpendicular symbol (for independence)

One can also use \newcommand{\ind}{\perp\!\!\!\!\perp} It basically makes two orthogonal symbols very close to each other. The number of \! controls the space between each of the orthogonal symbols....
Car Loz's user avatar
  • 641
51 votes
Accepted

Position the limits of Sum

The problem is that you're trying to use displaystyle limits in text mode. Which is not that good, as I explain below. I don't know if it's typographically correct but the code is $\sum\limits_{i=0}...
Moriambar's user avatar
  • 11.6k
49 votes
Accepted

Is there a short hand command to write derivatives?

You can use the esdiff package, which has handy macros for derivatives and partial derivatives, taking care of indices. Here is a demo; \documentclass{article}% \usepackage[utf8]{inputenc} \...
Bernard's user avatar
  • 273k
42 votes

Command for argmin or argmax?

Use \usepackage{amsmath} and then: \operatorname*{argmin}_\theta f(x) Or similarly (for adding a space), \operatorname*{arg\,max}_\theta f(x)
iamaziz's user avatar
  • 631
40 votes

How to create a new math operator?

A simple solution would be to use the \DeclareMathOperator* command from the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version ...
Sandy G's user avatar
  • 46.6k
37 votes

Is there a short hand command to write derivatives?

Oh, you mean not symbol, but operator. There is physics, as stated by @Zarko. \differential produces the variants of d: \dd x \derivative yields the $df/dx$ in variants: \dv{x}, \dv{f}{x} \...
Oleg Lobachev's user avatar
29 votes

Re-define "mu" in "$\mu$m" for units (upright \mu instead of italic \mu)

Per your comments, you are using "mu" to denote "micro", as in one millionth of some scientific unit. Given this situation, you need to get out of the business of attempting to ...
Mico's user avatar
  • 515k
28 votes
Accepted

What does "rel" in `\mathrel` and `\stackrel` stands for?

You asked, What does rel in \mathrel and \stackrel stand for? The meaning of rel in mathrel quickly becomes fairly obvious if one considers the entire list of 13 types of math atoms; see also p. 158 ...
Mico's user avatar
  • 515k
26 votes
Accepted

About the use of curly braces

Note that the braces are not just not required, they should not be used as \cos does not take an argument the braces form a group and force the term to lose any special math class that it would ...
David Carlisle's user avatar
24 votes
Accepted

Build this formula in LaTeX

This should be a part of basic knowledge about LaTeX ... For example: \[ PR_i = \frac{1-d}{n} + d \sum_{j\in\{1,\dots,n\}}} \frac{PR_i}{c_j} \] I strongly encourage you to read No so short ...
Zarko's user avatar
  • 300k
23 votes

Math: overwrite \int command

Use the relevant option in amsmath: \documentclass{article} \usepackage[intlimits]{amsmath} \begin{document} \[ \int_{a}^{b} f(x)\,dx \] \end{document}
egreg's user avatar
  • 1.1m
22 votes
Accepted

Rounding to nearest integer symbol in Latex

The mathtools package has a \DeclarePairedDelimiter command which lets you define such macros. I defined a \nint command which encloses its argument between \lfloor and \rceil. The starred version ...
Bernard's user avatar
  • 273k
21 votes

Is there a short hand command to write derivatives?

There is also another important and easy package to write ordinary derivate and partial derivatives named derivative. I have added only some simple examples how to use this package where the d ("...
Sebastiano's user avatar
  • 56.7k
21 votes
Accepted

Partial tensor product sign

Here is an easy "design-your-own" TikZ solution. Advantages: Easy. Nicer corners compared to clipping. Disadvantage: Not truly the exact spacing of \otimes. But close. Code: \documentclass{...
Sandy G's user avatar
  • 46.6k
20 votes

About the use of curly braces

operators like \cos or \sin don't require curly braces, because they don't take arguments; they're simply substitutions. any command that takes an argument is best fed that argument in braces. even ...
barbara beeton's user avatar
20 votes
Accepted

Why is this weird space appearing after my minus sign

You're using “mod” as a math operator like “exp” or “sin”. The command \mod is for notation such as 5 \equiv 2 \mod{3} and the inserted space is obviously wanted here. Use \operatorname{mod} ...
egreg's user avatar
  • 1.1m
20 votes

How do you make your own symbol when Detexify fails?

Another possibility with the \stackinset command, from stackengine: \documentclass[border = 2pt]{standalone} \usepackage{stackengine, graphicx} % \newcommand{\simtimes}{\stackMath\mathbin{\...
Bernard's user avatar
  • 273k
19 votes
Accepted

How to make a vertical \iff?

\Updownarrow is an extensible symbol, so you can use \Big in front of it. \documentclass{article} \usepackage{amsmath} \newcommand{\Longupdownarrow}{\Big\Updownarrow} \begin{document} \begin{align*...
egreg's user avatar
  • 1.1m
18 votes

Writing math formula in LaTeX, 'undefined control sequence'

You have \nablaf which is probably undefined, I guess you wanted \nabla f (Please always post a complete document that generates the error, it is much easier to debug then)
David Carlisle's user avatar
18 votes
Accepted

Difference between \mathop and \mathord

It's a tough call, for this case. In the linked question, the symbol “id” was apparently used in the context of functors, so like \id\otimes f and, as shown there, declaring it as an operator would ...
egreg's user avatar
  • 1.1m
17 votes

How to create a new math operator?

You can use a modified version of https://tex.stackexchange.com/a/23436/4427 (first code set). \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \makeatletter \DeclareRobustCommand\...
egreg's user avatar
  • 1.1m
17 votes
Accepted

How can I convince TeX to add space around math operators?

The space around \binop is \medmuskip and LaTeX follows plain TeX in giving this a value with a large shrink component \medmuskip=4mu plus 2mu minus 4mu You could change this value to get different ...
David Carlisle's user avatar
17 votes

Math symbol "an arrow pierces the heart"

\documentclass{article} \usepackage{amsmath} \newcommand{\piercedheart}{% \relbar \mathrel{\mspace{-3.5mu}} \mathrel{\loweredheartsuit} \mathrel{\mspace{-7mu}} \rightarrow } \makeatletter \...
egreg's user avatar
  • 1.1m
16 votes

Build this formula in LaTeX

Notice that you can find the Wikipedia's LaTeX code directly from the Wikipedia page. From the German Page Rank page (the English page has a slightly different formula), first select the required ...
Massimo Ortolano's user avatar
16 votes
Accepted

Symbol for anamorphism

The paper uses square brackets and parentheses, with a rather poor result. Here's a better one. \documentclass{article} \usepackage{amsmath} \usepackage{pict2e} \newcommand{\lbparen}{% \mathopen{%...
egreg's user avatar
  • 1.1m
16 votes

How can I reduce the gap between left and right of \cdot with a macro?

For this I recommend siunitx, that ensures uniformity in numbers and units. \documentclass{article} \usepackage{amsmath} \usepackage{siunitx} \sisetup{ exponent-product={{\cdot}}, % double brace ...
egreg's user avatar
  • 1.1m
15 votes
Accepted

How to use only selected math symbols of the STIX fonts?

Here's how to add the requested symbols. You don't have correctly identified the required fonts and symbols. Look for \lbrbrak in stix.sty, to find \stix@MathDelimiter{\lbrbrak} {\mathopen} {...
15 votes

How to align operators using alignat or someother environment?

You have to understand that, in the align and alignat environments, for n alignment points, one needs 2n – 1ampersands: the first one is to introduce a ne column (from the second column), the next one ...
Bernard's user avatar
  • 273k

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