48 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.3k
21 votes
Accepted

How to create a summation symbol with a vertical bar?

Here's a mixture of \ooalign and picture mode. \documentclass{article} \usepackage{amsmath,pict2e} \makeatletter \newcommand{\barredsum}{% \DOTSB\mathop{\mathpalette\@barredsum\relax}\slimits@ } \...
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
17 votes
Accepted

How to make text appear in the middle of a phantom in math mode?

You don't really need to use \mathclap, you can just place what you want to center in a box of the appropriate width. \documentclass{article} \usepackage{amsmath} \usepackage{calc} \newcommand*{\mask}...
Vincent's user avatar
  • 19.9k
17 votes
Accepted

How to make underbracket thinner

Excerpting from p. 14 of the user guide of the mathtools package (highlighting added): The user guide says that the default width of underbrackets is ca 5/18ex = ca. 0.28ex. The following screenshot ...
Mico's user avatar
  • 495k
15 votes
Accepted

\DeclarePairedDelimiter with \left & \right no longer works

You should not use left and right in the DeclarePairedDelimiter definition. Those are automatically used when you use the command defined there. You would use the starred version for autoscaling, i.e....
Moriambar's user avatar
  • 11.3k
14 votes
Accepted

Extensible triple-bracket delimiter with a new symbol

Encouraged by David Carlisle, I eventually resolved to post this answer. I had begun to write a comprehensive one that explained how the solution works, but I soon realized that it would have largely ...
GuM's user avatar
  • 21.4k
14 votes

\mathbb not working in \underset

The problem is caused by package flexisym. Not only \mathbb{R} is affected but also \sup is in an italic font. Anyway, \underset is not the right command for putting something below the "operator" \...
Heiko Oberdiek's user avatar
14 votes

What is the difference between \\* and \\ *?

