有人能帮我把下面代码中的平方根符号弄成相同的大小,使它们的高度都一样吗?这是代码:
\documentclass[]{book}
\begin{document}
$\overline{\sqrt{v_{x}^{2}}}$ and
$\overline{\sqrt{v_{y}^{2}}}$ and
$\overline{\sqrt{v_{h}^{2}}}$
\end{document}
谢谢
编辑(2018/08/13):
\documentclass[a4paper]{book}
\usepackage[]{biblatex}
\usepackage{graphicx}
\usepackage{subfig} %for subfigures
\begin{document}
\begin{figure}%
\centering
\subfloat[SUB CAPTION TEXT]{{\includegraphics[width=.48\textwidth]{image1.pdf} }}%
~
\subfloat[SUB CAPTION TEXT]{{\includegraphics[width=.48\textwidth]{image2.pdf} }}%
\newline
\subfloat[SUB CAPTION TEXT]{{\includegraphics[width=.48\textwidth]{image3.pdf} }}%
~
\subfloat[SUB CAPTION TEXT]{{\includegraphics[width=.48\textwidth]{image4.pdf} }}%
\caption{$\overline{\sqrt{v_{\vphantom{h}\smash{y}}^{2}}}$}%
\label{fig:du}%
\end{figure}
\end{document}
答案1
以下是基于\smash
和的解决方案\vphantom
:
\documentclass[]{book}
\begin{document}
$\overline{\sqrt{v_{x}^{2}}}$ and
$\overline{\sqrt{v_{\smash{y}}^{2}}}$ and
$\overline{\sqrt{v_{h}^{2}}}$\\
If you’re a perfectionist, you can also have the exponent 2 at the same height: \\
$\overline{\sqrt{v_{\vphantom{h}x}^{2}}}$ and
$\overline{\sqrt{v_{\vphantom{h}\smash{y}}^{2}}}$ and
$\overline{\sqrt{v_{h}^{2}}}$
\end{document}
答案2
我会用\strut
:
\documentclass{book}
\begin{document}
$\overline{\sqrt{\strut v_{x}^{2}}}$ and
$\overline{\sqrt{\strut v_{y}^{2}}}$ and
$\overline{\sqrt{\strut v_{h}^{2}}}$
\end{document}