答案1
您可以将灰色平方根排版得稍微低一些,并将其移动到宽度为零的框中的幻影上方,然后再移动到正常的平方根。
\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}
我从来没有见过这样的建筑。
答案2
受以下代码启发,文本的柔和阴影
\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}
答案3
这里,我\ssqrt
使用 来定义\stackinset
。阴影的水平和垂直偏移量可以通过分别更改 的.6pt
和.7pt
参数来调整\stackinset
。同样,阴影的颜色选择gray!70
也可以进行类似调整。
\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}
答案4
我用过一个名为影子文本但是阴影不仅影响到词根,还影响到整个表情,看着它会伤眼睛 :-(。
\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}
可以对此进行修改:
\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}