
\overrightarrow
나는 화살표 대신 작살을 사용하는 것을 제외 하고 거의 정확하게 작동하는 LaTeX 매크로를 정의하고 싶습니다 . 나는 많은 솔루션을 연구했지만 그 중 어느 것도 제대로 작동하지 않습니다.
- 틱즈 솔루션: 보기에는 좋지만 가변 너비는 아닙니다.
- 과잉 솔루션: 작살을 아래로 이동하면 작동하지만 가변 너비는 작동하지 않습니다.
- 하푼 패키지 솔루션: 폭은 가변적이지만 작살의 높이는 원래 크기보다 두 배 더 큽니다. 작살의 머리를 동일하게 유지하고 꼬리의 길이를 바꾸는 대신 작살의 모양도 너비에 따라 다릅니다.
- 악센트 세트 솔루션: 가변 너비가 아닙니다.
- XeTeX 솔루션: 이것은 내가 원하는 것과 정확히 같지만 LaTeX에서 문서를 조판하고 있습니다.
LaTeX에서 XeTeX 솔루션을 재현하거나 원하는 속성에 맞게 다른 솔루션 중 하나를 변경할 수 있는 방법이 있습니까?
답변1
다소 조잡한 해결책은 \overrightarrow
from 의 정의를 복사하는 것입니다 amsmath
.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\overrightharpoon}{%
\mathpalette{\overarrow@\rightharpoonfill@}}
\def\rightharpoonfill@{\arrowfill@\relbar\relbar\rightharpoonup}
\makeatother
\begin{document}
$\overrightharpoon{aaaaaaa}+\overrightharpoon{a}$
\end{document}
수정된 코드를 사용하면 더 작은 작살을 얻을 수 있습니다.https://tex.stackexchange.com/a/248297/4427
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\overrightsmallharpoon}{\mathpalette{\overarrowsmall@\rightharpoonfill@}}
\def\rightharpoonfill@{\arrowfill@\relbar\relbar\rightharpoonup}
\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
\begin{document}
$\overrightsmallharpoon{aaaaaaa}+\overrightsmallharpoon{a}$
\end{document}