我正在寻找一种方法来减小\overleftrightarrow
(或将其更改为类似函数),因为与\vec
或相比,它似乎很大。我怎样才能在最小示例上\hat
更改函数以获得与其他函数更一致的东西?非常感谢 :)\te
\documentclass{report}
\usepackage{amsmath}
\newcommand{\te}[1] {\overleftrightarrow{#1}}
\begin{document}
The following tensor $\te{A}$ has a huge arrow compared to $\vec{A}$ or $\hat{A}$.
\end{document}
答案1
您可以调整代码https://tex.stackexchange.com/a/248297/4427(这里我把三个“小”版本都放上了)。
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\overleftrightsmallarrow}{\mathpalette{\overarrowsmall@\leftrightarrowfill@}}
\newcommand{\overrightsmallarrow}{\mathpalette{\overarrowsmall@\rightarrowfill@}}
\newcommand{\overleftsmallarrow}{\mathpalette{\overarrowsmall@\leftarrowfill@}}
\newcommand{\overarrowsmall@}[3]{%
\vbox{%
\ialign{%
##\crcr
#1{\smaller@style{#2}}\crcr
\noalign{\nointerlineskip}%
$\m@th\hfil#2#3\hfil$\crcr
}%
}%
}
\def\smaller@style#1{%
\ifx#1\displaystyle\scriptstyle\else
\ifx#1\textstyle\scriptstyle\else
\scriptscriptstyle
\fi
\fi
}
\makeatother
\newcommand{\te}[1]{\overleftrightsmallarrow{#1}}
\begin{document}
\[
\overleftrightarrow{A}\te{A}\hat{A}
\]
\end{document}