Questions tagged [mathtools]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

\boxed math expression makes font too large when used in nested fractions or exponents [duplicate]

Using the \boxed environment in mathtools seems to ignore the default size considerations LaTeX makes with nested fractions: \[ \frac{\frac{1}{2}}{\boxed{\frac{1}{2}}} \] I would like the \boxed 1/2 ...
2
votes
3answers
171 views

Why does a left curly brace impact the flalign alignment?

I've a pretty long text commenting several sets of short equations. This leads me to some presentation constraints that I'd like to better handle: flush the equation sets to the left (short text in ...
3
votes
1answer
37 views

Define semantic size for \DeclarePairedDelimiter

To better separate content and presentation, how can I define semantic sizes for the optional sizing argument to \DeclarePairedDelimiter? Here are two attempts to define "bulkysize" as \Big: ...
1
vote
1answer
25 views

mathools with lineno

The following MWE \documentclass{article} \usepackage{lineno,lipsum} \usepackage{mathtools} % commenting this resolves the issue \linenumbers \begin{document} \lipsum[1] \lipsum[2] \[A=B\] \...
4
votes
3answers
118 views

smashoperator seems to break beamer transparency

I am using beamer and smashoperator as follows: \documentclass[xcolor={rgb}]{beamer} \setbeamercovered{transparent} \beamertemplatenavigationsymbolsempty \setbeamersize{text margin left=10mm,text ...
3
votes
1answer
38 views

Align a box in the formula

The following code provides this result: I would like to get a small "{" fitting the text and not the upper and down box. Any idea? \documentclass[preview]{standalone} \usepackage{...
6
votes
1answer
106 views

Adjusting the vertical position of the limits of a sum

Is there a way to vertically adjust the lower limits of the two sums below, such that 'p' and 'q' are vertically aligned? \sum_{p=1}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_p^+} EDIT: As per egreg's ...
1
vote
1answer
25 views

How to nest alignments while give subnested equations independent numbering?

I am trying to get alignment environments to be nested appropriately inside each other. We see Eq. 2 (using aligned) nested sucessfully inside alignat. Two shortcomings arise due to this such ...
3
votes
0answers
24 views

Spacing in mathastext package

I have this MWE, using mathastext package. \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage{newtxtext} \usepackage[italic,defaultmathsizes,symbolgreek]{...
8
votes
2answers
441 views

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}}_{...
9
votes
2answers
770 views

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

I used a * in a bsmallmatrix and found a curious effect. If I write \\* the * is not printed whereas with \\ * it is. Do you guys know why this happens? My tiny example and screenshot follow below: \...
0
votes
3answers
82 views

How can I prevent \mathclap from quadrupling \stepcounter

When I want to iterate a counter using \stepcounter inside \mathllap , \mathclap or \mathrlap the counter iterates by 4 instead of by 1. E.g, the following MWE \documentclass{article} \usepackage{...
0
votes
1answer
36 views

Derivative package: does it include square brackets with comment?

This question is only an information on the derivative package. Just a curiosity does it include square brackets (see the green arrows) where is it possibile to put a comment (see pag. 26 of the .pdf ...
3
votes
1answer
40 views

Refinement of nested cases / aligned equations

For the following two approaches or sets of equations, I would like to 1- (in the first set) make the first for align with the two fors below 2- (in the second set) keep the font and interspaces the ...
1
vote
1answer
58 views

Why math equation creates error in document?

In my latex document as long as I use this formula, it throws tons of unrelated errors which is working without the formula. Although it is creating a formula on the document, but the problem is, ...
2
votes
3answers
147 views

Editing a tabular:

So I have been working on an article about integration and its techniques, and at the ending I decided to add a tabular contains the most frequently functions and its antiderivatives, but the problem ...
0
votes
1answer
37 views

Mathtools and Tikz are incompatible because of colon

I tried to use tikz and https://tex.stackexchange.com/a/270007/161413 to color arrows with several colors. But I was also using mathtools, and found out that tikz and mathtools are not compatible as ...
4
votes
1answer
210 views

Matrix in double-struck square bracket style

We can use \llbracket \rrbracket using the \usepackage{stmaryrd} to generate double bracket. My question is: how we can generate a matrix with double bracket (in the same style as the \llbracket \...
2
votes
1answer
176 views

Double-struck parentheses

We can use \llbracket and \rrbracket (provided by the stmaryrd package) to generate double brackets. My questions are: how we can generate double-struck parentheses in the same style as the single-...
2
votes
0answers
116 views

Underbraces are ruined by mathtools (and maybe unicode-math?). How do I keep both?

In writing my thesis (using XeLaTeX) I use multiple math-related packages, all for different reasons. Since introducing unicode-math and mathtools, the underbraces I applied earlier are ruined. I ...
2
votes
2answers
116 views

ddot and hline problem

I am new to latex. Readability of the below equation is not good enough because of \hline and \ddot how may I fix it? \begin{equation}\label{eq2} \underbrace{\left[ \begin{array}{c} \ddot{x_{cp}} \\ \...
1
vote
0answers
29 views

eqref - showonlyrefs

I have equations and I want to reference some of them. Also, I would like to number only the equations that I reference. For some reason when I use \mathtoolsset{showonlyrefs=true} - nothing works and ...
1
vote
2answers
45 views

Right alignment in flalign environment

I'm compiling a list of math exercises with solutions: I would like to left-align the exercise numbers and to right-align the results. I have tried the flalign* environment, but it doesn't work well. ...
0
votes
1answer
37 views

Why is my math equation font style appearing different than normal?

Hello I am trying to write a simple limit here within brackets using this line, $(-\pi, \pi)$, But I want to get styling like this, I am not sure where I have made mistake or do I need to use a ...
6
votes
2answers
495 views

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

I want to make a part of an equation to appear in the center of a (horizontal) phantom. This would be awesome for example for making bra-kets that are all of the same width and still look natural. ...
0
votes
2answers
45 views

Restoring missing space before large parentheses in `newtxmath`?

As shown by the difference between the two lines of the image below, for sufficiently large pairs of parentheses in newtxmath, the space in front of the left parenthesis disappears. This results in ...
3
votes
2answers
125 views

“Missing $ inserted” error when using “cases” inside an equation environment

I have the following piece of latex code \begin{equation*} G(z,w) = \begin{cases*} \frac{\rho (g_{\bar{\lambda}}(z),g_{\bar{\lambda}}(w))}{\rho (z,w)} & for z \neq w \\ |f'|_{\...
0
votes
1answer
110 views

Environment bmatrix undefined. \begin{bmatrix} in Latex

I've been using this thisspringer format latex document and wanted to add a matrix in the paper and I've been bumping into this error for a while now. \documentclass[a4paper]{article} \usepackage{...
1
vote
3answers
52 views

subscripted matrices operation

I need to manage how to work with several matrices in line, each one with its own left and right subscripts (like in the image). \prescript suited me for a single matrix, but didn't work with 2 ...
2
votes
2answers
58 views

Aligning and line-breaking a set of long equations in both single- and two-column modes with proportional vertical spacing

For the following set of long equations, how to 1- aesthetically align and line-break them in a single- and two-column modes without crossing the single column dedicated space and 2- separately ...
0
votes
1answer
36 views

How to properly halve the inter-line distance in a math block environment

... of amsmath or mathtools? In other words, how to properly halve \jot? Options: \setlength{\jot}{.5\jot\relax} \setlength{\jot}{\dimexpr.5\jot\relax} \setlength{\jot}{\dimexpr\jot*.5\relax} \...
1
vote
1answer
26 views

repair bad vertical spacing of underbrace label when using newtxtext, newtxmath, and mathtools

Feeding \documentclass{article} \pagestyle{empty} \usepackage{newtxtext,newtxmath} \usepackage{mathtools} \begin{document} For an arbitrary $n\in M^B$ we have $\varphi_M(\underbrace{\langle 0\rangle ...
3
votes
2answers
69 views

align multiline equations with labels

I have multiple equations with different labels (see below for MWE) that I would all like to align while being able to reference them separately. I have the following code: \documentclass{article} \...
1
vote
0answers
49 views

Alignment of matrix entries using physics package

I'm looking for a way to achieve the same output (regarding the alignment of matrix entries) using the physics package - or simply a conformation that will work only with mathtools (like here). Either ...
1
vote
3answers
53 views

Inequalities are going beyond the text width

Two of the inequalities written below(the ones right after \vdots) are going beyond the margins. Below is the MWE: \documentclass[12pt,a4paper]{report} \makeatletter % these two slashes-commands for ...
0
votes
3answers
58 views

Is it possible to make an equation with a explaination pointing each variable? [duplicate]

I was curious if there is a way to do an explanation like the image below shows for a variable? Currently, I have been making legends after showing the equation.
0
votes
0answers
26 views

Unable to manually resize absolute value bars

I would like to manually adjust the size of my absolute value bars so I don't end up with expressions that look like this: As per what I've read around here, I tried to include \...
2
votes
1answer
49 views

mathtools \xleftrightarrow command does not centre text

I would like to have text (maybe a bullet, maybe something else) above a left-right arrow, I would also like that text to be centred. I would also like the arrow to grow with the text. MWE: \...
0
votes
0answers
43 views

undefined control sequence, again :/ 2.0

I'm pretty new to LaTeX, and using an android device for it. But still, I would like the error to be pointed, I'm still a newcomer to logfiles, and they didn't get as objective with this error. Log ...
2
votes
2answers
78 views

is align right [r] no longer supported using bmatrix (or pmatrix, or…)?

Recently tried to compiled some files that used to compile perfectly, but now, generates an error whenever I try to align elements within bmatrix (same for pmatrix, or Vmatrix, etc.), using [] as the ...
2
votes
2answers
73 views

How do I change the way the colon is typeset?

In math, I exclusively use the colon : for punctuation, i.e. in the sense of \colon (compare this question). Hence I would like to change the way : is being typeset, so that it resembles \colon. Is ...
2
votes
2answers
113 views

Problem with \vdotswithin

I want to typeset a system of equations and set vertical dots between two rows centered at the equal sign. vdotswithin from 'mathtools' should do exactly that, but for some reason the following code \...
0
votes
1answer
61 views

\showonlyrefs command leaves a blank space after an unreferenced equation

When I don't reference a question, a blank space appeared after the equation. MWE: \documentclass[12pt,reqno]{amsart} \usepackage{graphicx} \usepackage{amssymb , amsthm} \theoremstyle{plain} %...
3
votes
2answers
252 views

Stix2 displays wrong symbols

I just recently switched from Windows 7 tu Ubuntu 18.04. Bevor i was working on a TeX document which worked all fine. But after i changed the OS and set MikTeX up again the stix2 package was causing ...
0
votes
1answer
45 views

Redundant definitions involving ASL class and the mathtools package

The following minimal (non-)working example illustrates a clash between the Association of Symbolic Logic class file asl.cls (link here) and mathtools package (both somewhat derived from AMS LaTeX): \...
0
votes
1answer
112 views

How to write this in TeX [closed]

Hi, can you help me to do this task.
1
vote
0answers
24 views

\xRightarrow in \item[…] [duplicate]

I would like to put a \xRightarrow into a list instead of a bullet, unfortunately I get ! Argument of \\xRightarrow has an extra }. <inserted text> \par l.8 \item[$\...
5
votes
1answer
86 views

How does \smashoperator clip the space of limit scripts?

There already are question about how to smash math operator limits horizontally, e.g. Improving typesetting of sums with long limits, with the conclusion "use the \smashoperator command from the ...
0
votes
3answers
2k views

How to define loss function in Latex [duplicate]

I want to define my loss function as following picture How can i do this?
5
votes
2answers
162 views

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

I want to have several equations aligned by their equals signs. At the same time, I want to put an overbrace (or bracket) over the left- and right-hand sides of the first equal sign to write a ...

1
2 3 4 5
8