[XeTeX] Change fonts for different environment/commands
Marcin Grotomirski
grotos at gmail.com
Wed Sep 1 21:00:46 CEST 2010
2010/9/1 Arthur Reutenauer <arthur.reutenauer at normalesup.org>:
>> In a fact I'm looking for such solution that is compatible with my
>> existing projects - I don't want to create new commands and
>> environments. Is it possible?
>
> Yes. The general solution for this kind of problem is to save the
> original meaning of the macro using \let, and to reuse it later, such
> as in:
>
> \let\originalfootnote\footnote
> \renewcommand\footnote[1]{\originalfootnote{%
> \addfontfeature{Color=666666}%
> #1}}
>
> I didn't test this definition, but it gives you the gist: \let
> declares that the macro \originalfootnote has the meaning of \footnote
> at that precise moment (and won't change if \footnote changes), then
> \renewcommand redefines \footnote using its original meaning.
>
> Arthur
This solution works pretty well (except for the number in footnote -
it stays black). Now I think I will be able to create similar
definitions for the rest of environments.
Marcin
More information about the XeTeX
mailing list