Stephen Harris wrote:

> 
> ----- Original Message -----
> From: "Karsten Heymann"
> <[EMAIL PROTECTED]> To:
> <[email protected]> Sent: Wednesday,
> February 22, 2006 1:06 AM Subject: Re: Automatic formatting of a
> particular word?
> 
> 
> Hi Stephen,
> 
>> and put it in macros.tex and load it with \input macros and
>> use it in LyX with automatic expansion, even if it weren't hardwired
>> like Uwe's example?
> 
> Better do it the LateX way: write a simple sty nyxlogo.sty and put that
> \providecommand*{\NyX}{...} in there (look at clsguide.dvi/pdf on how to
> do that).
> 
> Yours,
> Karsten
> 
> That does seem simpler. Thanks for the explanation, it led me to
> discover texlogos.sty which contains the Metapost and Metafont
> logos as well as BibTex so it serves as a model.
> 
> %% Displays the BibTeX logo.
> %%
> \DeclareRobustCommand{\bibtexlogo}{%
>      \protect\scalebox{0.75}[1]{B}%
>      \protect\scalebox{0.5625}[0.75]{IB}\TeX}
> 
> Though the syntax of \DeclareRobustCommand is probably older
> than \providecommand?

no, it is quite different.
\section{\bibtexlogo} is possible, because it is a robust macro
and _not_ expanded, when it is going also into the table of contents.

Otherwise it won't work, it moves not as a macro into the *.toc
file, but fully expanded, which often causes errors.

Herbert

Reply via email to