3

If I compile the following code (TeXLive 2011; Mac OS X 10.7.2, latexmk 4.26), I get wrongly placed tildes (in the middle of the letters instead of on top of them). Is this a bug?

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[lm,T1experimental]{sfmath}
\usepackage[american]{babel}

\begin{document}
    $\tilde{\psi}$ $\tilde{A}$
\end{document}
5
  • 2
    Removing \usepackage{lmodern} and the lm package option from sfmath seems to solve the problem. Note the package Bugs and Limitations: "The font metrics are not adjusted to math usage (this may result in typographically unsatisfying results)."
    – Werner
    Oct 30, 2011 at 17:32
  • Thanks, Werner. I was hoping that there is a method with lmodern... Oct 30, 2011 at 18:29
  • By the way, it's still wrong if you put in $\hat{A}$ [the hat is not perfectly placed] Oct 30, 2011 at 18:35
  • 1
    That's true, and that's perhaps why messages like "The functionality of this package is limited by the intention to work without additionally defined (virtual) fonts; instead, only standard fonts are used" are also given. If you're interested in manipulating the accents, use the accents package.
    – Werner
    Oct 30, 2011 at 18:47
  • Thanks. Is there any other solution to get sans serif math fonts? As far as I know, sfmath is the best approach. But I won't start fixing accents since that's not the only problem. lmodern is a must-have for me. Oct 30, 2011 at 18:52

1 Answer 1

3

Try

\renewcommand{\tilde}{\mathaccent"767E }
%\renewcommand{\tilde}{\protect\mathaccentV{tilde}67E}

The second line is needed if you use amsmath.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .