On Thu, 25 Nov 1999, Joshua N Pritikin wrote:
> Lyx looks promising but I want do some stuff that isn't on the menus.
> For example, I'd like to create a command like this (simplified):
>
> \newcommand{\techword}[1]{\emph{#1}}
Kayvan has already commented on this bit. It's the next part I find
interesting.
> However, lyx just doesn't get it:
>
> LyX: Unknown token `\techword{Highlighted}'. Inserting as text. [around line 72 of
>file ~/.fun/en.lyx]
>
> And it turns my use of the command into gook:
>
> \backslash techword{Highlighted}
>
> How useful. :-P
You editted the .lyx file in xemacs didn't you?
That's about the only way that a \textword is going to appear in the .lyx.
The gook it gets turned into is there for a very good reason. LyX files
are _not_ LaTeX format or even remotely LaTeX compatible. They are
converted to LaTeX by LyX when you export or try to print etc. They are
not for general editting unless you play by the rules: only commands
known to LyX appear with a backslash in front of them all others must be
written as "gook" with \backslash.
> So what's the advantage over xemacs?
You don't have to write gook. You don't have to write formatting commands
unless you want to exploit latex features or packages not natively
supported in LyX. You don't have to know LaTeX. You don't have to hand
over 10MB of memory to xemacs when LyX can do the job with less than 3MB.
Try exporting the UserGuide as LaTeX and then load it into xemacs and
compare the speed and ease of use.
See James Sleemans excellent answer for more reasons.
LyX has xemacs key bindings for the majority of xemacs features although
you'll have to add a line to your ~/.lyx/lyxrc:
\bind_file xemacs
> Maybe I can use lyx to prototype latex to cut & paste into my emacs
> buffer? It doesn't make sense.
It sure doesn't. Why double handle things? It seems to me you are still
stuck on the idea of editting the raw LaTeX when LyX lets you type your
text and then set a given paragraph/s to a particular style using simple
key bindings -- LyX's xemacs key bindings include a few bindings from the
latex support package from x/emacs.
> Why did you folks go to all the trouble of creating a beautiful
> graphical editor? Please tell me I'm missing something.
You *are* missing something. There is a better way and it's LyX. Take
the graphical tour on the web site or go through the tutorial again and
you'll hopefully come to understand the difference of philosophy. LyX
hides the LaTeX commands needed to set a particular environment but
replaces that with a WYSIAWYG display although the power of LaTeX is
still at your fingertips in the ERT (Evil Red Text) or red typewriter
font as you described it.
Allan. (ARRae)