How do I change the default autoref categories to use autoref with unsupported languages?

Viewed 4757

When using code snippet

\autoref{chapter:chapter1}
\autoref{table:table1}
\autoref{figure:figure1}

Minimum code

\documentclass[11pt]{article}
\usepackage{hyperref}
\begin{document}
\subsection{my section}
\label{chapter:mychapter}
\begin{figure}[!ht]
\centering

\caption{foo.}
\label{fig:myfigure}
\end{figure}
As seen in\autoref{fig:myfigure} in \autoref{chapter:mychapter}
\end{document}

The output in the text will be "section 1.1", "table 1.1" and "figure 1.1" but I whant it to say something else.

Ex:

"section 1.1" to "foo 1.1"

"table 1.1" to "bar 1.1"

"figure 1.1" to "foobar 1.1"

How do I change the default output?

1 Answers
\documentclass[11pt]{article}
\usepackage{hyperref}


\renewcommand{\figureautorefname}{foo}
\renewcommand{\tableautorefname}{bar}
\renewcommand{\sectionautorefname}{foobar}
\renewcommand{\subsectionautorefname}{foobarbaz}

\begin{document}
\subsection{my section}
\label{chapter:mychapter}
\begin{figure}[!ht]
\centering

\caption{foo.}
\label{fig:myfigure}
\end{figure}
As seen in\autoref{fig:myfigure} in \autoref{chapter:mychapter}
\end{document}
Related