Consider the input


\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}[Scale=0.88]
\setmonofont{TeX Gyre Cursor}
\setmathfont[Ligatures=TeX]{TeX Gyre Termes Math}
\(\grave{x}\) \(\acute{x}\) \(\grave{\mathsf{sum}}\) \(\acute{\mathsf{sum}}\)

When running xelatex or pdflatex, we get an output such as

x̀, x́, sùm, súm


Lualatex puts the accent on m rather than centered.

How to get the grave and acute accents such that

  • they are slightly wider and extend with the width of the argument (similar to \widehat or \widetilde, e.g.) if the argument has at least two letters and

  • they default to the standard \grave and \acute if the argument is a single letter


This question asks for macros \widegrave{...} and \wideacute{...}. A solution has to work with all three engines {pdf|xe|lua}latex, produce centered accents in any case, and work with the packages listed in the MWE. How much the accents should be extended is a matter of taste, but two rules definitely make sense:

  • The accents should clearly not extend beyond the left and right bounds of the argument in case it has 2 letters or more.

  • The accents should be at least as wide as the standard grave/acute accents in any case.

Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32820&p=110399

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.