[XeTeX] Problem with apacite and fontspec

Ross Moore ross at ics.mq.edu.au
Fri Oct 3 09:03:31 CEST 2008


Hi Will,

On 03/10/2008, at 3:28 PM, Will Robertson wrote:

> 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:

No; it is a different problem altogether...

>> And the changed code is just this single macro:
>>
>> \def\@calc at post@scan#1{%

  ... I've tried with this change, but it isn't the cause
of the problem. The coding should never get as far
as calling any of these  \@calc at ....  internals.

It is failing while  natbib  is parsing the info it needs
in deciding what kind of citation it is going to display.
The lack of robustness of an  APAcite  macro causes
premature expansions, ultimately leading to the crash.

Indeed, it encounters all sorts of assignments while
simply expanding macros for pattern-matching.
So something has to go wrong eventually, and its
\@calc at post@scan  that first throws up an error message.


>>   \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,

Nice thought, that maybe fixing one error might also
prevent others --- just not this time.

> Will


Cheers,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the XeTeX mailing list