Questions tagged [mathtools]

{mathtools} is an extension package to amsmath. It provides bugfixes and adds useful tools for mathematical typesetting.

The mathtools package is an extension package to amsmath. There are two things on mathtools’ agenda:

  1. correct various bugs/deficiencies in amsmath until these are fixed by the AMS, and
  2. provide useful tools for mathematical typesetting, be it a small macro for typesetting a prescript or an underbracket, or entirely new display math constructs such as a multlined environment.
528 questions
13
votes
3 answers

mathtools: \dddot cause the term to rise

From Dot Derivative Discrepancy, I have tried the using \hspace{0pt} and \makeatletter \renewcommand{\dddot}[1]{% {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ \hbox{\normalfont ...}\vss}}}} \renewcommand{\ddddot}[1]{% …
dustin
  • 18,617
  • 23
  • 99
  • 204
12
votes
2 answers

How to make underbracket thinner

Consider this code, \documentclass{article} \usepackage{mathtools} \begin{document} \[ C(s)=\underbracket{\frac{K_1}{s}}_{\text{forced}}+\underbracket{\frac{K_2}{s+2}+\frac{K_3}{s+4}+\frac{K_4}{s+5}}_{\text{natural}} \] \end{document} and the…
Sukan
  • 849
9
votes
3 answers

Centering in dcases environment

How would I go about centering the zero within the column for the following dcases MWE: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation} T = \begin{dcases} 0 &, \text{ if A, or} \\ \frac{1.0}{1.0 + X}…
arghdos
  • 235
8
votes
1 answer

\DeclarePairedDelimiter with \left & \right no longer works

The following MWE worked in December 2015 based on the archived PDF. But, it does not work today. Any…
7
votes
1 answer

Why does the mathtools package define operators only \AtBeginDocument?

What is the rationale behind defining operators like \coloneq in mathtools.sty using \AtBeginDocument? \AtBeginDocument{ ... \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}} ... } What would break if these commands were…
gernot
  • 49,614
5
votes
1 answer

How to make \underset and \stackrel distances equal?

Here is the code: \documentclass{article} \usepackage{mathtools} \begin{document} $[ \underset{\scriptscriptstyle [[[[]]]]} {\stackrel{\mathclap{\scriptscriptstyle [[[[]]]]}}{[[[[]]]]}} ]$ \\ \end{document} It renders as such: The distance…
yegor256
  • 12,021
5
votes
3 answers

Replace automatically := by \coloneqq

Is there a way to replace automatically := by the command \coloneqq ? I would like to still be able to type := in the .tex files but that it compiles the symbol \coloneqq instead. In a way, I'm asking if it's possible to do something like…
Colas
  • 6,772
  • 4
  • 46
  • 96
5
votes
1 answer

\splitfrac producing extra '1' characters

I am having the exact same problem as this (closed) question - but I have ideas as to what might be causing the problem in my…
Elke
  • 53
4
votes
2 answers

Aligning several \begin{bmatrix*} to have same "column width"

I have 4 \begin{bmatrix} matrices. Because the matrix values are different the overall 4x4 matrices have different column widths. Is there a way to align them so that all columns have the same width so that the matrices look…
FR_MPI
  • 43
4
votes
1 answer

Appropiate position of prime in a LaTeX formula

I'm using this code in LaTeX: $\vec{s}^{'}$ The result: As you see, the position of ' isn't good. How can I have a appropriate position?
3
votes
1 answer

Include empty delimiter in `\DeclarePairedDelimiter`

I want to define a restriction operator \restrict{f}{X} which is capable of resizing in the style of mathtools's \DeclarePairedDelimiter options. For example: \restrict*{f}{X} should resize automatically \restrict[\Big]{f}{X} should provide a large…
Phrohlych
  • 205
3
votes
0 answers

Strange behavior of mathtools with showonlyrefs

With the following code : \documentclass{article} \usepackage{mathtools} \mathtoolsset{showonlyrefs} \begin{document} \begin{align} A & = B \label{eq:first}\\ & = C \tag{a} \end{align} Reference to \eqref{eq:first}. \end{document} I obtain…
F. Pantigny
  • 40,250
2
votes
2 answers

Trouble with \splitfrac{}{} from mathtools

I have trouble with the following code which stems from my somehow faulty use of the \splitfrac environment. Can someone help? \item $p_{(lon_i,lat_r,jul_a)} = \frac{1}{\splitfrac{1 + e^{-(\beta_0 + \beta_1MeanTempoerature_{(lon_i,lat_r,jul_a)} +…
2
votes
2 answers

aligned in multlined produces superfluous space

Feeding \documentclass{article} \pagestyle{empty} \usepackage{mathtools} \begin{document} \[ \begin{multlined}[c] \text{Line}\ 1\\ \begin{aligned}[c] &\text{Line}\ 2.1\\ \lor\ &\text{Line}\ 2.2\\ \lor\…
user282514
2
votes
1 answer

\underbracket in custom command

I am looking to define the custom command \distr as follows: \newcommand{\distr}[1]{\underbracket[0.3pt][1pt]{#1}} The command \underbracket is the one appearing in mathtools. However, I see (at least) two issues upon compiling: (1) when e.g.…
giobrach
  • 369
1
2 3