General ⇒ command \r invalid
command \r invalid
LaTeX Warning: Command \r invalid in math mode on input line xx
I investigated this and couldn't find anything on google or on these forms.
However, It seems that the error occurs whenever I use \AA (the angstrom symbol) inside an equation environment.
For example, I get the error when I try to compile this file
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\AA
\end{equation}
\end{document}
The warning occurs on line 5 (the \AA)
This warning does not seem to affect anything, but it is bugging me, and I would appreciate any help.
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
Re: command \r invalid
I am running latex off of ubuntu 8.04, and I installed it using apt.
Doing latex -v produces
pdfTeX using libpoppler 3.141592-1.40.3-2.2 (Web2C 7.5.6)
kpathsea version 3.5.6
Copyright 2007 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea is copyright 2007 Karl Berry and Olaf Weber.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX using libpoppler copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX using libpoppler source.
Primary author of pdfTeX using libpoppler: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea written by Karl Berry, Olaf Weber, and others.
Compiled with libpng 1.2.15beta5; using libpng 1.2.15beta5
Compiled with zlib 1.2.3.3; using zlib 1.2.3.3
Compiled with libpoppler version 3.00
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
command \r invalid
Code: Select all
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\text{\AA}
\end{equation}
\end{document}
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10