# Change the default size of square brackets in latex math mode

Personally I think the default size of square brackets in latex math mode is too small. For example, for an interval [a,b], I would prefer \big[\big] as opposed to plain []. My question is, what can I do to change the default size of [], so that when I input [] in math mode, they will show up automatically the same size as \big[\big]?

Right now I'm defining a new command called \b{} which takes one argument and inserts it between \big[ and \big], but the code looks ugly. Apparently \newcommand (or \def or \let) does not allow [ to be refined.

Any help is much appreciated. Thanks.

You can load a scaled version of the relevant font and substitute the standard definitions for [ and ]. Below I have chosen a scaling of 1.2 over the standard size for some exaggeration, probably you only want a factor of 1.1

\documentclass{article}

\DeclareFontFamily{OT1}{cmrlop}{}

\newcommand{\mybscale}{1.2}
\DeclareFontShape{OT1}{cmrlop}{m}{n}%
{<5><6><7><8><9><10><12>gen*[\mybscale]cmr%
<10.95>*[\mybscale]cmr10%
<14.4>*[\mybscale]cmr12%
<17.28><20.74><24.88>*[\mybscale]cmr17}{}

\DeclareSymbolFont{loperators}{OT1}{cmrlop}{m}{n}
\DeclareMathSymbol{[}{\mathopen}{loperators}{"5B}
\DeclareMathSymbol{]}{\mathclose}{loperators}{"5D}
\DeclareMathDelimiter{[}{\mathopen}{loperators}{"5B}{largesymbols}{"02}
\DeclareMathDelimiter{]}{\mathclose}{loperators}{"5D}{largesymbols}{"03}

\begin{document}

$$[a,b]$$

\begin{displaymath}
\left[a,c\right] \bigl[a,b\bigr] \Bigl[a,b\Bigr] \biggl[a,b\biggr] \Biggl[a,b\Biggr]
\end{displaymath}

$$([()])$$

\end{document}


The code adjusts the normal size of the brackets, but not the large scaled versions. You would have to apply similar techniques to the largesymbols family to change those.

• Wouldn't something like \DeclareMathDelimiter{[}{\mathopen} {loperators}{"5B}{largesymbols}{"02} be safer? – campa May 16 at 8:52
• @campa Thanks. I think we need both, your code is relevant for \left...\right. – Andrew Swann May 16 at 9:03
• Thanks guys I believe that's exactly what I'm looking for! – Jason May 19 at 7:16

You can define your own command (not \b because it has been already defined) to achieve your objective.

\documentclass{article}
\newcommand{\brakets}[1]{\ensuremath{\bigg[#1\bigg]}}
\begin{document}
\noindent
$[31]$ original\\
\brakets{31} something something something...\\
\brakets{xyz} something something something...\\
$\brakets{xyz} + x = \cdots$ in mathmode as well\\
\end{document}


You could define $ as \big[ and $ as \big], the problem is that  are already defined to open and close the displaystyle math mode environment so one has to undefine them.

\documentclass{article}

\makeatletter
\let$\@undefined \let$\@undefined
\makeatother

\def${\big[} \def${\big]}

\begin{document}
$$$a,b$$$
\end{document}

• What about the already-available $ $? The whole document will be messed up. At least one should find a different name for the macro. Redefining one of the most important macro in LaTeX doesn't sound good to me. – user156344 May 16 at 9:40
• @JouleV Totally agree, but the author wanted something that didn't change the syntax of the parentheses. That's the closest thing that I could think of. – Edoardo Serra May 16 at 17:00