38

Had the same issue. For me it worked after I synchronized manually with the repository using the MikTeX Package Manager (Admin) tool and under the Repository menu using the synchronize. Then the issue is resolved and the mathtools package appears under the package list.


27

The problem is this: \Longrigtharrow (over which \implies is defined) is built with two characters that come from different fonts. The equals sign for lengthening the arrow is taken from \textfont0 (the normal text font), while the arrow (\Rightarrow) is taken from \textfont2 (the math symbol font). When a current font size is 10pt, lmodern defines \...


25

With the usual definition, \setlength{<parameter>}{<value>} is just a wrapper for <parameter>=<value>\relax so \setlength{\medmuskip}{0mu} is legal, because it translates to \medmuskip=0mu\relax which is perfectly legal, as \medmuskip should be assigned values only in mu units (also fil, fill or filll units for the plus and ...


25

First, I have to recall that \bf is a plain TeX macro. It is not bad practice to use it but it isn't needed anymore since \bfseries was intoduced with LaTeX and its syntax is exactly the same as for good old \bf. Second, don't change your markup! (by exploiting a search and replace routine). If you wrote \vec in your manuscript you did it because the ...


23

You don't need to load any packages to access the four macros \lfloor, \lceil, \rfloor, and \rceil. It is straightforward to use these macros to create two new macros called, say, \floor and \ceil: \newcommand\floor[1]{\lfloor#1\rfloor} \newcommand\ceil[1]{\lceil#1\rceil} Then, write something such as $\floor{x}$ and $\ceil{y}$ in the body of the document. ...


22

Here's a mixture of \ooalign and picture mode. \documentclass{article} \usepackage{amsmath,pict2e} \makeatletter \newcommand{\barredsum}{% \DOTSB\mathop{\mathpalette\@barredsum\relax}\slimits@ } \newcommand{\@barredsum}[2]{% \begingroup \sbox\z@{$#1\sum$}% \setlength{\unitlength}{\dimexpr2pt+\ht\z@+\dp\z@\relax}% \@barredsumthickness{#1}% \...


18

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)


18

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}^n f(x)$ The \limits command allows the limits to be positioned above and below the symbol. The fact that inline math has "text style" limits is just that ...


