I am using the amsmath
package and I'd like to control the size of my delimiters manually, i.e. using the
\bigl
, \Bigl
, ... , \Bigr
, \bigr
commands, instead of \left
, \middle
, \right
.
Now I want to create macros which include delimiters and I want to have the size as an argument. For example, if I have a \set
macro:
\newcommand{\set}[2]{ \left\{ #1 \,\middle\vert\, #2\right\} }
I want to change it into a command, where I can give the size as an argument, i.e.
\set{A}{B}{Big}
should produce \Bigl\{ A \,\Big\vert\, B\Bigr\}
or, even better, \set{A}{B}{2}
produces this result.
Is there any command like \leftdelimitersize
to implement this kind of macros?
mathtools
package has features that should help you.mathtools
package.\scalerel
was used, but if you wish to define the size, the sister routine\scaleto
or\stretchto
might suffice.