LyX/Cygwin 1.4.3
----------------

This package provides LyX version 1.4.3 built as a Cygwin application.
Thus, a preliminary requirement is the installation of the Cygwin runtime.
Before installing LyX, you should install at least the following Cygwin
packages (and all other packages pulled in by dependencies):

aspell          grep          libintl1        netpbm
coreutils       jbigkit       libintl2        python
diffutils       jpeg          libpng          sed
gettext         libintl       libpng2         tar

Other than the above, other packages are also needed, but you have the
option of installing native versions of them. The remaining packages
are: latex, imagemagick and ghostscript. For example, you could install
either the cygwin tetex packages or the native MikTeX one.
If you want to use the X11 version of LyX (see below), you will also need
the xorg-x11-* cygwin packages (it may suffice installing xorg-x11-fscl)
or some third party X-server.

After installing the required packages above, you will find instructions
on how to install LyX/Cygwin in the file INSTALL.txt.

This package contains two different flavors of LyX, one using the native
Qt/Win GUI and the other the Xforms/X11 GUI. For each flavor there are two
binaries: a wrapper for launching LyX from the Windows GUI (in order to set
up a proper environment for LyX and avoid having a CMD window open) and a
real binary for command line usage.

lyx-win.exe      Qt/Win, to be used from the Windows GUI
lyx-qtwin.exe    Qt/Win, to be used from command line
lyx-x11.exe      Xforms, needs an X-server, to be used from the Windows GUI
lyx-xforms.exe   Xforms, needs an X-server, to be used from the command line

When using the command line, you can also launch LyX by simply typing lyx,
as this is a symlink to lyx-qtwin.exe (make sure that /usr/local/bin is in
your PATH). The wrapper program lyx-x11.exe takes care of launching the
X-server if it is not running.

For the X11 version you can use whatever X-server you prefer. However, the
configuration files are taylored for using the cygwin server XWin.
The only two files that you need tweaking to adapt them to another X-server
are /etc/lyxprofile and /usr/local/bin/startxserver.
In /etc/lyxprofile you should enter the name of the X-server as shown (when
it is running) by the command "ps -efW", whereas you should replace
/usr/local/bin/startxserver with an appropriate Bourne shell script. As it
is now, it tries to start the cygwin server XWin.
Pay attention that if you do not use the startxserver script provided with
with this package to start the X-server, you are responsible for adding
to the X-server font path the directory containing the Bakoma fonts used
by LyX for displaying math symbols. This can be done by issuing the
command "xset fp+ /usr/local/share/lyx/fonts" from a shell prompt.
Failing to do so, instead of a math symbol you will see its name in red.
If you use the startxserver script, you don't have to care about this.

In /usr/local/share/lyx/etc/lyx.reg you will find registry entries for
associating a .lyx file to lyx-win.exe. Simply navigate to that dir using
the Windows explorer, select the file and choose "Join" or whatever is named
that entry in your locale. An easy way for opening an explorer window in the
right location when working in a cygwin shell, is using the command
"cygstart /usr/local/share/lyx/etc".


Caveat
------

Under Tools->Preferences->Outputs->Paths you will find a checkbox labeled
"Use Windows-style paths in LaTeX files". Its status (checked or unchecked)
is determined at configure time. If you use MikTeX you'll find that it is
checked, whereas if you use the cygwin tetex you'll find that it is unchecked.
Please, don't play with this checkbox if you don't know what you are doing.


Upgrading from LyX/Cygwin 1.4.2
-------------------------------

This should be straightforward and you need to do nothing. During the
upgrade, the file /etc/lyxprofile will not be replaced, as you may have
customized it. However, in version 1.4.2 I modified it by adding a new
environment variable which controls the kind of path style used by LyX.
So, if you already did not do so, I suggest that after upgrading you have
a look at the new version, located at /usr/local/share/lyx/etc/lyxprofile,
in order to import the new environment variable (LYX_WINPATHS) to your old
version.

Be warned that lyx-qtx11.exe has been replaced by lyx-xforms.exe, so if you
was using it in some scripts you will have to update them. Sorry for that.
I decided to replace lyx-qtx11.exe with lyx-xforms.exe because it is less
demanding on resources (letting it run better on Win98/ME) and also because
an official cygwin package for LyX using Qt3/X11 should be available soon.
Thus, if you want a Qt3/X11 version you can install that package in parallel
to this one without conflicts.


Peculiarities
-------------

This is specific to *this* LyX cygwin package.

- Environment variable LYX_WINPATHS. When setting this variable to
  "yes" or "true", LyX uses Windows- rather than posix-style paths. This
  is useful when you use Windows applications that do not understand posix
  and relieves you from the need of writing a wrapper script.
  It is set to "yes" by default in /etc/lyxprofile as most cygwin applications
  have no problems with Windows-style paths. If you want posix-style paths,
  you have to change that setting to "no".


Known problems
--------------

- When using lyx-xforms and the XWin server operates in multiwindow mode
  (i.e., it uses an integrated Windows-based window manager), a resized
  window is not correctly refreshed. To obviate this problem, after
  resizing a window you have to enlarge it to full screen by clicking
  the middle button in the window upper right corner, and then restore
  its size by clicking again that button. This problem does not occur if
  a proper window manager is used (this means running XWin in its own
  window or in fullscreen mode). Note that XWin is launched by default
  in multiwindow mode both by the provided startxserver script and by
  the /usr/X11R6/bin/startxwin.bat batch file.

- Sometimes, even if XWin is running, its name does not show up in the
  list of processes as shown by "ps -efW". Instead, in its place there is
  a process named <defunct>. It turns out that XWin is actually working and
  is not at all defunct, but the lyx-x11.exe wrapper thinks that there is no
  X-server available and launches lyx-qtwin.exe in place of lyx-xforms.exe.
  There is not much that can be done about this as it is a problem with
  the current cygwin dll (1.5.21). Usually, if you try to launch lyx-x11
  again you will get a message box telling that "A fatal error has occurred
  and Cygwin/X will now exit" but afterwards lyx-xforms appears...
  Another option is to directly start lyx-xforms after starting the X-server.
  Anyway, a reboot seems to fix the problem (as usual on Windows).


Disclaimer
----------

This package works for me but I cannot guarantee that it does for you, or
even that using it your computer will not blow in smoke ;-)

-- 
Enrico Forestieri, September 2006

