Math & Science ⇒ amsmath error: math mode in Natbib style
-
- Posts: 4
- Joined: Fri Sep 25, 2009 9:51 pm
amsmath error: math mode in Natbib style
Maybe one of you can help me out on this one:
I just switched from using the regular BibTex style to Natbib style.
Before, whenever I wanted to put some accents like \dot{a} or \grave etc. I could just put it between dollar signs $\dot{a}$ to have it in math mode.
Now when I'm using Natbib style it gives me this kind of errors:
<<Package amsmath error: \grave allowed only in math mode>>
And what I personally think is strange is that in the references at the end of my document, the names with accents are printed out fine (ex:Bùùth). They just disappear in my text when I refer to them (ex:Bth et al., 2006).
So the next thing I did was just leave out my package amsmath in the preamble. Everything works fine then, but of course, now I can't use amsmath anymore.
I've already been looking on the internet for the same sort of error in natbib but can't find any...
Any help is welcome!
evelien
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
amsmath error: math mode in Natbib style
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
Bùùth % direct insertion of accented characters
B\`u\`uth % control sequences to produce accents
\end{document}
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 4
- Joined: Fri Sep 25, 2009 9:51 pm
Re: amsmath error: math mode in Natbib style
Thank you for the fast reply.
Unfortunately, If I use the text accents I get the error "undefined control sequence". This only happened in my Bibtex, not my regular "LaTeX-texts". I already noticed that so I switched to using math accents which gave no problem in Bibtex. Now, when I'm using Natbib, also the math accents don't work.
I also tried the inputenc once (couple of months ago) for that problem but I remember that some other symbols which I use quite often didn't get printed out correctly (in which correctly I mean the way I want it

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
amsmath error: math mode in Natbib style
Code: Select all
\listfiles
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage{natbib}
\begin{filecontents*}{accents.bib}
@book{buuth01,
author={{A}dalbert {B}ùùth},
title={{D}irectly inserted accented characters},
publisher={{D}ummy publisher},
year={2009},
}
@book{buuth02,
author={{A}dalbert {B}\`u\`uth},
title={{A}ccents produced by control sequences},
publisher={{D}ummy publisher},
year={2010},
}
\end{filecontents*}
\begin{document}
\nocite{*}
\bibliographystyle{natdin}
\bibliography{accents}
\end{document}
Code: Select all
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
inputenc.sty 2008/03/30 v1.1d Input encoding file
utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
filecontents.sty 2009/03/17 v1.2 Create an external file from within a LaTeX document
natbib.sty 2009/11/07 8.31a (PWD, AO)
accents.bbl
***********
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10