Quantcast
Channel: Active questions tagged starred-version - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 64

Swap definition of starred and non-starred command

$
0
0

I don't like the fact that I am required to use \abs* when I want the vertical line of the absolute value to automatically re-size. I pretty much always want it to re-size, so would like to swap the definition of the two commands, but not sure how to do that. My attempt below is commented out as it does not compile.

I can't think of a case where I'd want to use the version that does not resize, but in case some corner case arises in the future I don't want to loose that. Or, is there a good reason to not to do this swap, and go and change all occurrences of \abs to \abs*.

\documentclass{article}\usepackage{amsmath}\usepackage{mathtools}\DeclarePairedDelimiter\abs{\lvert}{\rvert}%\let\oldabs{\abs}%%\let\oldabs*{\abs*}%%\let\abs{oldabs*}%%\let\abs*{\oldabs}%\begin{document}Not sure why this is the default behavior, but it is:\[\abs{\frac{1}{2}}\]Would prefer to get this behavior using \textbackslash{abs},instead of having to use \textbackslash{abs*}.\[\abs*{\frac{1}{2}}\]\end{document}

Viewing all articles
Browse latest Browse all 64

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>