I'm trying to use \DeclarePairedDelimiter
instead of my old roll-your-own commands to the same effect. Well, this:
\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\sparen{\left[}{\right]}
\begin{document}
Hello, world.
$\sparen{123}$.
\end{document}
doesn't compile:
! Extra }, or forgotten \right.
\MT_delim_sparen_nostar_wrapper:nnn ...thopen {#1}
#2\mathclose {#3}
l.6 $\sparen{123}
$.
? X
Why?
\left
and\right
.\sparen*
will do the resizing.\if
condition on the first argument being empty, and then recreate it. But since my\if
s are rusty that'll take me a bit. Anyway, I'll un-delete it.xparse
…