在第二\sqrt
,
两个都下标和上标分别是\smash
:
a_{\smash{0}}^{\smash{2}
但它们sqrt
的尺寸却不同?
如何使第二个\sqrt
与第一个垂直尺寸完全相同?
笔记:
- 该
tikz
图仅用于显示两者的\sqrt
尺寸不同。 - 我愿意不是想要调整第一个的大小
\sqrt
来匹配第二个。
代码:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}% <--- ONLY to show that the symbols are of different size
\newcommand{\MyTikzMark}[2]{%
\tikz[baseline,remember picture] \node[anchor=base,inner sep=0pt] (#1) {$\displaystyle#2$};%
}%
\begin{document}
\[
\MyTikzMark{Left Marker}{\sqrt{\overline{q}}} \sqrt{\overline{q}a_{\smash{0}}^{\smash{2}}}
\]
\begin{tikzpicture}[remember picture, overlay, dotted]
\draw [red] ([shift={(-2ex,-1pt)}]Left Marker.north) -- ++(10.0ex,0);
\draw [red] ([shift={(-2ex,+0pt)}]Left Marker.south) -- ++(10.0ex,0);
\end{tikzpicture}%
\end{document}
答案1
你做得到相同的平方根符号;与你想象的相反,TikZ 进入了画面。但是,你必须粉碎全部新内容。
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}% <--- ONLY to show that the symbols are of different size
\newcommand{\MyTikzMark}[2]{%
\tikz[baseline,remember picture] \node[anchor=base,inner sep=0pt] (#1) {$#2$};%
}%
\begin{document}
\begin{gather*}
\sqrt{\overline{q}} \sqrt{\overline{q}\smash{a_{0}^{2}}}
\\
\MyTikzMark{Left Marker}{\displaystyle\sqrt{\overline{q}}}
\sqrt{\overline{q}\smash{a_{0}^{2}}}
\\
\MyTikzMark{Left Marker B}{\sqrt{\overline{q}}}
\textstyle\sqrt{\overline{q}\smash{a_{0}^{2}}}
\end{gather*}
\begin{tikzpicture}[remember picture, overlay, dotted]
\draw [red] ([xshift=-2ex]Left Marker.north) -- ++(10.0ex,0);
\draw [red] ([xshift=-2ex]Left Marker.south) -- ++(10.0ex,0);
\draw [red] ([xshift=-2ex]Left Marker B.north) -- ++(10.0ex,0);
\draw [red] ([xshift=-2ex]Left Marker B.south) -- ++(10.0ex,0);
\end{tikzpicture}
\end{document}