Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

PortableInstallation

Categories: Windows, Manuals
<< | Page list | >>

This page describes how to create a portable installation under Windows. This can then be used from a USB stick or a network drive without installing any software.

Limitations

Utilities for image conversion may not work.

Advice

The best way to install a portable version is to try the portable installer packages listed under "Alternatives" (at the bottom).

If you require LyX 2.0, try "Portable LyX" or "LyTex".

If you require the latest version of LyX, try the "LyTex" installer below. The installer gives you the option to upgrade to the latest LyX after installing version 2.0. Otherwise, try the "Installation" steps listed below.

Installation

For this installation, I used the following software

The goal is to get LyX and LaTeX running without the need to install them first. This also includes the software bundled with LyX, but it does not include a PDF viewer.

  1. Create a base directory somewhere, say D:\portable
  2. Install LyX to this directory, without latex support, creating a start menu folder and shortcuts
  3. Extract MiKTeX Portable to the folder where you installed LyX and rename it to Miktex
  4. Open the D:\portable\LyX2.0.3\Resources\lyxrc.dist file in notepad or wordpad, then append ;$LyXDir\miktex\miktex\bin\ to the path_prefix line, so that it looks like this: \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript;$LyXDir\miktex\miktex\bin\"
  5. Create a new textfile in D:\portable\LyX2.0.3 and paste the following line in it: start bin\LyX.exe -userdir "userdir". Save it, and rename it to startLyX.bat (without the .txt extension!)
  6. Excecute the startLyx.bat file. This will start lyx. Click yes when you're asked if you want to create the userdirectory. The first start may be slow, because miktex has to download additional packages first.

Free up space

You can free up some space by deleting all the files that you don't need from

  • D:\portable\LyX2.0.3\Resources\dicts
Dictionary files
  • D:\portable\LyX2.0.3\Resources\thes
Thesaurus files
  • D:\portable\LyX2.0.3\miktex\docs
Documentation of MiKTeX packages

Fresh install: 560MB on disk (FAT32)

Windows 7

Windows 7 new taskbar let's you pin applications to your taskbar. If you're working at a specific computer for a longer period and want to use your portable lyx, you might want to pin lyx to the taskbar. But remember that by doing so, you'll start lyx directly without setting the userdir, like in the startLyX.bat file. To overcome this, make two more batch scripts in D:\portable\LyX2.0.3\: CopySettingsToLocalComputer.bat and CopySettingsFromLocalComputer.bat.

CopySettingsToLocalComputer.bat

xcopy "userdir" "%appdata%\LyX2.0" /E /K /Y /I
echo "Done"
pause

CopySettingsFromLocalComputer.bat

xcopy "%appdata\LyX2.0" "userdir" /E /K /Y /I
echo "done"
pause

With these two files you can copy your settings from and to the local computer.

Using RCS version control with portable LyX

  1. download rcs win binaries (ftp://ftp.cs.purdue.edu/pub/RCS/. rcs57pc1.zip, rcs57pc2.zip and rcs57pc3.zip)
  2. copy win32 folder to D:\portable\LyX2.0.3 and rename to RCS.
  3. Open the Resources\lyxrc.dist file in notepad or wordpad, then append ;$LyXDir\RCS\ to the path_prefix line, so that it looks like this: \path_prefix "$LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript;$LyXDir\miktex\miktex\bin\;$LyXDir\RCS"
  4. Open startLyX.bat in notepad, and add before the line with start ... the following two lines:
    SET TZ=CET
    SET RCSINIT=-x,v/
  5. Change the timezone variable in the first line to your timezone
  6. Start LyX, and reconfigure (Tools->reconfigure)

Tweaks

The following tweaks come from a portable installation with LyX 1.6. I'm not sure if this is still applicable to LyX 2.0, but I leave it here.

  1. There may be an error message involving chklatex.tex, but that can be ignored. Removing the platex section from D:\portable\LyX16\Resources\configure.py got rid of the message - but I am not sure why it appeared in the first place.

Alternatives

LyTeX

A portable TeX suite called LyTeX, that includes TeX Works, TeX Live, and LyX (various versions, including 1.6 and 2.0) here:

http://code.google.com/p/lytex/ (about 400-500mb extracted)

Portable LyX

Portable LyX 2.0 is a repack of LyTeX with LyX 2.0 available here:

http://sourceforge.net/projects/portable-lyx-20/ (about 700-800MB extracted)

USBTeX

A fully-functioning Tex distribution designed for a USB stick is available here: http://www.exomatik.net/U-Latex/USBTeXEnglish (525MB extracted)

I have tested USBTeX with LyX 1.6.2 and can report that is working well without Admin Rights.

  • The steps needed to do this need to be described in detail. If anyone can, please update!

Windows Manuals

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2016-07-18 12:22 UTC