LyX@wisdom FAQ
Written by
Eran
Tromer, last update 2004-02-16.
Thanks go to Shai Mor, Yuval
Emek and, of course, the LyX developers team.
LyX is a GUI document processor
which is closely related to LaTeX, both in semantics and
implementation.
It provides an attractive alternative to writing scientific documents
directly in LaTeX, by providing an editable graphical rendering of the
document and a graphical user interface for accessing various options
and features. LyX can exports standard LaTeX files and uses LaTeX for
producing its final output.
This document addresses some frequently asked questions about LyX,
and particularly its use at the Faculty of Mathematics and
Computer Science at the
Weizmann Institute of Science.
1. Will this really save me from having to learn LaTeX?
No.
Eventually you'll know LaTeX, because the following situations will
arise. First, you'll sometimes want to use LaTeX features
(customizations and additional packages) which are not yet offered by
LyX in a nice GUI way. Second, you'll sometimes need to write documents
in cooperation with people who don't use LyX. In this light, you may
wish to learn LaTeX now and forget about LyX (some good LaTeX editors
are WinEdt, kile and good old emacs).
None the less, LyX is an excellent tool for getting starting with
LaTeX, because you can use the GUI to achieve common tasks and then
look
at the exported LaTeX code to learn how to do it in raw LaTeX.
Moreover, even experienced LaTeX users may find that using LyX is
more efficient, due to the graphical display and manipulation tools
(especially where mathematical formulas are concerned), and the
knowledge of LaTeX makes LyX even more powerful.
Note that in regard to using LaTeX features not supported
by LyX, the situation is not quite drastic as it sounds, since LyX
allows incorporation of arbitrary LaTeX code (menu option
Insert | TeX). This code
is copied verbatim when the .lyx file is converted to .tex
(see below about the conversion process).
2. How do I run LyX on the faculty computers?
Compile your own LyX in your Unix account on one of the new Linux
hosts (eshkol, math01-lx
to math10-lx, etc.):
- Downloading the
sourcecode from here,
- Extracting the compile the sourcecode using "./configure
--prefix=$HOME/local --with-frontend=qt; make; make install"
- Run it using "~/local/bin/lyx".
-->
Download a Windows version of LyX (also from here) and somehow install and
use it. You'll need MiKTeX and an
X server
installed on your PC, but you probably already have both.
3. How do I learn how to use it?
The Help menu inside the application contains extensive documentation.
The tutorial is highly recommended.
4. I get an error about the DISPLAY variable.
Use telnet instead of use rlogin.
rlogin fails to transfer the DISPLAY environment variable
which tells applications what is the current X server.
5. I wrote a test document but I can't view it and I can't export
it to LaTeX.
There is an error in the user login scripts for faculty accounts opened
prior to 2001-12-05.
To fix this, edit your ~/.cshrc file and replace the line
setenv TEXINPUTS .:$HOME/macros:/Tex/Macros
with the line
setenv TEXINPUTS .:$HOME/macros:/Tex/Macros:
(i.e., add a colon at the end). Alternatively, just 'unset TEXINPUTS
'.
Afterwards telnet to verdi and invoke /usr/share/lyx/configure
6. Mathematical symbols don't show up properly.
LyX tries displays all mathematical symbols graphically, if it finds
the appropriate font. If you're using Hummingbird Exceed then the
default fonts don't include some symbol (e.g., \circ). You can solve this by
running a font server and pointing Exceed to that server. If you need
that, ask me how to do it.
But if your X server (i.e., the physical computer you're typing on) is
a PC running Hummingbird Exceed on Windows NT, then many basic symbols
will be invisible
(e.g., the sigma-like \sum
symbol). There is a bug in Exceed. Upgrade to Windows 2000 or Windows
XP. Technically: in all fonts, characters in column 192 and up are not
rendered. I've contacted Hummingbird customer support about this (on
2001-12-06) and am awaiting their response.
7. LyX uses Alt
for many keyboard shortcuts, but Exceed only lets me use the right Alt key. How can I use
both?
This is configurable in the Hummingbird Exceed XConfig utility,
accessible via the Start menu.
I highly recommend the use of keyboard shortcuts whenever possible.
Note that when you use the Math Panel to insert a
mathematical symbol, its keyboard shortcut shows in the buttom of the
screen. More on this in the question about creating math equations,
below.
8. What precisely is the relation between LyX and
LaTeX/DVI/PostScript?
Here's the file conversion pipeline:
- file.lyx is LyX's own format -- this is the only file
you edit directly.
- file.tex is in the standard LaTeX format. It's created
by LyX from file.lyx.
- file.dvi is in the semi-graphical DVI format which you
can view using xdvi. It's created from file.tex by "latex
file.tex".
- file.ps is PostScript file created from file.dvi
by "dvips file.ps -o".
This pipeline is unidirectional (actually it's possible to convert
simple LaTeX documents to the LyX format using reLyX, but
this
often fails). LyX can directly export or view (where relevant) any
file in this pipeline. In particular:
- Alt-F E L writes
the LaTeX file to disk.
- Alt-F E T writes
the PostScript file to disk.
- Ctrl-D creates
and views the DVI file
- Shift-Ctrl-D (or
Alt-V U D)
refreshes the
DVI file after you've used
Ctrl-D. xdvi will reread it when you give it focus.
- Ctrl-T creates
and views the PostScript file.
9. How do I create math equations?
The full details are in the documentation, but here are the important
bits. Math stuff is entered in a dedicated mode called "Mathed" (math
editor). You enter Mathed using Ctrl-M . Once in Mathed,
here are some common actions:
- Pressing Space
exits the current scope (subscript, root, or even the whole equation).
You'll need to pay attention to which scope you're in -- this can be
confusing at first, since the visual inducation is sometimes subtle.
- The menu option Edit
| Math | Math Panel
(accassible via Alt-I H L)
opens the Math Panel dialog, where you can choose many symbols and
components of equations.
- The majority of buttons in Math Panel have keyboard shortcuts. To
discover them easily, choose an option in the Math Panel -- the
shortcut
(if any) appears at the bottom line of the screen. Using keyboard
shortcuts is much faster than using Math Panel.
- You can also type many common LaTeX commands, such as: \sum
\sqrt \cdot \beta \rightarrow \underbrace \oplus. As soon as you
press Space to
indicate the command is done, LyX converts it to a nicely rendered
representation. If LyX is not familiar with this command, it's left as
a
red string that's passed verbatim for pressing by LaTeX.
- Pressing "_"
(underline) creates a subscript (use Space to end).
- Pressing "^"
(hat) creates a superscript (use Space to end).
- "Alt-M (", " Alt-M [", "Alt-M < " and "Alt-M {" create parentheses
(of the various kinds) which change their height automatically
according
to their content.
- When already in Mathed, Ctrl-M
invokes "math text mode", which lets you write normal text (i.e.,
upright and with normal letter spacing) inside formulas.
- Alt-M D makes
the
equation "displayed" ($$ vs. $ in LaTeX)-- it's
centered horizontally and certain elements are typeset in a less
cramped
style. When editing a displayed equation, Ctrl-Enter turns it into an
equation array with multiple lines ( Ctrl-Enter adds a new
line)
and 3 columns (right-aligned, center-aligned, left-aligned).
10. How do I insert claims, lemmas, proofs, etc. in a nice way?
In the Layout menu,
choose Document and
change Class from "Article " to "Article (AMS)". Additional
mathematics-related environments are now available, and you can mark
paragraphs as lemmas etc.
11. How do I created nested environments, such as nested lists?
Alt-P Rightarrow
increases the nesting level while Alt-P Leftarrow decreases
it. You'll also find these useful: Alt-P Space opens the
dropdown list of environments, while Alt-P S chooses the
Standard
environment (i.e, normal text).
12. How do I print from LyX when I run it on the faculty's Linux servers?
See the list of available Unix/Linux printers here.
Alternatively, export your document to PostScript
(using Alt-F E T) and
then print file.ps file from another machine (silver
and winter work well, and so do Windows boxes if a printer
is
configured -- see next question).
13. What was that about printing from Windows? How do I access the
file?
Surely not using FTP -- that's very inconvenient. You can access your
Unix home directory as a normal Windows share, namely "\\silver\username".
However, you'll first need to ask Yorram Kalef
(Ziskind room 21) to create a "Samba account" for you.
For any suggestions or additional questions, please mail me.