The \vstretch
macro of the scalerel
package is like a \scalebox{1}[]{}
, except it works inside math mode and preserves the current math style. Thus, one can define \bigs
, \bigrs
, etc. to take advantage of this feature.
I have currently set the stretch values to 1.15 and 1.3, but you can change to suit. In the left \parbox
, I show it operating automatically in \textstyle
, \scriptstyle
, as well as \scriptscriptstyle
.
In the right \parbox
, I use even bigger sizes, to demonstrate two things: 1) one can incorporate both \vstretch
and \hstretch
into the enlarged glyph; and 2) for double-height constructs, such as around a \frac
, the size of the "big" might need to change depending on the math style, since the \frac
itself changes the math style of its contents.
\documentclass{article}
\usepackage{scalerel}
\def\bigs#1{\vstretch{1.15}{#1}}
\def\bigrs#1{\vstretch{1.3}{#1}}
\def\biggs#1{\vstretch{1.45}{\mkern-1mu\hstretch{1.3}{#1}\mkern-1mu}}
\def\biggrs#1{\vstretch{1.6}{\mkern-1mu\hstretch{1.5}{#1}\mkern-1mu}}
\def\Biggrs#1{\vstretch{1.75}{\mkern-1mu\hstretch{1.6}{#1}\mkern-1mu}}
\begin{document}
\parbox[b]{1in}{\parskip 1ex
$x^{\bigrs(x + \bigs(x(x+3)\bigs)\bigrs)}$\par
$\bigs(f(x) + g(x)\bigs)$ \par
$x^{\bigs(f(x) + g(x)\bigs)}$ \par
$y_{x^{\bigs(f(x) + g(x)\bigs)}}$ \par
}
\parbox[b]{1in}{\parskip 1ex
$ \biggs(\frac{\bigs(f(x) + g(x)\bigs)}{2}\biggs)$ \par
$ x^{\biggrs(\frac{\bigs(f(x) + g(x)\bigs)}{2}\biggrs)}$ \par
$y_{x^{\Biggrs(\frac{\bigs(f(x) + g(x)\bigs)}{2}\Biggrs)}}$ \par
}
\end{document}

\big
fences.\mathpalette
to use a\scriptstyle
font when necessary (the benefit is not great in this case, though).\bigl
and\bigr
for that formula even at text size. With three fences in sequence, I'd probably have the outermost slightly bigger; but having three consecutive fences in a superscript is a “don't do it”.amsmath
.