4

I am looking for the command/package that can produce the following root: enter image description here

I have found something calling this a "complex" root - but nothing really more. Does anyone have some more information to this? Thanks!

  • 1
    By "special looking", are you referring to the shadowed appearance? – Steven B. Segletes Jul 15 '21 at 15:03
  • In the meantime....welcome to the TeX.SE community. – Sebastiano Jul 15 '21 at 15:12
  • 1
    Thanks for the welcoming words. Sorry if my question was not clear enough: by special looking I am referring to the drop shadow, how to produce this effect or if it is already incorporated into a package and what it actually means in a mathematical context. – Chris Beckenbauer Jul 15 '21 at 15:36
  • 8
    For the record, that's really subtle if it actually means something different from an un-shadowed root sign. I'd probably assume my printer made a mistake or the paper bled a little before I'd even consider that it might be significant. – Chris Bouchard Jul 16 '21 at 00:59
  • I can't imagine what that might mean in a mathematical context. Can you give us a clue? I'm curious! – TonyK Jul 16 '21 at 15:43

4 Answers4

8

You can typeset the grey square root a bit lowered and moved right over a phantom in a box of width zero, then the normal square root.

\documentclass{article}
\usepackage{amsmath,xcolor}

\newcommand{\specialsqrt}[1]{% \makebox[0pt][l]{% \color{gray}% \raisebox{-0.75pt}{% $\kern0.75pt\sqrt{\displaystyle\phantom{#1}\kern-0.75pt}$% }% }% \sqrt{\displaystyle#1}% }

\begin{document}

[ \specialsqrt{(x_R-y_{yaw})^2+(y_{yaw})^2+(z_{yaw})^2} ]

\end{document}

enter image description here

I've never seen such a construction.

egreg
  • 1,121,712
7

How about the following code, inspired by Soft drop shadow of a text

\documentclass{article}

\usepackage{tikz} \pgfmathsetmacro{\randamp}{0.005} \pgfmathtruncatemacro{\totshadow}{30}

\begin{document}

\begin{tikzpicture} \begin{scope}[xshift=0.1em,yshift=-0.2ex] \path[opacity=0.01] foreach \nshadow [evaluate=\nshadow as \angshadow using \nshadow/\totshadow*360] in {1,...,\totshadow}{ node at (\angshadow:\randamp) {$\displaystyle\sqrt{\phantom{(x_r-x_{\mathit{yaw}})^2+(y_{\mathit{yaw}})^2+(z_{\mathit{yaw}})^2}}$} }; \end{scope} \node[] at (0,0) {$\displaystyle\sqrt{(x_r-x_{\mathit{yaw}})^2+(y_{\mathit{yaw}})^2+(z_{\mathit{yaw}})^2}$}; \end{tikzpicture} \end{document}

enter image description here

citsahcots
  • 7,992
6

Here, I define \ssqrt using a \stackinset. The horizontal and vertical offsets of the shadow can be adjusted by changing the .6pt and .7pt arguments of \stackinset, respectively. Likewise the color choice for the shadow, gray!70, can similarly be adjusted.

\documentclass{article}
\usepackage{stackengine, xcolor, newtxmath, newtxtext,amsmath}
\stackMath
\newcommand\ssqrt[2][]{%
  \stackinset{r}{.6pt}{b}{.7pt}
  {\displaystyle\sqrt[#1]{\phantom{#2}}}
  {\displaystyle\textcolor{gray!70}{\sqrt{\textcolor{black}{#2}}}}
}
\begin{document}

$x\ssqrt{(x_r-x_{\text{yaw}})^2+(y_{\text{yaw}})^2+(z_{\text{yaw}})^2}$

\end{document}

enter image description here

3

I have used an old package named shadowtext but the shadow invades the whole expression and not only the root and it hurts the eyes to see it :-(.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{shadowtext}

\begin{document} \shadowoffset{.8pt} \shadowtext{$\sqrt{(x_R-x_{\text{yaw}})^2+(y_{\text{yaw}})^2+(z_{\text{yaw}})^2}$} \end{document}

enter image description here

An adaptation can be made to this effect:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{shadowtext}
\shadowoffset{.8pt}
\newcommand\ssqrt[1]{%
  \bgroup\ooalign{\shadowtext{$\sqrt{\phantom{#1}}$}\cr\hfil$#1$}\egroup}
\begin{document}
\[\ssqrt{(x_R-x_{\text{yaw}})^2+(y_{\text{yaw}})^2+(z_{\text{yaw}})^2}\]

[\ssqrt{3x}] \end{document}

enter image description here

Sebastiano
  • 54,118