## LaTeX forum ⇒ XeTeX ⇒ Polyglossia and toc

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
vangelis
Posts: 3
Joined: Mon Nov 11, 2013 2:36 pm

### Polyglossia and toc

Hello,

I've got a problem with the formatting of the table of contents, using xetex and the package polyglossia (language : french). I don' manage to get the number of parts before the title ...

Here is an ECM to understand this :
\documentclass[a4paper,12pt]{book} \XeTeXinputencoding iso-8859-1\usepackage{polyglossia}\setmainlanguage{french}\setotherlanguage{latin}\setotherlanguage[variant=ancient]{greek} \begin{document}\tableofcontents\part{Part title}\chapter{Chapter title}\section{section title}\part{another part}\end{document}

With this code here is the appearance of the toc :
Part title (without number ...)
1 chapter title
1.1. Section

...

And I would like this formatting :
I. Title
1 Chapter title
1.1 Section title ...

What should I do to have the "I" enabled in the toc ? Can somebody help me ?
Thanks.

vangelis
Posts: 3
Joined: Mon Nov 11, 2013 2:36 pm
The problem is solved with the following code in the preamble :

\makeatletter% avoid the redefinition of \thepart\patchcmd{\captionsfrench}{\def\thepart{}}{}{}{}% patch \@part not to print the part number\patchcmd{\@part}{\nobreakspace\thepart}{}{}{}\makeatother

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX. Please read what our administrator thinks about that.

Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.

Such kind of x-posting without notification represents a direct violation of our rules and has to be prevented absolutely in future questions.

It is suggestive to contact the package maintainer because with babel this behaviour does not occur.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1