2

This question already has an answer here:

Sorry for my bad English.

I have a problem with removing the space between left bracket and multiple root square.

I use code

\documentclass{article}

\usepackage{amsmath}

\usepackage{letltxmacro}

\LetLtxMacro{\oldsqrt}{\sqrt}

\renewcommand{\sqrt}[2][]{\oldsqrt[#1]{#2}}


\begin{document}

$\left(\sqrt{3} \right)$ $\left(\sqrt[3]{4}\right)$ 


\end{document}

But only space in the left one got removed.

enter image description here

marked as duplicate by egreg spacing Jun 17 '15 at 7:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Maybe this would suffice. However, it does not (to my mind) work reasonable spacing in other circumstances (post square root), so I would prefer renaming it as \xsqrt or some unique name to be used sparingly.

RE-REVISED to take Heiko's suggestion on how to remove extra space following the square root:

\documentclass{article}
\usepackage{amsmath}
\usepackage{letltxmacro}
\LetLtxMacro{\oldsqrt}{\sqrt}
\renewcommand{\sqrt}[2][\mkern8mu]{\mkern-8mu\mathop{}\oldsqrt[#1]{#2}}
\begin{document}
$\left(\sqrt{3} \right)$ $\left(\sqrt[3]{4}\right)$ 

$x\sqrt{3} x\sqrt[3]{3}$

$y=\sqrt{3} = x = \sqrt[3]{2}$
\end{document}

enter image description here

REVISED:

\documentclass{article}
\usepackage{amsmath}
\usepackage{letltxmacro}
\LetLtxMacro{\oldsqrt}{\sqrt}
\renewcommand{\sqrt}[2][\mkern8mu]{\mkern-4mu\mathop{\oldsqrt[#1]{#2}}}
\begin{document}
$\left(\sqrt{3} \right)$ $\left(\sqrt[3]{4}\right)$ 

$x\sqrt{3} x\sqrt[3]{3}$

$y=\sqrt{3} = x = \sqrt[3]{2}$
\end{document}

enter image description here

  • 2
    For the left side, \mathop{}\! before the root stuff can be used, then the right side remains unchanged regarding the horizontal spacing. – Heiko Oberdiek Jun 17 '15 at 4:29
  • @HeikoOberdiek Thanks for the suggestion. – Steven B. Segletes Jun 17 '15 at 10:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.