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

You could use the \splitfrac instruction of the mathtools package to split the long denominator into two lines. Note that you needn't employ a split environment in this case. I've increased the size of the round parentheses used in the denominator (via \big instructions) to give them a bit more visibility. \documentclass{article} \usepackage{mathtools} % ...


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 ...


24

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}% \...


21

There's no problem in having multiple paragraphs in \intertext you just can't have a \par or blank line, \endgraf is OK though: \documentclass{article} \usepackage{amsmath} \def\a{One two three four. } \def\b{\a\a\a\a} \def\stuff{\b\b} \begin{document} \begin{align} 1&=222\\ \intertext{% para 1 \stuff \endgraf Followed by para 2 \stuff} 33&=44\\ ...


20

Cross referencing in LaTeX uses quite simple schema - for every label it stores value of macro \@currentlabel and the page number in the aux file. There are packages, which extends this scheme, like titleref or zref, but it is still just label and some properties, which are then accessed with some form of \ref command. What would be useful in this case, is ...


18

mathtools loads the calc package, which change the \setcounter command. You now have to protect it too: \addtocontents{toc}{\protect\ifbool{shorttoc}{\protect\setcounter{tocdepth}{0}}{}}


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

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{...


16

The other answers give you what you wanted (+1 to both), but for what it's worth, I would consider tackling this using local definitions to make it a little easier to read \documentclass{article} \usepackage{mathtools} % mathtools builds on and extends amsmath package \begin{document} \begin{equation} \label{eq:5} A = 1-\frac{f(h,p)}{g(h,p)} \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} \[ \...


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

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

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 \\ ...


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

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}{...


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 ...


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