TeX Gyre Termes Math 및 lualatex를 사용할 때 \smaller에서도 넓은 무덤과 급성 악센트를 정확하게 만드는 방법은 무엇입니까?

TeX Gyre Termes Math 및 lualatex를 사용할 때 \smaller에서도 넓은 무덤과 급성 악센트를 정확하게 만드는 방법은 무엇입니까?

계속TeX Gyre Termes 및 TeX Gyre Termes Math의 넓은 예각 및 넓은 무덤\smaller, 우리는 TeX Gyre Termes(Math) 글꼴 및 UTF-8 엔진(NewTX 및 의 경우 pdflatex참조) 에서 넓은 억음 및 정확한 악센트가 작동하도록 노력합니다.NewTX 및 pdflatex를 사용할 때 \smaller에서도 넓은 무덤과 급성 악센트를 정확하게 만드는 방법은 무엇입니까?):

\documentclass{article}
\pagestyle{empty}
\usepackage{unicode-math}
\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}[Scale=0.88]%%% Somewhat ok.
\setmonofont{TeX Gyre Cursor}%%% No explicit turning on ligatures for the monospaced font.
\setmathfont[Ligatures=TeX]{TeX Gyre Termes Math}
\usepackage{scalerel,stackengine}\stackMath
\usepackage{relsize}
%%% thanks to  http://tex.stackexchange.com/a/611030
\newcommand\wideacute[1]{%
  \ThisStyle{\savestack\tmpA{$\SavedStyle#1$}%
  \savestack{\tmpbox}{$\SavedStyle\stretchto{%
    \scalerel*[\wd\tmpAcontent]%
      {\kern-.83\LMpt\Umathchar"7"0"00B4\kern-.12\LMpt}%
    {\rule{0ex}{\textheight}}%
  }{2\LMex}$}%
  \stackengine{-6.3\LMpt}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}%
}
\newcommand\widegrave[1]{%
  \ThisStyle{\savestack\tmpA{$\SavedStyle#1$}%
  \savestack{\tmpbox}{$\SavedStyle\stretchto{%
    \scalerel*[\wd\tmpAcontent]%
      {\kern-.43\LMpt\char"0060%
        \kern-.9\LMpt}%
    {\rule{0ex}{\textheight}}%
  }{1.05\LMex}$}%
  \stackengine{-2.3\LMpt}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}%
}
\begin{document}
\newcommand{\test}[1]{\(\displaystyle \wideacute{#1}\ \widegrave{#1}\) \(\textstyle \wideacute{#1}\ \widegrave{#1}\) \(\scriptstyle \wideacute{#1}\ \widegrave{#1}\) \(\scriptscriptstyle \wideacute{{#1}}\ \widegrave{#1}\)}%
\newcommand{\ttest}[1]{\test{#1}\\{\smaller\test{#1}}}%
\newcommand{\tttest}[1]{\ttest{\mathit{#1}}}%
\noindent
\tttest{sum}\\
\tttest{loop}\\
\tttest{pool}\\
\tttest{buffer}\\
\ttest{\sigma_k}
\end{document}

이것을 먹이면 다음과 같은 lualatex결과가 나옵니다.

산출

보시다시피, 단어와 악센트 사이의 거리는 일반 크기 글꼴에서는 어느 정도 허용됩니다. (비록 무덤의 "루프"와 예음의 "풀"에서는 이 거리가 너무 크다고 불평할 수도 있습니다) . 그러나 버전에서는 \smaller이 두 부분이 겹쳐서 바람직하지 않습니다. 일반 크기 버전이 여전히 보기 좋게 보이도록(또는 적어도 현재보다 나쁘지 않게, 즉 악센트가 여전히 단어 바로 위에 위치해야 함) 글꼴 크기에 대한 종속성을 도입하는 방법과 더 작은 크기 버전을 사용하는 방법 더 좋아 보이나요(즉, 악센트가 단어와 겹쳐서는 안 됩니다)?

답변1

사용

\stackengine{-1.3\LMex}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}%

\wideacute의 정의에서

\stackengine{-.4\LMex}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}%

의 정의에 있습니다 \widegrave.

관련 정보