[XeTeX] Problem with apacite and fontspec

Will Robertson wspr81 at gmail.com
Fri Oct 3 07:28:20 CEST 2008


On 03/10/2008, at 1:24 PM, Erik Meijer wrote:

> Thanks for pointing this out and solving it. The next release of
> apacite will include this improvement and a few other bug fixes.
> I hope I'll be able to upload it soon.

While I think of it, this might also be solved by an upcoming release  
of the calc package; Morten would know more. Here's what he wrote a  
few months ago about a similar problem:

> I am thinking that fontspec has nothing to do with this but rather the
> calc package as termcal uses \relax quite a bit to terminate numbers.
>
> And I also think that I fixed that infelicity in calc some time ago  
> - it
> just hasn't been released yet.
>
> Here are some excerpts from the new documentation:
>
> % When \TeX\ is scanning for a \<number> etc.\ it is
> % common to terminate the scanning with a space token or by inserting
> % \cs{relax}. As of version~4.3 \textsf{calc} allows \cs{relax} tokens
> % to appear in places where they would usually be used for terminating
> % \TeX's scanning. In short this is just before any of \texttt{+-*/)}
> % or at the end of the expression being evaluated.
>
> % \changes{v4.3}{2007/08/22}{Discard terminating \cs{relax} tokens and
> %   avoid extra error message from \cs{calc at next}}
>
>
> And the changed code is just this single macro:
>
> \def\@calc at post@scan#1{%
>   \ifx#1!\let\calc at next\endgroup \else
>     \ifx#1+\let\calc at next\calc at add \else
>       \ifx#1-\let\calc at next\calc at subtract \else
>         \ifx#1*\let\calc at next\calc at multiplyx \else
>           \ifx#1/\let\calc at next\calc at dividex \else
>             \ifx#1)\let\calc at next\calc at close \else
>               \ifx#1\relax\let\calc at next\calc at post@scan \else
>                 \def\calc at next{\calc at error#1}%
>               \fi
>             \fi
>           \fi
>         \fi
>       \fi
>     \fi
>   \fi
>   \calc at next}
>
>
> Try adding this to your preamble after loading fontspec (and  
> wrapping it
> in \makeatletter and \makeatother of course)

Hope this helps,
Will


More information about the XeTeX mailing list