When typing a square root sign sometimes it looks a little bit ugly when the lower part reaches beyond the baseline:
\documentclass{standalone}
\begin{document}
The expression ( \sqrt{x} ) is well defined.
\end{document}
I guess that the reason is to be consistent with radicands with descenders like y (to obtain the same sqrt sign height). For certain inline situations with only one radicand without ascenders or descenders (like a, n, x, ...) I would like to have a command \smallsqrt, whose lowest part starts at the baseline and whose highest part (the bar) is not changed, i.e. at the same height as the bar of the normal \sqrt sign.
Supplement and possible solution:
To be clear: I don't want to replace the original \sqrt in all cases. Only sometimes in inline mode I would like to have a more compact square root sign.
Here I have a little example what I am dreaming of, implemented with TikZ:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
% changed from: https://tex.stackexchange.com/a/680575/263991
\NewDocumentCommand{\smallsqrt}{s O{,} m}{%
\begin{tikzpicture}[baseline=(A.base)]
\node[inner ysep=2pt, inner xsep=0pt] (A) at (0,0) {\ensuremath{#3}\kern1pt};
\coordinate (tail) at ([yshift=-.5mm]A.north east);
\coordinate (NO) at (A.north east);
\coordinate (NW) at (A.north west);
\coordinate (bottom) at ([shift={(-.12,.07)}]A.south west);
\coordinate (center) at ([xshift=-1.8mm,yshift=.3mm]A.west);
\coordinate (start) at ($(center)+(-.3mm,-.3mm)$);
\coordinate (centerF) at ($(center)+(.1mm,.1mm)$);
\coordinate (bottomF) at ($(bottom)+(.1mm,.1mm)$);
\coordinate (centerM) at ($(center)+(.05mm,.05mm)$);
\coordinate (bottomM) at ($(bottom)+(.05mm,.05mm)$);
\IfBooleanTF{#1}{
\draw[rounded corners=.1pt] (tail)-- (NO) -- (NW) -- (bottom) --(center) node[inner sep=1pt, above left,xshift=1mm]{$\scriptscriptstyle #2$};
}{
\draw[rounded corners=.1pt] (NO) -- (NW) -- (bottom) --(center) node[inner sep=1pt, above left,xshift=1mm]{$\scriptscriptstyle #2$};
}
\draw[line width=0.25pt,rounded corners=.05pt,shorten >=.25pt,line cap=round] (start) -- (centerF) -- (bottomF);
\draw[shorten >=.25pt,shorten <=.25pt,line cap=round] (centerM) -- (bottomM);
\end{tikzpicture}%
}
\begin{document}
The expression ( \sqrt{x}+\smallsqrt{a}+\smallsqrt*{a}+\smallsqrt{b}+\smallsqrt{y}+\smallsqrt{\vphantom{b}y}+\smallsqrt[3]{n}) is well defined.
\end{document}
I am not really satisfied, but I think it is for certain purposes a good solution.
(The *-version adds the German school tail.)




