[XeTeX] On an ugly hack to mathbf only in the local style.

Michaël Cadilhac michael at cadilhac.name
Tue Oct 30 16:51:44 CET 2012

On Tue, Oct 30, 2012 at 10:53 AM, Zdenek Wagner <zdenek.wagner at gmail.com> wrote:
> 2012/10/30 Michaël Cadilhac <michael at cadilhac.name>:
>> Hi there folks,

> How about the following solution? I am writing it directly to the mail
> without testing, I hope I won't make any error.
> \def\vec#1{\do at vec#1_\do at vec}
> \def\do at vec#1_#2\do at vec{\ifcat$#2$\mathbf{#1}\else\vec at subscript#1_#2\vec at subscript\fi}
> \def\vec at subscript#1_#2_\vec at subscript{\mathbf{#1}_{#2}}


Thanks for your input!  However, I also have vectors such as \vec{x^i_j} (or
\vec{x_j^i}), and your solution does not seem to have a simple extension to
those cases.  The original hack I had had the advantage that no syntactic
manipulation had to be made on the argument, avoiding for sure those
problems.  If we have to do this syntactically, I'll think about it some

Thanks again!


More information about the XeTeX mailing list