Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
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 '11 at 17:32
    
Thanks, Werner. I was hoping that there is a method with lmodern... –  Marius Hofert Oct 30 '11 at 18:29
    
By the way, it's still wrong if you put in $\hat{A}$ [the hat is not perfectly placed] –  Marius Hofert Oct 30 '11 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 '11 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. –  Marius Hofert Oct 30 '11 at 18:52
add comment

1 Answer

Try

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

The second line is needed if you use amsmath.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.