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
0
votes
0answers
19 views

How can I access the size of a subequation, or of a delimiter, in math mode?

I would like a macro that typesets delimiters as $\langle!\langle$ around math expressions. If I try \DeclarePairedDelimiter\angles{\langle\!\langle}{\rangle\!\rangle}, I don't get the right size for ...
0
votes
0answers
16 views

Package keyvalue Error: Unknown option 'mathtools-overbracket' for package unicode-math-luatex

The PDF file fails to be generated after using the option warnings-off = {mathtools-colon, mathtools-overbracket} of unicode-math with the error Package keyvalue Error: Unknown option 'mathtools-...
4
votes
3answers
131 views

Equation \frac inside \underbrace has bigger font

in explaining parts of an equation, I group terms in an array and add \underbrace explanations to single parts the first term within each underbrace is a fraction (\frac), but its font is too big when ...
0
votes
0answers
19 views

Reducing line distance between mathematical expression? [duplicate]

I want to write the following mathematical expressions to define two sets; but, the distance between each line in the middle of two sets is more than I expect. \[ set1= \{1, . . . , n\} \] \[ set2 = \{...
1
vote
0answers
29 views

mathtools + XeTeX + unicode-math + beamer makes upright math have unexpected behavior

Problem: In the below MWE, math is rendered correctly, unless there is \mathrm or an operator like \sin, and then the entire $...$ is rendered in upright font; Further, all future $...$ are upright. ...
0
votes
1answer
40 views

new macro for \DeclarePairedDelimiterXPP

\documentclass[11pt]{article} \usepackage{amsmath, amssymb} \usepackage{mathtools} \def\pr{\mathbb{P}} \makeatletter \let\Pr\undefined \DeclarePairedDelimiterXPP\@Pr[1]{\pr}[]{}{#1} \...
0
votes
0answers
42 views

Smashoperator with unicode-math and luatex

Consider the following MWE \documentclass[11pt,oneside,openright,a4paper]{memoir} \usepackage{fontspec} \usepackage{unicode-math} \usepackage{mathtools} \begin{document} \[ L(x)= \smashoperator{\...
0
votes
1answer
28 views

Alignment of custom icon in Beamer

I am not a Latex expert so while writing my documents, I face many problems with TeX command. And TeX StackExchange provides answers for most of my problems. However, one of my problems still does not ...
1
vote
0answers
34 views

Missing { inserted: \DeclarePairedDelimiterX

The following code \documentclass{scrartcl} \usepackage{mathtools} \DeclarePairedDelimiterX\innerp[2]{\left(}{\right)}{#1 \delimsize\vert \mathopen{}#2} \DeclarePairedDelimiterX{\dualp}[2]{\langle}{\...
0
votes
1answer
29 views

Removing parentheses in partial derivative from diffcoeff package

From a post and comment from this question Is there a way to remove the parenthesis in the denominator of the partial derivative? \documentclass{article} \usepackage{mathtools, diffcoeff} \...
1
vote
0answers
112 views

Incompatibility with mathtools and unicode-math in lualatex - \MT_cramped_internal:Nn?

In my MNWE example shown below: \documentclass{scrbook} \usepackage{mathtools} \usepackage{unicode-math} % \usepackage{lualatex-math} \begin{document} Foo. \end{document} Note: I found the ...
2
votes
1answer
40 views

The environmnet \begin{multlined} produce LaTeX Error: Command \subarray already defined, when it is compiled with lualatex

I have simple MNWE (see below). The environment multilined produce Latex error Command \subarray already defined.. It stopped working after the Miktex distribution update. \documentclass{article} \...
1
vote
0answers
21 views

Wrong baseline for subscript of paired delimiter

I'm using \DeclarePairedDelimiter from the mathtools package to create a paired delimiter \DeclarePairedDelimiter{\norm}{\lVert}{\rVert} but I want the same baseline for the subscript with and without ...
5
votes
3answers
409 views

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 ...
0
votes
1answer
39 views

currently i work for this equation but seems couldnt find a solution , i wrote it this way [closed]

$x^\lambda_p$ + $x^\lambda_p$ \leq $y_\lambda$ \forall \in \wedge, \forall ($p$,$p$) \in $P^2$
1
vote
1answer
33 views

how can i correct this without errors [closed]

\[ \mathlarger{\mathlarger{\sum}}_{\lambda \in \wedge} $x^\lambda_p$}= 1 \] & \forall $p$ \in \ $P$ [![enter image description here][1]][1]
2
votes
1answer
140 views

I tried this but it doesn't work, words are printed with no spaces and I get errors

\[ x^\lambda_p = \begin{dcases*} 1 & if \lambda is assigned to P\\ 0 & $Otherwise$ \end{dcases*} \]
1
vote
1answer
41 views

trying do the math equations, i tried searching similar expressions [closed]

\begin{document} \Lambda =\{\lambda1, \lambda2, \dots, \lambda\def\abs\Lambda\}. \end{document}
1
vote
1answer
51 views

Boxed rectangles or squares for 4 submatrix into a matrix

I have taken this code from the documentation of nicematrix package to the pag. 44/208 version 5.12 of at the date of 2021/03/10. In the meantime I have this error of compilation: why? (I have the ...
2
votes
1answer
32 views

Multlined in align environment: letter before alignment point

I have two equations, one of which is very long. I would like to have a single alignment, at the = sign. At the same time, I would like to split the long equation into multiple lines. I have tried to ...
0
votes
0answers
40 views

A program for quick and easy typesetting of formulas in latex

Is there an additional toolbox for a simpler set of formulas in latex? After all, it is difficult and not visual to type this using symbols. Also interested in the same for creating tables. It ...
2
votes
1answer
69 views

Mathtools package cramped command

Within the mathtools package, \cramped is defined as follows. \providecommand*\cramped[1][\@empty]{ \ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_cramped_internal:Nn \else ...
1
vote
1answer
42 views

flalign in algorithm

This question is a bit related to the answer provided here: How can I use an align environment flush left? I use algorithm2e and mathtools to write an algorithm with an equation inside. I want it to ...
2
votes
1answer
46 views

How to get the same size for all the characters in an equation?

I need to have the same size for all characters inside an equation. I did some research and i found a solution using align* instead of equation but in my case it doesn't work, I need to use equation. ...
2
votes
2answers
52 views

Big floor brackets size around fraction with small denominator

i'm having issues with bracket formatting around fractions. For example, this code : \documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter\floor{\lfloor}{\rfloor} \begin{document} ...
2
votes
2answers
96 views

How to be consistent with delimiters in mathtools

I'm trying to create a few commands to handle conditional probabilities. So far I am using the mathtools DeclarePairedDelimiter family of commands. Also, as far as I am aware, mathtools does not allow ...
4
votes
2answers
119 views

Vertical Spacing Before and After “Cases” Environment

I'm using TexShop on macOS and I'm hoping someone could tell me how to increase the spacing before and after the cases environment as below: \documentclass[12pt,a4paper,reqno]{amsart} \usepackage{...
3
votes
1answer
44 views

Added whitespace when putting brackets around fractions with splitfrac

I'm using splitfrac from mathtools to break up a particularly long line in the numerator of a fraction. When I put brackets around the fraction, however, they leave a line of whitespace in the ...
0
votes
0answers
37 views

Adjusting bar length of dbar

I am trying to recreate the following symbols. At first I tried the \dbar command below, but it didn't seem like it was the right length and thickness. How can I adjust those parameters? Possibly a ...
4
votes
2answers
98 views

tex4ht gives \catcode`\^^ error when loading mathtools

I do not know if this is new error, caused by latest TL update. But this is first time I see it. This MWE compiles with no problem with lualatex, but gives (/usr/local/texlive/2020/texmf-dist/tex/...
3
votes
1answer
38 views

Adding Binary Overflow Character

How would I show a 1 carry over an empty space? Such as this; Currently I have this as code; \usepackage{array,mathtools} \newcommand*{\carry}[1][1]{\overset{#1}} \newcolumntype{B}[1]{r*{#1}{@{\,}r}} ...
3
votes
2answers
138 views

\cramped in fraction denominator doesn’t line up with regular fraction

In a display, the denominator of a fraction is set in “cramped” \textstyle, which can be emulated with \cramped[\textstyle]{...} from the mathtools package. But sometimes the emulation is perfect, ...
0
votes
0answers
64 views

cannot compile matrix to pdf

I have a problem knitting my rmd to pdf. I have tried copying the code that works for others from this forum but it is not working for me. I keep receiving: !LaTeX Error: Can be used only in preamble. ...
4
votes
1answer
68 views

Underbracket and overbracket intersecting each other

I cannot seem to find a way to achieve the result I want which is best portrayed by this sketch diagram: This is because if I add an overbracket it is closed by the underbracket } before it gets to ...
4
votes
3answers
102 views

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 ...
0
votes
0answers
60 views

How to print a symbol for a code (in coding theory) in Latex

I am trying to generate a symbol for a code in coding theory in Latex. I tried \mathcal{C}, but it did not give me the expected output. Can Anyone give me some command or Latex packages I can use? PD: ...
4
votes
1answer
222 views

Suppress warning by unicode-math regarding mathtools

When using the packages unicode-math and mathtools, I always get warnings Package unicode-math Warning: Using \overbracket and \underbracket from (unicode-math) `mathtools' package. (...
2
votes
1answer
104 views

drcases of mathtools package

Considered my little ability in English I would like to know what is the use of drcases and what are the advantages or disadvantages of this command. \begin{drcases} 〈math_column〉 & 〈math_column〉 \...
1
vote
1answer
34 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
239 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
82 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
28 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
125 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
46 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
209 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
40 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
759 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
1answer
793 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
87 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{...

1
2 3 4 5
9