LyX port for Windows NT/9x
This page is located at http://www.cs.uu.nl/~steven/lyx.html
Contents:
What is LyX?
LyX is a What You See Is What You Mean document processor that uses LaTeX for its typesetting. If you use LaTeX, using a simple editor to enter your documents is now pure, unneeded masochism. LyX provides a much more easy way of editing your documents and is just as powerful as LaTeX (unless you do really bizarre things). And no, you do NOT have to point and click everything. You'll get accustomed to using keyboard shortcuts in no time. Furthermore, if you type the LaTeX code in the math editor, it automatically translates it to the LyX graphical symbol. Go to their homepage or check out the LyX Graphical Tour.
LyX was ported to Windows NT/9x using the Cygwin library which allows easy porting of Unix programs to the Win32-platforms. The port report which describes how this was done is found here: port-report.txt.
Installing LyX
You can download this binary: LyX v1.0.1 for WinNT/9x .
You'll have to extract this to c:\apps\lyx-1.0.1 in order to get c:\apps\lyx-1.0.1\bin\lyx.exe etc. If
you have the Cygwin usertools installed, you can probably delete the external directory.
You MUST install the binary on c: and in \apps\lyx-1.0.1 or LyX may not work! Well, actually you can try setting LYX_DIR_10X, but you'll get trouble with reLyX (which you can fix in the main executable). However, installing it to the hardcoded directory minimizes the risk of LyX not being able to find its files.
Try to run c:\apps\lyx-1.0.1\bin\runconfigure.bat to set your system wide configuration settings and run configure from the options menu to set personal settings.
Make sure your DISPLAY and HOME environment variables make sense. Also you'll have to create the directory c:\tmp for temporary directories that LyX creates. These things will be done for you if you don't do them yourself.
You are almost finished. Since this is a port of a program that ran under Xwindows, you need to have an X-server, like Exceed (commercial, the one I use myself). A free X-server is MI/X from Microimages. Unfortunately, this server does not work with LyX. A good X-server which you can use in sessions of two hours is X-Win32 from Starnet Communications.
In order to run LyX you have to follow these steps:
- Start up your X-Server. Don't forget to have your DISPLAY-variable set (e.g.: set DISPLAY=PETTEN:0.0 on my machine which is called PETTEN)). You may want to set HOME too, since LyX will create a directory there.
- Start up LyX by running c:\apps\lyx-1.0.1\bin\runlyx.bat.
Support for features
I got all the features of LyX I want working on my system (inline viewing of pictures, ispell, chktex, reLyX). See below for pointers to get it working. You may need to run options->configure again to get it working. Also, make sure the executables can be found (put their directories in your path for example).
- Importing LaTeX: You need Perl. Just download the appropiate binary from the site of ActivePerl.
- Spellchecking: You want Ispell. Get it at the Cygwin ports repository.
- Checking layout: Chktex checks some subtle layout points, like if you use the right amount of space after a punctation mark. Just download it at CTAN.
- Inline viewing of pictures: One of the many cool features of LyX is that you can actually see the pictures you include in your document while you are working on it. You need a Cygwin port of Ghostscript for this. Many a native port would work also, but available binaries don't have X support, so you need to port it yourself. You can get the source code at the GhostScript site and good luck! I found it to be quite difficult. You can of course use my port (install to c:\apps\gs4.03) which works, but is based on an outdated version of GhostScript. You need to get the fonts yourself, or provide a symbolic link in the fonts directory (like cd /apps/gs4.03/share/ghostscript; ln -s "path to other distribution"/fonts .) if you have for example a native port already installed. You need to do that using the sh.exe program in the .../external directory
- Using Ipe: If you use Ipe, you can include your Ipe-files like they are encapsulated postscript. This will allow inline viewing, but Ghostscript can not display the text (I do not know why). You also enter "\Ipe{myfile.ipe}" in TeX-mode like you are used to, but you can not see the picture inline.
Configuration issues
- When starting LyX, use the provided batchfiles runlyx.bat and runconfigure.bat.
- If you use the native port of Ghostview, you need the script in the external dir (gv) to convert the path.
- You may need to put '\print_spool_command "lpr -S infix -P laspr2 "' in your %HOME%\.lyx\lyxrc.
- You need to copy sh.exe in the external dir to a directory called /bin, or edit the configure script in share/lyx to work.
- Always use absolute pathnames when including pictures or there could be trouble (drawing disappearing and only text remaining).
- The fonts look rather big. Try a zoom of 101.
- If you want to access other partitions, make a symbolic link using ln in the directory external with something like: /apps/lyx-1.0.1/external/ln -s //D/ /apps/lyx-1.0.1/D.
- Shankar Sen says:
- I kept getting error messages till I made the directory c:\usr\tmp. LyX wasn't satisfied with c:\tmp.
- Couldn't get reLyX to work from inside LyX till I changed the Shebang line to:
#!//D/Program/perl/bin/perl.exe.
Of course I guessed my perl was in a different location from
yours, but I was not familiar with the Cygwin path conventions.
If you get stuck
I hope this will get you going. Last but not least: unfortunately, I really
do not have the time to answer questions like 'how do I setup my
Latex-distribution with LyX?'. If you get stuck, consult the mailing
list at www.lyx.org instead. I do however take suggestions on how to
improve this page. Specifically, I would very much like to know it when
someone gets LyX working on his/her system using this port, since my
system is so tweaked I do not know if there is something I have
forgotten to mention.