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
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex