[XeTeX] fancyhdr and gb4e clash

Jonathan Kew jonathan at jfkew.plus.com
Sun Jan 25 19:36:33 CET 2009


On 25 Jan 2009, at 18:12, Sven Siegmund wrote:

> Hello,
>
> I use XeTeX 3.1415926-2.2-0.999.2 (MiKTeX 2.7) on Win XP SP2 and I
> have tried to spice up the layout of a document with the fancyhdr
> package. Unfortunately I get a strange error the exact cause of which
> is obscure to me.
>
> Having reduced my document to the minimal example I have this:
>
> \documentclass[a4paper,12pt,twoside]{article}
>
> \usepackage{xltxtra} % loads also xunicode, fontspec, graphicx
> \usepackage{gb4e} % for linguistic glosses
> \usepackage{fancyhdr} % better style
> \pagestyle{fancy}
>
> \begin{document}
> something
> \end{document}
>
> I get this error when compiling:
> ...
> (C:\MiKTeX\tex\latex\gb4e\gb4e.sty (C:\MiKTeX\tex\latex\gb4e 
> \cgloss4e.sty))
> (C:\MiKTeX\tex\latex\fancyhdr\fancyhdr.sty) (clash.aux)
> ! Argument of ^ has an extra }.
> <inserted text>
>                \par
> l.15 \end{document}
>
> ?
>
> However, the minimal example compiles well if I don't load the gb4e
> package. The problem is, I must load it. I have to use it for
> linguistic glosses. Is there a solution?

gb4e.sty makes ^ into an active character; this interferes with its  
use in fancyhdr.sty (to represent control characters using the ^^  
notation).

(BTW, this isn't a xetex issue. Remove xltxtra and try the same test  
with (pdf)latex: same problem.)

Workaround: load gb4e.sty last.

JK



More information about the XeTeX mailing list