# Redefine \subref after redefinition of \ref

I have redefined \ref like this:

\renewcommand{\ref}[1]{\autoref{#1}}


so that I get "Figure nn" automatically by default.

However, this makes \subref (from package subcaption) behave incorrectly.

How can \subref be redefined to get its correct behavior while keeping the redefined behavior of \ref?

-
Use \AtBeginDocument{\renewcommand{\ref}[1]{\autoref{#1}}} However I have the feeling that this redefinition isn't a good idea. – Marco Daniel Oct 16 '12 at 18:21
That is what I am doing and causes trouble when using \subref (these are not rendered correctly). Somewhat there is some interference doing that and later using \subref. – mljrg Oct 16 '12 at 18:23

I have resolved this issue by quitting on redefining the \ref. So I am now using \autoref directly and \subref is working properly.