17

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}[2]{% \mathord{\makebox[\widthof{\(#1\)}]{\(#2\)}}% } \begin{document} \begin{gather*} 1 + \mask{ABC}{B} + 2 \\ 1 + ABC + 2 \end{gather*} \end{...


15

The following example defines \xtwoheadrightarrow and \xtwoheadleftarrow similar to the definitions of \xrightarrow and \xleftarrow: \documentclass{article} \usepackage{amssymb} \usepackage{amsmath} \makeatletter \providecommand*{\twoheadrightarrowfill@}{% \arrowfill@\relbar\relbar\twoheadrightarrow } \providecommand*{\twoheadleftarrowfill@}{% \...


15

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" \sup. This is done by a subscript. Compare: \documentclass{article} \usepackage{amssymb} \usepackage{amsmath} \usepackage{flexisym} \begin{document} \[ \...


14

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 text to be printed not (as it would in a standard array environment} be equivalent to \\[x] and give an error that x isn't a valid length. * is similar to [ ...


13

A concise solution in this instance is presented via the tensor package: $\tensor*[^{14}_2]{\mathbf{C}}{^{5+}_2}$ Not sure about the extent of your usage, but the following also corrects this in your specific case: \documentclass{article} \usepackage{mathtools,leftidx}% http://ctan.org/pkg/{mathtools,leftidx} \begin{document} $\prescript{14\phantom{+}}{2}{...


13

I continue to believe that one should use \left and \right where really needed and any sort of automatism for this is bad. However, here's a simple and working implementation of your macro, that I call \xDeclarePairedDelimiter \documentclass{scrartcl} \usepackage{mleftright,xparse} \NewDocumentCommand\xDeclarePairedDelimiter{mmm} {% \NewDocumentCommand#...


13

amsthm and mathtools are unrelated. mathtools updates and extends amsmath. you still need amsthm if you want the proof environment.


13

Yes, your suspicion is right. Simply define: \newcommand{\vastl}{\mathopen\vast} \newcommand{\vastm}{\mathrel\vast} \newcommand{\vastr}{\mathclose\vast} \newcommand{\Vastl}{\mathopen\Vast} \newcommand{\Vastm}{\mathrel\Vast} \newcommand{\Vastr}{\mathclose\Vast} and you can use \vast and \Vast with \DeclarePairedDelimiter. MWE: \documentclass{article} \...


13

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[#1]{ \@ifnextchar[ {\MT_underbracket_II:w[#1]} {\MT_underbracket_II:w[#1][.7\fontdimen5\textfont2]}} \def\MT_underbracket_II:w[#1][#2]#3{% \mathop{\...


13

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. \left and \right like So \documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiter{\eceil}{\lceil}{\rceil} \begin{document} $\eceil{\cdot}$\\[...


13

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 solution is suboptimal in terms of efficiency, for the following two reasons: While drawing, e.g., a witch requires the full flexibility of the picture environment, ...


13

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 shows expressions with underbrackets that involve the default width as well as one half, two thirds, and three quarters of the default width. Choose your ...


12

Edit2: Complete rewrite, with mostly complete explanation of all the intricacies. This is due to a complication in how XeTeX decides what fontdimen parameter to use, as Heiko notes in his answer to that question. In another answer, Khaled Hosny confirms that the details are buggy. To center the brace vertically, bytefield sets the \fontdimen22 of \...


12

The definitions of \dddot and \ddddot need some modifications: the dots need to be lowered a bit and to be scaled down so they are at the same height as in \ddot and \dot. I also used a \makebox of 0pt width so as to "hide" the extra width added by the dots, the separation between dots was also a little bit reduced. Using TikZ I drew some horizontal rules ...


12

You can try with \vline MWE: \documentclass[aps]{revtex4} \usepackage{amsmath,amssymb} \begin{document} Your attempt \[\left|\frac{S}{\sum\limits^{N}_{a=1}T_{a}}\right|\] With \verb|\vline| \[\vline\,\frac{S}{\sum\limits^{N}_{a=1}T_{a}}\,\vline\] \end{document} Output: Some remarks: Use \[...\]\ instead of $$. See Why is \[ ... \] preferable to $$ ....


12

You could change meaning of \vec, but that would be very bad pratice. What I would do: Define new command with style like: \newcommand{\vectorstyle}[1]{\mathbf{#1}} Use Find and Replace feature of your text editor/IDE to replace \vec{ for \vectorstyle{ In the event of next chage, just replace the definiton of the \vectorstyle P.S. Do not use \bf. It's bad ...


12

The proper way of doing this would be to use a search-and-replace command in your text editor in connection with a custom macro, e.g. \myvec. However, if you insist on having a quick solution inside your document (which I discourage), you could add the following to your document's preamble: \let\oldvec=\vec \renewcommand{\vec}[1]{\oldvec{\mathbf{#1}}} If ...


12

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 package and improves it as far as I understand. Yes What about the empheq package It's OK but more of a "contrib" package than mathtools which aims to be ...


12

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 (and excluding) the first {. Now let's look at \braces: \DeclareDocumentCommand\braces{}{{\ifnum\z@=`}\fi\@braces} I see no reason for this \ifnum; anyway, it ...


12

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 exceeded the 30000 character limit—indeed, only the code amounts to a total of more than 26000 bytes! Maybe I’ll post the explanations as a separate answer, ...


12

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{\mask@@}[3]{% \settowidth{\dimen@}{$\m@th#1#2$}% \makebox[\dimen@]{$\m@th#1#3$}% } \makeatother \begin{document} \begin{gather*} 1 + \mask{ABC}{B} + 2 \\ ...


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