# [XeTeX] breqn + fontspec

Nicolas Vaughan nivaca at gmail.com
Fri Jun 26 05:42:41 CEST 2009

Hi Arno,
When I have symbol clashes, I use a tip suggested by Scott Pakin in his
Comprehensive LaTeX Symbol List.
Here is the relevant code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% There are a number of symbols (e.g., \Square) that are defined by      %
% multiple packages.  In order to typeset all the variants in this       %
% document, we have to give glyph a unique name.  To do that, we define  %
% \savesymbol{XXX}, which renames a symbol from \XXX to \origXXX, and    %
% \restoresymbols{yyy}{XXX}, which renames \origXXX back to \XXX and     %
% defines a new command, \yyyXXX, which corresponds to the most recently %
% loaded version of \XXX.                                                %
%                                                                        %

% Save a symbol that we know is going to get redefined.
\def\savesymbol#1{%
\expandafter\let\expandafter\origsym\expandafter=\csname#1\endcsname
\expandafter\let\csname orig#1\endcsname=\origsym
\expandafter\let\csname#1\endcsname=\relax
}

% Restore a previously saved symbol, and rename the current one.
\def\restoresymbol#1#2{%
\expandafter\let\expandafter\newsym\expandafter=\csname#2\endcsname
\expandafter\global\expandafter\let\csname#1#2\endcsname=\newsym
\expandafter\let\expandafter\origsym\expandafter=\csname orig#2\endcsname
\expandafter\global\expandafter\let\csname#2\endcsname=\origsym
}

Tell me if this helps. I haven't test it yet.
Best wishes,
Nicolas

On Thu, Jun 25, 2009 at 5:26 PM, Arno Trautmann <Arno.Trautmann at gmx.de>wrote:

> Hi Nicolas!
>
> Nicolas Vaughan wrote:
> > That's because breqn calls flexisym, which in turn defines some symbols
> that
> > fontspec also defines.
>
> Yes, so far I understood and tried to hack it a bit. Before trying a
> neat solution, I tried something like
>
> \let\Gamma\undefined
>
> but that did not work. Can you explain, why? Still TeX complained that
> theese commands were already \defd.
>
> > This incompatibilty with "font" packages is explained
> > in the breqn manual. There it says that if you're using cm fonts,
> mathpazo
> > (Palatino) or mathptmx (Times), there's a escape route withing flexisym
> to
> > avoid clashes. And it adds:
>
> Ok, I didn’t read carefully …
>
> > If you find that
> >> a particular math font package doesn't work then please see
> implementation
> >> in
> >> flexisym.dtx for how to create a support file --- it is easier than one
> >> might think. Contributions welcome.
>
> Thank you very much for the explanation!
>
> > So you may fiddle a little with flexisym, as the manual suggests, or else
> > use other methods of breaking equations. How about manually? That's how I
> > do. ;>
>
> Well, that didn’t look too good … so I wanted to give breqn a try.
>
> > However, If you create a .sym file to patch flexisym (as flexisym.dtx
> > describes), please do share your solution.
>
> Allright, I’ll try that and post a result.
>
> cheers
> Arno
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20090625/4158624d/attachment-0001.html>


More information about the XeTeX mailing list