On 10 December 2010 12:37, <lyx-users-h...@lists.lyx.org> wrote:

> >
> > The reason for this is that XeTeX now uses polyglossia, which does not
> > know these \addto commands (which are from babel). Are these templates
> > shipped with LyX? If so, we need to embrace these calls in
> >
> > \...@ifpackageloaded{babel}{%
> > ...
> > }{}
>
> This problem should be fixed in the next release. The trick is to embrace
> these calls in
>
> \AtBeginDocument{%
> ...
> }
>
> so that they are executed after polyglossia (and babel).
>
> Jürgen
>

The template files do actually have this embrace, but it doesn't prevent the
parsing error. Or do you mean the next release will do something else that
will fix the problem? Thanks Jürgen.

For completeness, this is the preamble, taken directly from the chapter
template:


 % increase link area for cross-references and autoname them

*\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}*

*\newlength{\abc}*

*\settowidth{\abc}{\space}*

*\addto\extrasenglish{*

* \renewcommand{\equationautorefname}{\hspace{-\abc}}*

* \renewcommand{\sectionautorefname}{sec.\negthinspace}*

* \renewcommand{\subsectionautorefname}{sec.\negthinspace}*

* \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}*

* \renewcommand{\figureautorefname}{Fig.\negthinspace}*

* \renewcommand{\tableautorefname}{Tab.\negthinspace}*

*}*

% in case somebody want to have the label "Gleichung"

%\renewcommand{\eqref}[1]{Gleichung~(\negthinspace\autoref{#1})}

% put the link to figure floats to the beginning

% of the figure and not to its end

\usepackage[figure]{hypcap}

% the pages of the TOC is numbered roman

% and a pdf-bookmark for the TOC is added

\let\myTOC\tableofcontents

\renewcommand\tableofcontents{%

\frontmatter

\pdfbookmark[1]{\contentsname}{}

\myTOC

\mainmatter }

% make caption labels bold

\setkomafont{captionlabel}{\bfseries}

\setcapindent{1em}

% enable calculations

\usepackage{calc}

% fancy page header/footer settings

\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}

\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

% increase the bottom float placement fraction

\renewcommand{\bottomfraction}{0.5}

% avoid that floats are placed above its sections

\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}

Reply via email to