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

Ross Moore ross.moore at mq.edu.au
Wed Oct 31 00:28:41 CET 2012


Hi Michaël,

On 31/10/2012, at 1:39 AM, Michaël Cadilhac wrote:

>> Howdy,
>> 
>> \vec{v}_1 ?
> 
> Herb,
> 
> Thanks, but of course, I'd like to avoid going through hundreds of pages (ok,
> a script would be easy to write, but still...).  Also, I'd like to keep the
> semantics "\vec{T} is for a vector T", whether T=v or T=v_1.

It's a pity that you chose to write you manuscripts this way.
You can see how difficult it gets when you write a macro
that represents just an abstract concept, without detailed thought
for all the different ways it may be used.

What I do for this kind of thing is:

 \newcommand{\TT}{\boldsymbol{T}}  
 \newcommand{\vv}{\boldsymbol{v}}  

    % \boldsymbol gives a bold-italic, rather than bold-upright

then use it in the body material as:

  \TT  or  \TT_1  or  \vv^{(1)}_2  etc.

When reading your own source coding, you see `\TT' and
think `vector T' or just `T' --- which are what you would 
say out loud if you were writing on a black/white-board
while giving a lecture.

The other advantage of doing it this way is that you do not
need to change the body of your document when you choose, in
future, to use a different kind of processor, creating a view 
of your document for a different format: HTML, XML, tagged-PDF, 
ePub, MathML, etc.

You'll only need to adjust the macro definitions to add whatever
is necessary for the required kind of enrichment.


> 
> Thanks!
> 
> M.



Cheers

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross.moore at 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