Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use polyglossia to set my default language with \setdefaultlanguage to German. This works for the captions of tables, figures etc. I want to reference to these figures with the \autoref command of the hyperref package. But hyperref ignores the default language setting. But the reference name stays English (Table), although the caption title is showed German (Tabelle).

A minimal XeLaTeX example:

\documentclass{article}
\usepackage{xltxtra}
\usepackage{polyglossia}
\usepackage{hyperref}                                                                          
\setdefaultlanguage{german}
\begin{document}
\begin{table}
        \centering
        \caption{Testtabelle}
        \begin{tabular}{lr}
                bla     & blub \\
                blabla  & blubblub \\
        \end{tabular}
        \label{test}
\end{table}
Die Tabelle \autoref{test}.
\end{document}

I use a workaround \renewcommand{\tableautorefname}{Tabelle} to rename the reference. But of course, this is only a workaround and no real solution.

Has anybody any idea solving this issue?

share|improve this question

1 Answer 1

A workaround is to pass the language as package option to hyperref:

\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{german}
\usepackage[german]{hyperref}
\begin{document}
\begin{table}
        \centering
        \caption{Testtabelle}
        \begin{tabular}{lr}
                bla     & blub \\
                blabla  & blubblub \\
        \end{tabular}
        \label{test}
\end{table}
Die Tabelle \autoref{test}.
\end{document}
share|improve this answer
    
Yes, this works, too. –  kay102 Jun 21 '11 at 14:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.