# Contents page in two different languages

I'm currently writing a report where all of my titles are in French and hence my table of contents is also in French. I however need to also include a contents table in English and I was wondering if there was any way of adding in a section title in the other language to automatically produce an additional contents page?

For example is I wanted to use these two titles for one single section...

\section{Méthodes et matériaux}
\section{Methods and materials}

I know it might not be something that's often done but if anyone has any suggestions it would be fantastic. If you need me to provide any other information, please don't hesitate to ask.

• Do I understand this correctly in that the text "Methods and material" in this English ToC is only found in the ToC? There is no extra header with that text in the section itself or anywhere else? – pst Apr 11 '14 at 9:59
• In this case it is ONLY the French title that is in the report and therefore ToC at the moment. I would like to know if it is possible to add the English title within the document and hence make a second ToC in English as well as the French one. – user18056 Apr 11 '14 at 13:54

Replicate what \tableofcontents does. For defining the English titles you have to type them just below the French one, with the macro \addtoetoc

\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}

\makeatletter
\newcommand\englishtableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\begin{otherlanguage}{english}
\chapter*{%
\contentsname
\@mkboth{\MakeUppercase\contentsname}
{\MakeUppercase\contentsname}%
}%
\@starttoc{tec}%
\end{otherlanguage}
\if@restonecol\twocolumn\fi
}
}
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\englishtableofcontents

\mainmatter
\chapter{Introduction}

\section{Méthodes et matériaux}

\end{document}

Here is page i from the example:

and here is page iii:

Here's a complete version for the article class, where we can exploit the fact that the list commands are defined in a very similar way:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}

\usepackage{etoolbox,pdftexcmds}
\let\englishtableofcontents\tableofcontents
\patchcmd\englishtableofcontents{{toc}}{{tec}}{}{}
\preto\englishtableofcontents{\begin{otherlanguage}{english}}
\appto\englishtableofcontents{\end{otherlanguage}}
\let\englishlistoffigures\listoffigures
\patchcmd\englishlistoffigures{{lof}}{{lef}}{}{}
\preto\englishlistoffigures{\begin{otherlanguage}{english}}
\appto\englishlistoffigures{\end{otherlanguage}}
\let\englishlistoftables\listoftables
\patchcmd\englishlistoftables{{lot}}{{let}}{}{}
\preto\englishlistoftables{\begin{otherlanguage}{english}}
\appto\englishlistoftables{\end{otherlanguage}}

}
\makeatletter
\newcommand{\englishcaption}[1]{%
\ifnum\pdf@strcmp{\@captype}{figure}=\z@
\else
\fi
}
\makeatother

\begin{document}

\tableofcontents
\englishtableofcontents

\listoffigures
\englishlistoffigures

\listoftables
\englishlistoftables

\section{Méthodes et matériaux}

\subsection{Méthodes}

\begin{figure}[htp]
\centering{something}
\caption{En français}
\englishcaption{In English}
\end{figure}

\subsection{Matériaux}

\begin{table}[htp]
\centering{something}
\caption{En français}
\englishcaption{In English}
\end{table}

\end{document}

• This is the advantage of people who know TeX! +1 – Keks Dose Apr 11 '14 at 15:16
• @KeksDose I didn't need some hours just because I spent them on TeX during many years. ;-) – egreg Apr 11 '14 at 15:19
• Amazing, thank you! Would a similar layout be possible for a table of figures do you reckon? – user18056 Apr 12 '14 at 13:14
• @user18056 Yes; replicate the commands \listoffigures and \listoftables, say with extensions .lef and .let, defining \addelof and \addelot commands in the same vein. If you have problems, let me know. – egreg Apr 12 '14 at 13:16
• After finally getting round to it, I'm having problems setting even the ToC part up. Does this have to be done specifically for a book or can it be done for an article (my file)? – user18056 Apr 14 '14 at 7:07

Yes, this seems possible, and there even is a detailed Howto, if you are using a KOMA-script class for you document. Please have a look at the KOMA-script manual, section »Management of Tables and Lists of Contents Using tocbasic«, a way which is a bit easier is described in section 15.5: »Everything with One Command Only«, but you may read the example under 15.4 as well for starters...

I'm not sure it will work with a second TOC with more than two levels, but chapter and sections seem possible. At least in Table 15.1 M. Kohm describes that there may be two counters in such a new TOC.