*SOLVED*
Hello,
I changed the \chaptername command for getting "Capítulo" rather than "Chapter", but when I label a chapter (by \label{chap:1}, for example) and then reference it (by \autoref{chap:1}) I get a link which says "chapter 1" and not "Capítulo 1". Anybody knows how to fix that problem?
Thank you
General ⇒ \autoref and \chaptername
\autoref and \chaptername
Last edited by n070161 on Fri Sep 03, 2010 4:08 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

\autoref and \chaptername
Hi,
there's no need to redefine \chaptername; simply load babel with the spanish option:
there's no need to redefine \chaptername; simply load babel with the spanish option:
Code: Select all
\documentclass{book}
\usepackage[spanish]{babel}
\usepackage{hyperref}
\begin{document}
\chapter{Primer cap\'itulo}\label{cap:uno}
\autoref{cap:uno}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: \autoref and \chaptername
Thank you
Nevertheless, it's not the first time I'm having this problem, and not always trying to call them "Capítulo(s)" (sometimes "Tema(s)", for example), so I still would like to know how to do it
Nevertheless, it's not the first time I'm having this problem, and not always trying to call them "Capítulo(s)" (sometimes "Tema(s)", for example), so I still would like to know how to do it

\autoref and \chaptername
Without using babel you'll have to redefine the corresponding command and its "autoref" variant:n070161 wrote:...Nevertheless, it's not the first time I'm having this problem, and not always trying to call them "Capítulo(s)" (sometimes "Tema(s)", for example), so I still would like to know how to do it...
Code: Select all
\documentclass{book}
\usepackage{hyperref}
\renewcommand\chaptername{Tema}
\renewcommand\chapterautorefname{Tema}
\begin{document}
\chapter{Primer tema}\label{cap:uno}
\autoref{cap:uno}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: \autoref and \chaptername
Thank you!
that's just what I've been looking for.
that's just what I've been looking for.