I once read in "Die Texnische Komödie 1/2011" that it is possible to make the round delimiters ()
active, so you don´t need do use \left(\right)
any more. The code is:
\makeatletter
\def\resetMathstrut@{%
\setbox\z@\hbox{%
\mathchardef\@tempa\mathcode`\[\relax
\def\@tempb##1"##2##3{\the\textfont"##3\char"}%
\expandafter\@tempb\meaning\@tempa \relax
}%
\ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}
\makeatother
\begingroup
\catcode`(\active \xdef({\left\string(}
\catcode`)\active \xdef){\right\string)}
\endgroup
\mathcode`(="8000 \mathcode`)="8000
\setlength\delimitershortfall{-1pt}
\makeatletter
\catcode`\_\active
\def_#1{\sb{\operator@font#1}}
\makeatother
Don´t ask me details about, I am not into them.
Now I wonder if it is possible to change []
and maybe \{\}
the same way, so that you don´t need to use \left...\right...
any more for "normal" delimiters.
Thanks for your help!
MWE:
\documentclass{scrartcl}
\usepackage{amsmath}
\makeatletter
\def\resetMathstrut@{%
\setbox\z@\hbox{%
\mathchardef\@tempa\mathcode`\[\relax
\def\@tempb##1"##2##3{\the\textfont"##3\char"}%
\expandafter\@tempb\meaning\@tempa \relax
}%
\ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}
\makeatother
\begingroup
\catcode`(\active \xdef({\left\string(}
\catcode`)\active \xdef){\right\string)}
\endgroup
\mathcode`(="8000 \mathcode`)="8000
\setlength\delimitershortfall{-1pt}
\makeatletter
\catcode`\_\active
\def_#1{\sb{\operator@font#1}}
\makeatother
\begin{document}
\begin{align}
((((a+b)(a-b))))=a^2-b^2
\end{align}
\end{document}
\left
and\right
you often get better spacing if you choose the size explictly (\big(
etc.(
the code shown makes all subscripts use an upright font??