# Using {\AA} when \r is redefined

I'd like to use {\AA} to input a capital A with a ring above. However, the document I am writing has to import some definitions which I have no control over.

One of the definitions changes \r:

\renewcommand{\r}[1]{\right#1}


Is there a way to import the above definition without changing it, and somehow still use {\AA}? I can put definitions before the file that changes \r is imported, if that helps.

• One of the silliest redefinitions I've seen, you have all my sympathy 😄 Jun 17, 2016 at 8:13
• @Bernard it's simple to type Å but it doesn't work if someone loads a package that breaks latex internals. Jun 17, 2016 at 11:40
• @Bernard but that is the point of this question, a case where \r has been redefined. Jun 17, 2016 at 12:40
• @egreg It is not silly redefinition. It is very natural to use short names as \r. A avarage user cannot expected that this control sequence is a part of LICR (LaTeX Internal Character Representation). Silly is LaTeX itself because it uses such "natural" control sequences in its internals. Jun 17, 2016 at 13:46
• Of course, all accent macros have simple names, but this is bad decision from today point of view. Nobody writes \r u nor \r{u} nor \accent23u today. We write only ů. And today users can be surprised why such simple control sequences are reserved to such unusual things. Jun 17, 2016 at 14:01

whatever is defining \r is incorrect and breaking latex so you should report a bug even if you can not change it.

Use \let\temp\r before importing the bad definitions and put \let\r\temp after them to restore \r.

You could of course redefine \AA but \r is an encoding specific command so it is (re)defined if you switch encodings such as

\usepackage[T1]{fontenc}


it is used internally if you use Å directly using inputenc, so you would have to make multiple changes in many files to make latex not call \r anywhere.

• I hope that LaTeX3 is more flexible in this regard, and that no document command is “fixed”. Jun 17, 2016 at 8:07
• @Manuel The current approach has separate code and document levels, so we would expect something like \AA here to be implemented as a code-level command not in terms of another document-level one. (There are complex open questions about engine support and thus the nature of \AA specifically, but the general point stands.) Jun 17, 2016 at 8:09