Tag Info

New answers tagged

7

Since \mid does not make much sence then you read \Exp{A \mid B} (and cannot be scaled), I suggest hiding the | inside a specially crafted macro giving us a macro that support conditionals including scaling. \documentclass[a4paper]{memoir} % requires 2014 edition of mathtools \usepackage{amsmath,amssymb,mathtools,bm,etoolbox} \providecommand\given{} ...


4

See EDIT at end of answer for support of sqrt index in \displaystyle. \documentclass{article} \usepackage{scalerel} \def\sqrt#1{\stretchrel{\surd}{\left[#1\right]}} \begin{document} \[ \sqrt{x} \quad \sqrt{\frac{x}{y}} \quad \sqrt{\frac{1}{\sqrt{\frac{1}{\sqrt{x}}}}} \] \end{document} The macro \stretchrel takes an optional integer argument indicating ...


6

If you let the \sqrt grow large it might be hard to avoid a horizontal notch at the top, but... \documentclass{article} \usepackage{mathtools} \begin{document} \[ \sqrt{\frac{1}{\sqrt{\frac{1}{\sqrt{x}}}}} \] \newcommand\bsqrt[2][]{% \sqrt[{#1}]{\vphantom{\left[#2\right]}}\left[#2\right]% } \[ \bsqrt{\frac{1}{\bsqrt{\frac{1}{\bsqrt{x}}}}} \] ...


0

Aha! A more careful reading of the commath documentation gives me a solution. Instead of \od{ }{ } which "automatically" chooses font/style, I can use \dod{ }{ } which forces the default text font/style. Same thing with partial derivatives. Instead of using \pd{ }{ } I can use \dpd{ }{ }. Here's an example of the difference:


3

You can either import the single MnSymbol symbol, or create one that roughly matches it: \documentclass{article} \usepackage{graphicx,amsmath} \newcommand{\udotdot}{\mathbin{\text{\rotatebox[origin=c]{45}{${\cdot}{\cdot}$}}}} \begin{document} $a \cdots e \cdot a \mathbin{\cdot\cdot} e \mathbin{{\cdot}{\cdot}} a \udotdot e$ $a \udotdot e_{a \udotdot e_{a ...


4

The following example uses the normal dot to generate the symbol: \mathpalette adds support for the different math styles. It is assumed, that the dot is on the base line with a correct character bounding box including symmetrical side bearings. The dot itself has the same width and height. The two dots of \udotdot lie on opposite corners of a square, ...


4

You can try the macro \mathexclam: \def\mathexclam{\futurelet\next\mathexclamA} \def\mathexclamA{% \expandafter\ifx\space\next \def\next{\afterassignment\mathexclam\let\next= }\expandafter\next \else \edef\tmpb{\meaning\next}\let\tmpa=\mathpunct \expandafter\expandafter\expandafter\mathexclamB\expandafter\tmpb\string\mathchar\end ...


5

Judging by the "small" size of the \sum symbol, you're trying to render these expressions in inline math style. If that's correct, you may want to ask yourself if you even need to indicate the full range of k, or if a single subscript k suffices. Displaying a single index will save you a lot of space immediately. And, presumably, your readers already know ...


7

Don't use \underset for operator "limits": there's a better way. With amsmath, the limits are automatically positioned according to the current math style (display or inline). If necessary, \limits and \nolimits can be used to manually control the positioning. But the manual adjustments should be used with care: most of the time, the default looks best. ...


3

The purpose of this answer is only to disagree with egreg that Hn(X) should be typeset with an upright H. He claims that H is similar to log, and thus should be typeset similarly. I believe instead that Hn is a functor F just like C∞(X), πn(X), Ωk(X). All of these are written in italics, just like any other mathematical object, and Hn(X) ...


5

The problem is the same as in Underbrace changing spacing of operators, because \underbrace creates an Op atom just like \sin. The solution is to use ${\sin}\circ f$ in this case, because the braces make a subformula, which is considered as an ordinary atom.


5

Both “Hom” and ”H” are similar to “log”, so they should be typeset in the text font (upright). However it's not a sin to have different opinions. The most important thing is that you use macro definitions: \DeclareMathOperator{\Hom}{Hom}% preferred %\DeclareMathOperator{\Hom}{\mathnormal{Hom}}% with Euler type \DeclareMathOperator{\HH}{H}% preferred ...


7

Yes, it's possible, by coupling this with \DeclarePairedDelimiter. \documentclass{article} \usepackage{mathtools,amssymb} \makeatletter \DeclareRobustCommand{\E}{\operatorname{\mathbb{E}}\@ifnextchar_{\m@Es}{\m@Epd}} \newcommand{\m@Es}[2]{_{#2}\m@Epd} \DeclarePairedDelimiter{\m@Epd}{(}{)} \makeatother \begin{document} $\E{f(x)}$ $\E[\big]{f(x)}$ ...



Top 50 recent answers are included