# Redefining a babel macro in memoir?

According to the babel.pdf (dated 2005) , macro `\Aref` is used to

"write the correct definite article for the argument",

i.e. expanded to either 'A' or 'Az'. Since I upgraded to 2014 TeX, it expands to 'Appendix'. As I noticed, `memman.pdf` (dated 2015) redefines it as

"`\Aref` for Appendix".

I attempted to use `\Azr` instead, with the same result.

How can I fix this? (memman obviously broke compatibility)

Is there any tool that helps avoiding such clatches?

I think it's a bad error of `memoir` to define `\Aref` that is not really meaningful for appendices; it's also wrong in defining `\Cref` for chapters, because this conflicts with `cleveref`.

However, in the case of `\Cref`, the `cleveref` package will happily do the redefinition, while in case of `\usepackage[hungarian]{babel}`, `\Aref` is not redefined because the code is

``````\ifnum\magyar@opt@@az \expandafter\ifx\csname Aref\endcsname\relax1\fi>1 % 21, 2, 11, 1
\DeclareRobustCommand\Aref{A\@ifstar{\@@magyar@az@ref\@firstoftwo}{\@@magyar@az@lowa}}\fi
``````

Since `\Aref` is defined at the moment the code is seen, the test returns false; since `\magyar@opt@@az` is 1, the definition is not performed.

Workaround:

``````\documentclass{memoir}
\let\Aref\relax
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[hungarian]{babel}
``````