Document ClassesChanging a Content Heading for its Spanish equivalent

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Vikthor
Posts: 7
Joined: Tue Sep 30, 2008 5:14 pm

Changing a Content Heading for its Spanish equivalent

Post by Vikthor »

Sorry I am new in the forum. I am working on a book in Spanish and I need to change the title of the content table from "Content" to "Indice." How do I do that?

Here is what I have:

\documentclass[12pt]{report}

\usepackage{amstext,amsthm,amsmath,amssymb,amscd,amsfonts,graphicx,latexsym,astron,setspace}



\textwidth 4in
\topmargin -0.5in
\textheight 9in
\parindent 0em
\oddsidemargin 1.5in
\evensidemargin 1.5in
\parskip 2ex



\hyphenation{article}

%\includeonly{chap4}

\begin{document}
%define the title

\title{\bf REFUGIADO DEL OLVIDO\\
VERSOS DESTERRADOS}

\author{\\
\\
V\'ictor M. Torres-V\'elez}
\\

%\copyright V\'ictor M. Torres-V\'elez , 2008}
%generates the title
\maketitle

%\include{abstract}
\pagenumbering{roman}
\setcounter{page}{3}


%\include{acknowledgments}

\newpage


\begin{spacing}{0}
\tableofcontents
\end{spacing}


%\listoftables
%\addcontentsline{toc}{chapter}{\dotfill}


%\listoffigures
%\addcontentsline{toc}{chapter}{\dotfill}


\newpage

{\baselineskip 21pt
\pagenumbering{arabic}
\include{siempre}
\include{jamas}
\include{arena}
\include{minotauro}
\include{calles}
\include{petalos_1}
\include{petalosdos}
\include{olvido}
\include{cataclismo}
\include{puerto}
\include{vertigo}
\include{andrea}
\include{sombras}
\include{pendenciero}

}
%\include{referen}
%\include{apend}


\bibliographystyle{humannat}
\bibliography{vicbib3.bib}

%\nocite{*}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing a Content Heading for its Spanish equivalent

Post by localghost »

That's a job for babel.

Code: Select all

\usepackage[spanish]{babel}
Refer to the documentation for further details.

You should not load the packages with one command, but separately because they may have different options. Page dimensions and layout are better set with geometry. Packages and their documentations can be found on CTAN.


Best regards and welcome to the board
Thorsten¹
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Changing a Content Heading for its Spanish equivalent

Post by gmedina »

Hi,

as localghost suggested, use the babel package with the spanish option. This will produce "Índice" (for the article class) and "Índice general" (for the report and book classes); if you still want to make some changes to this predefined name, then use \addto\captionsspanish, as illustrated below:

Code: Select all

\documentclass{article}
\usepackage[spanish]{babel}

\addto\captionsspanish{%
  \renewcommand\contentsname{Lo deseado}}

\begin{document}

\tableofcontents
 
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Vikthor
Posts: 7
Joined: Tue Sep 30, 2008 5:14 pm

Re: Changing a Content Heading for its Spanish equivalent

Post by Vikthor »

Wow!!! Thanks a lot. I will look into all your suggestions. Somehow I managed to do a dissertation in Latext but it was in English. Again, thanks you for your promptly response, it is good to know that you can get help. Hasta la victoria siempre.
Post Reply