The following redefinition of the
\left
and
\right
command pair at first sight seems to have the desired effect.
Code: Select all
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage[sc]{mathpazo}
\let\Right\right
\let\Left\left
\makeatletter
\def\right#1{\Right#1\@ifnextchar){\!\!\right}{}}
\def\left#1{\Left#1\@ifnextchar({\!\!\left}{}}
\makeatother
\begin{document}
I have a function
\begin{align}
f(x) &= \left(\sqrt{\frac{x}{20}}\right),
\end{align}
which is good.
\end{document}
But it becomes ugly when there are other characters than e. g. punctuation marks.
Code: Select all
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage[sc]{mathpazo}
\let\Right\right
\let\Left\left
\makeatletter
\def\right#1{\@ifnextchar){\Right}{}#1\!\!}
\def\left#1{\@ifnextchar({\!\!\Left}{}#1}
\makeatother
\begin{document}
I have a function
\begin{align}
x \left(\sqrt{\frac{x}{20}}\right) y
\end{align}
which is good.
\end{document}
So I would use this with caution. You either have to balance superfluous space with negative space or missing space with additional space. This could end up in a vicious circle. And so the proposal of Stefan might be better.
Thorsten