I encounter a problem of which I speculate it might be a clash or bug in polyglossia. In the MWE when \usepackage{polyglossia} is commented out, running pdflatex or xelatex yields the same .ent (endnote)file. (PNTest.ent-pdflatex, PNTest.ent-xelatex1)

When running xelatex with \usepackage{polyglossia} in force a different .ent file is generated (PNTest.ent-xelatex2), which leads to error messages when this file is processed.

The code in the MWE is part of a larger package, but it boils down to this with respect to the error I encounter.

Could some kind guru shed some light in the darkness?


File PNTest.tex



\renewcommand{\textinnotes}[1]{%      % remove [ ] in the marking text
 #1\quad%                             % and use an own format
\renewcommand{\notenumintext}[1]{}%   skip the notemark in the text
\renewcommand*{\pagenotesubhead}[2]{}%get rid of subhead in notelist

  \newcommand{\Dyn@Explanation}{for explanation}
  \newcommand{\Dyn@NoteText}{see \Dyn@NoteName~\thepagenote\ on \Dyn@PageName}

% DynNote*{item}[expl]{description}
%        #1 #2    #3       #4
% 1) Typesets \footnote{expl}. If no <expl> is given, get it from the
%    default by calling \Dyn@Explanation.
% 2) Typesets a page- chap- or endnote with item\\description.
% Starred version
% 3) Adds (item,expl) to the wordlist with bold pageno. Note that it is
%    impossible to give a 'language' here. If no association exists, then
%    the association is made now.
%\typeout{DEBUG: \#1= #1,\#2= #2, \#3= #3, \#4= #4}
  \IfBooleanTF#1{% Star
     {\AddToList{#2}[\csname dynnotes@#2\endcsname|textbf]}%
  }{}% [No]Star
%\typeout{DEBUG: pagenote 1}
  \pagenote[% Layout setup at customizing package pagenote
    \\%       insert a newline
%\typeout{DEBUG: pagenote 2}
\footnote{#3, \Dyn@NoteText~\pageref{en:\Dyn@Notes@Cnt:\thepagenote}}%
%\par DEBUG: note:\Dyn@Notes@Cnt:\theendnote, en:\Dyn@Notes@Cnt:\theendnote
\xspace}% DynNote



Testin pagenotes
The .ent file is different when run pdflatex or xelatex



File PNTest.ent-pdflatex / PNTest.ent-xelatex1

\noteentry{1}{\needspace {3\baselineskip }\hspace  *{-1em}\textbf  {\small \sffamily  Annotation\nobreakspace  {}1}\\ \textbf  {\footnotesize \sffamily  DynExample1}}{\\\label {en:0:1}\sffamily  DynText1}{1}

File PNTest.ent-xelatex2

\noteentry{1}{\needspace {3\baselineskip }\hspace  *{-1em}\textbf  {\small \sffamily  \def rm{sf}Annotation\nobreakspace {}1}\\ \textbf  {\footnotesize \sffamily  \def rm{sf}DynExample1}}{\\\label {en:0:1}\sffamily  \def rm{sf}DynText1}{1}

It looks like a bug in polyglossia It makes \sffamily fragile.

It works if you change your test file to look like:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.