2

I need to change the name of my tables of contents, and I cannot apply with this preface:

\documentclass[12pt,oneside,tikz,border=10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish,]{babel}
\usepackage{titlesec}
...

I'm using this commands:

\cleardoublepage
\addcontentsline{toc}{article}{Lista de figuras}
\listoffigures

\cleardoublepage
\addcontentsline{toc}{article}{Lista de tablas} 
\listoftables

Obviously, the command \addcontentsline{toc}{article}{Lista de tablas} cannot change any name like "Lista de figuras".

Also, I should like to add the last contents in the principal table of contents with the respective number.

3

See How to change the title of ToC?.

Using babel, it is good to use the \addto\captions<language> to replace the title of the TOC or the other lists. This maintains language compatibility. hyperref was added (with draft option, if you aren't using it already, to minimize the changes introduced) to give the \phantomsection command, which allows you to cite the other lists in your TOC.

\documentclass[12pt,oneside,tikz,border=10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{titlesec}
\usepackage[draft]{hyperref} % Used to allow \phantomsection

\addto\captionsspanish{% Replace "spanish" with the language you use
        \renewcommand{\contentsname}%
        {\'Indice Completa}%
}

\begin{document}

\tableofcontents
\phantomsection\addcontentsline{toc}{section}{\listfigurename}
\listoffigures
\phantomsection\addcontentsline{toc}{section}{\listtablename}
\listoftables

\section{Section One}
\begin{figure}\caption{A Figure}\label{one}\end{figure}
\begin{table}\caption{A Table}\label{two}\end{table}

\end{document}

Output:

Output of sample code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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