Hi Stephen,

Stephen Harris schrieb:
> I have a question about this. My knowledge is theoretical rather than
>  practical and draws upon Knuth's discussion of macros/definitions in
> "The TeXbook" concerning the TeX logo plus chapter twenty, Knuth:

The TeXbook is great if you want to learn to program TeX. If you want to
use LaTeX you should not use it as primary source of information.

> SH: Does this work with LyX? Suppose I wanted a better way of 
> expressing, linux and unix, than *nix. So I invented the word "NyX" 
> to substitute for *nix. And suppose this was a document which 
> discussed LyX and I wanted to typeset the "y" in NyX like LyX and use
> it maybe 15 times so that it was worthwhile to create it.

You're mixing up two things. One is that it is possible to define LaTeX
commands for special "Logo Words", like \LaTeX, \TeX, \BibteX and so on.
This could be done with a command like

> [EMAIL PROTECTED]

(don't use the \setbox / \tenrm stuff, that's plain TeX and doesn't mix
well with LaTeX font selection).

The other is that LyX replaces some hardcoded strings like LaTeX, TeX,
LyX with those logo commands (\TeX, \LaTeX, \LyX, it even replaces
occurences of TeX inside words like »myWayTooCoolTeX«!). ATM and AFAIK
there is no user interface for that, so you have to either patch you LyX
version to recognize NyX as well or (better!) use ERT:\NyX{}. (Or you
make the "N" active and try to detect occurences of NyX on TeX
processing level. (not really ;-))).

> So could I create a definition for NyX \NyX\ (or any word for that
> matter) 

Yes, definitely

> 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

Reply via email to