----- Original Message ----- From: "Jean-Marc Lasgouttes" <[EMAIL PROTECTED]>
To: "Joerg Hau" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Tuesday, February 21, 2006 2:14 AM
Subject: Re: Automatic formatting of a particular word?


"Joerg" == Joerg Hau <[EMAIL PROTECTED]> writes:

Joerg> Hi again, Yet another question ...

Joerg> I am currently writing a manual for some software, and I would
Joerg> like the name of the software to appear automagically in a
Joerg> particular typesetting, i.e. without the need for special
Joerg> markup in the text of the document (not unlike the proper names
Joerg> of "LyX" and "LaTeX" in the documentation ... you get the
Joerg> idea).

This is unfortunately not possible now. It is hardcoded in the source.

JMarc


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:

"TEX users generally build up their own personal library of macros for
things that they want to do in different documents. For example, it is
common to have a file called macros.tex that contains definitions of your
favorite special control sequences, perhaps together with commands that
load your favorite special fonts, etc. If you begin a document with the
command
\input macros
then TEX will read all those definitions, saving you all the trouble of
retyping them."

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.

\setbox0=\hbox{N\kern-.1667em\lower.5ex\hbox{Y}\kern-.125em X}

\hbox(6.83331+2.15277)x18.6108
.\tenrm N
.\kern -1.66702
.\hbox(6.83331+0.0)x6.80557, shifted 2.15277
..\tenrm Y
.\kern -1.25
.\tenrm X

So could I create a definition for NyX \NyX\ (or any word for that matter)
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?

[EMAIL PROTECTED]

Knuth: "Of course, TEX's memory is limited, and it takes time to read a file, so you shouldn't put thousands of definitions into macros.tex. A large collection of macro definitions (e.g., the set of definitions in Appendix B) is called a format
(e.g., "plain TEX format"); TEX has a special way to input a format at high
speed, assuming that the format doesn't change very often"

I realize my question is not so easy as requested/desired by the OP.
Your reply to Christian Ridderstrom was quite funny!

Regards,
Stephen




Reply via email to