AMS matrices use a modified form of lookahead that does not skip white space looking for * and [ this is so that you can have \begin{matrix} a & b \\ [x] & y \end{matrix} with the [ taken as ...
David Carlisle's user avatar
13 votes
Accepted

Mathtools' underbrackets and MinionPro

Let's look at the definition of \underbracket \providecommand*\underbracket{ \@ifnextchar[ {\MT_underbracket_I:w} {\MT_underbracket_I:w[\l_MT_bracketheight_fdim]}} \def\MT_underbracket_I:w[#...
egreg's user avatar
  • 1.1m
13 votes
Accepted

How can I define a big plus operator that works like \bigcup?

A rip-off of my answer at How are big operators defined?. Two completely separate macros are provided (\foo and \barr), depending on whether one wishes the \displaystyle version to grow bigger or ...
Steven B. Segletes's user avatar
12 votes
Accepted

Best Practice: Package for Mathematical Documents - amsmath and Beyond

multi-question questions don't really fit the site format but.. Do you think that it is Ok to recommend the mathtools package instead of amsmath package. The mathtools package calls the amsmath ...
David Carlisle's user avatar
12 votes

There's a bump in the implies glyph

Package amsmath uses \Longrightarrow to get the \Implies symbol. \Longrightarrow and \Longleftarrow are composed symbols with the standard fonts (unless a math font is used, which contain ready glyphs ...
Heiko Oberdiek's user avatar
12 votes
Accepted

How to write the LaTeX code of this Meijer G function

With a handier syntax: \documentclass{article} \usepackage{geometry} % more generous width \usepackage{amsmath} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\MeijerG}{smmmm} { \...
egreg's user avatar
  • 1.1m
12 votes

How to create a summation symbol with a vertical bar?

To try to improve one of egreg’s answers is an exercise that is, at the same time, both enjoyable and instructive—plus, it can give bragging rights. (;-) In this case, I deem that the accepted ...
GuM's user avatar
  • 21.4k
11 votes
Accepted

\norm symbol have different sizes in equation

This is because the subscripts i and j have different depths and you are using automatic scaling. There are two easy ways to fix this, since you are already using the mathtools and commath packages: ...
sodd's user avatar
  • 5,681
11 votes

Peculiarities in \norm* from physics.sty

Analysis Let's see what physics.sty does. First, the definition of \norm: \DeclareDocumentCommand\norm{ l m }{\braces#1{\lVert}{\rVert}{#2}} % Norm The l argument type collects everything up to (...
egreg's user avatar
  • 1.1m
11 votes
Accepted

Another solution to create a set with two conditions

Writing \eta:=\eta(x,t) has no mathematical meaning whatsoever. Since apparently D is a subset of the plane, functions over D are two-variable by definition; how you call the variables is completely ...
egreg's user avatar
  • 1.1m
11 votes

How to make text appear in the middle of a phantom in math mode?

A version that works in all styles. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\mask}[2]{{\mathpalette\mask@{{#1}{#2}}}} \newcommand{\mask@}[2]{\mask@@{#1}#2} \newcommand{...
egreg's user avatar
  • 1.1m
10 votes
Accepted

How to get the cases brace to be a link

One can try and adapt your solution How to color delimiters, which is based on collecting the material and using it in a \vphantom. The amsmath package has the convenient \collect@body to help with ...
Andrew Swann's user avatar
  • 94.9k
10 votes

Position the limits of Sum

The problem is that you didn't use displaymath operators ($$...$$ or \[...\]; I recommend the latter). If you want such a structure in inline math, you must use \limits. By implementing my solution (...
God bless's user avatar
  • 1,727
10 votes

How can I define a big plus operator that works like \bigcup?

One can easily make the “big plus” the same size as \sum: \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \makeatletter \newcommand{\bigplus}{% \DOTSB\mathop{\mathpalette\mattos@...
egreg's user avatar
  • 1.1m
10 votes
Accepted

siunitx: Abbreviations are not printed with mathtools, fontspec and unicode-math

This is imho due to a problem in unicode-math, \mathrm{\upmu} tries to output the symbol with the textfont and so you get missing character message. This affects siunitx as it uses internally \mathrm. ...
Ulrike Fischer's user avatar
10 votes

Underbrace using STIX2 math font

One should load the mathtools package before the fontspec and/or unicode-math packages. Note: Since the polyglossia package loads fontspec automatically, you should also take care to load mathtools ...
Mico's user avatar
  • 495k
10 votes

How to make underbracket thinner

The thickness of brackets can be specified in the first optional argument of \underbracket and \overbracket. The default thickness is the height of $\braceld$ (in current math font). \documentclass{...
muzimuzhi Z's user avatar
  • 25.8k
10 votes

Suppress warning by unicode-math regarding mathtools

As far as I can see the unicode-math documentation does not state explicitly which warnings are predefined. Searching the code for the string mathtools one finds the lines \msg_new:nnn { unicode-math }...
campa's user avatar
  • 29.9k
10 votes

mismath.sty bug?

The mismath package has been recently updated to load ibrackets which should help in typesetting the perverse1 French notation for intervals. % \changes{v2.1}{2022/12/26}{ % - Improved management ...
egreg's user avatar
  • 1.1m
9 votes

How to write the LaTeX code of this Meijer G function

This code provides the formula which you give in the image. \documentclass{article} \begin{document} \begin{math} G_{q,p:p_1,q_1:p_2,q_2}^{n,m:m_1,n_1:m_2,n_2}\left( \begin{array}{c} 1-\alpha-...
bmv's user avatar
  • 3,570
9 votes
Accepted

Missing space with DeclarePairedDelimiter

There should be no space between the operator name and a delimiter, so the output one gets from \sup_{n}\lvert a_{n}\rvert is right (and is one of the reasons why amsmath introduced \lvert and \...
egreg's user avatar
  • 1.1m
9 votes
Accepted

How do put \overbrace across an (aligned) equals sign?

Not quite elegant but works \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign} \rlap{$\displaystyle\overbrace{\phantom{f = \sum_{i\in I} a_i}}^{\text{ my notes }}$} f &...
campa's user avatar
  • 29.9k

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