Math & Scienceapparent tilde/breve bug in amsmath

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ngrube
Posts: 2
Joined: Sun Oct 02, 2011 10:30 pm

apparent tilde/breve bug in amsmath

Post by ngrube »

Hi,

I have encountered what appears to be a bug in the amsmath package related to nested tildes and/or breves. I would be grateful for suggestions on where to report this and/or on workarounds. I already sent an email to a tech support address at AMS, but I was not certain whether that was the right thing to do. This is my first attempt at reporting a bug.

An minimum working example follows. The error is that the j from the first equation is somehow remembered and shows up unexpectedly in the second and third equations. If I comment out the amsmath package, then it works correctly.

Thanks,
Nathan Grube

Code: Select all

\documentclass[11pt]{article}
\usepackage{geometry}                
\geometry{letterpaper}
\usepackage[]{amsmath}
\begin{document}

\begin{equation}
\breve{\tilde{j}}
\end{equation}

\begin{equation}
\breve{\breve{{T}} \breve{{v}}}
\end{equation}
\begin{equation}
\tilde{{\tilde{T}} {\tilde{v}}}
\end{equation}

\end{document}
Last edited by Stefan Kottwitz on Sun Oct 02, 2011 11:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

apparent tilde/breve bug in amsmath

Post by Stefan Kottwitz »

Hi Nathan,

that's interesting!

Here's a quick workaround: use

Code: Select all

\smash{\vphantom{$\breve{}$}}
or probably better

Code: Select all

\makeatletter
\global\let\macc@nucleus\@empty
\makeatother
before the next equation which showed that problem.

Stefan
LaTeX.org admin
ngrube
Posts: 2
Joined: Sun Oct 02, 2011 10:30 pm

Re: apparent tilde/breve bug in amsmath

Post by ngrube »

Thank you, Stefan! That fixes my problem.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

apparent tilde/breve bug in amsmath

Post by Stefan Kottwitz »

Hi Nathan,

it seems to be a known bug in amsmath, which is on the list for the next overhaul of the package. This can be read on TeX.SX, also another fix, I posted the problem there for hopefully finding a better fix:

Why do arguments to nested \tilde or \breve commands reappear when amsmath is used?

Stefan
LaTeX.org admin
Post Reply