Continuing Wide acute and wide grave for TeX Gyre Termes and TeX Gyre Termes Math , we try to make wide grave and accute accents work in \smaller with TeX Gyre Termes (Math) fonts and UTF-8 engines (for NewTX and pdflatex, cf. How to make wide grave and acute accents accurate also in \smaller when using NewTX and pdflatex? ):

\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}
%%% thanks to  http://tex.stackexchange.com/a/611030
\newcommand{\test}[1]{\(\displaystyle \wideacute{#1}\ \widegrave{#1}\) \(\textstyle \wideacute{#1}\ \widegrave{#1}\) \(\scriptstyle \wideacute{#1}\ \widegrave{#1}\) \(\scriptscriptstyle \wideacute{{#1}}\ \widegrave{#1}\)}%

Feeding this to lualatex results in


As you see, the distance between a word and its accent is somewhat acceptable in normal-size font (though you could also complain there that this distance is too large in the grave'd “loop” and the acute'd “pool”). However, in the version in \smaller these two parts overlap, which is undesirable. How to introduce a dependency on the font size so that the normal-size version still looks good (or, at least, not worse than it currently is, i.e., the accent should still sit just above the word) and the smaller-size version looks better (i.e., the accent should not overlap the word)?

1 Answer 1




in the definition of \wideacute and


in the definition of \widegrave.

  • Thanks! Is the main insight changing the units from \LMpt to \LMex? Unfortunately, the distance between the accented text and the accent got larger also in normal font: i.imgur.com/p5ipSse.png .
    – user224332
    Commented May 6, 2022 at 21:32
  • I ended up with \stackengine{-1.38\LMex}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}% in \wideacute and \stackengine{-.52\LMex}{\SavedStyle#1}{\tmpbox}{O}{c}{F}{T}{S}}% in \widegrave: imgur.com/g2K03Ko.png .
    – user224332
    Commented May 6, 2022 at 21:40

You must log in to answer this question.