0

I am experiencing an issue with the appearance of \tilde{x} in equation environment when using the unicode-math package (see the left figure). Specifically, \tilde{x} looks different from the one without the unicode-math package (see the right figure). Could someone please provide guidance on how to achieve the right appearance for \tilde{x} while using the unicode-math package?

Thank you for your help!

unicode-math tilde traditional tilde

3
  • 2
    Welcome to tex,sx. Please add a small compilable example to your question that demonstrates how you obtained the objectionable version. Then we won't have to guess what document class and packages were used. Commented Jun 1, 2024 at 4:32
  • Are you maybe comparing the outputs of math-mode $\tilde{x}$ and text-mode \~{\textit{x}}? Incidentally, do you mean pdfLaTeX when you refer to "traditional LaTeX"? Please advise. Commented Jun 1, 2024 at 5:31
  • 1
    the whole point of unicode-math is to use different (opentype) math fonts for math, so while some characters may look similar, in principle every character changes, and the way to avoid that is to not use the package. There isn't a "wrong" and "right" appearance, just that you may be more familiar with the computer modern type 1 font than whichever opentype font you have specified in unicode-math (which defaults to latin modern math opentype). Commented Jun 1, 2024 at 8:12

1 Answer 1

1

For some reasons, the developers of Latin Modern Math decided for a different shape of the tilde math accent.

If you don't like it, you can change font. For instance, NewComputerModern Math has a shape that's almost alike the Computer Modern one.

\documentclass{article} \usepackage{graphicx} \usepackage{unicode-math} \usepackage{fontsetup} \begin{document} $\tilde{x}$\raisebox{-1bp}{\includegraphics{xuc-old}} \end{document} 

The image on the right has been prepared with

\documentclass[border=1]{standalone} \begin{document} $\tilde{x}$ \end{document} 

Compiling the latter and then the former with XeLaTeX or LuaLaTeX yields

enter image description here

You need a recent version of NewComputerModern Math (older versions may have the same glyph as Latin Modern Math).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.