I've made lots of use of the answer here, which shows how to switch the starred and nonstarred versions of a paired delimiter command (causing the regular version to automatically size the delimiters).
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
\makeatother
But now in the pre header that I include in nearly every document, I've got several of these commands stacked up, and for each of them I've got another two lines switching the versions.
Is there good/nice way to alter \DeclarePairedDelimiter
itself, so that it switches the two to begin with? (Which also means, would this break any dependencies?)
\paren
, and I tend to use(
and)
for parentheses that shouldn't be resized,\paren
for those that should, and (for example)\paren*[\bigg]
for when they need to be manually resized. Given that I sometimes use up to seven delimiters, a shortcut would be nice.