[XeTeX] Table of contents
José Carlos Santos
jcsantos at fc.up.pt
Fri Apr 30 12:44:58 CEST 2010
On 30-04-2010 11:25, Vladimir Lomov wrote:
>>>> But I think it is a flaw.
>
>>> Which proof do you have?
>
>> Are you requesting a proof of an opinion? That's rather strange, but
>> I will do my best.
>
>> Please consider again this file:
>
>> \documentclass[10pt,a4paper]{book}
>> \usepackage[frenchb]{babel}
>> \usepackage{fontspec}
>> \usepackage{xunicode}
>> \usepackage{xltxtra}
>> \begin{document}
>> \frontmatter
>> \tableofcontents
>> \XeTeXinputencoding "cp1252"
>> \XeTeXdefaultencoding "cp1252"
>> \mainmatter\setcounter{secnumdepth}{2}
>> \chapter{Général de Gaulle}
>> Il était français.
>> \end{document}
>
>> When the \tableofcontents command is found, the line
>
>> \XeTeXinputencoding "cp1252"
>
>> was not read yet. Therefore, it seems to me (since XeTeX is
>> unicode-based) that the file .toc is in unicode and therefore that
>> XeLaTeX should have no problem with it.
>
> Reconsider your thoughts from beginning but take into account that in
> first run there is no TOC file.
Indeed. And therefore in the first run the table of contents is empty.
And...?
My guess is that what happens is the a consequence of the presence of
the line
\XeTeXdefaultencoding "cp1252"
is that the .toc file doesn't get written in unicode. Am I right?
Best regards,
Jose Carlos Santos
More information about the XeTeX
mailing list