# Tag Info

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


Top 50 recent answers are included