$\LaTeX$ (or more generally $\TeX$) is a wonderful tool when it comes to writing reports. I already wrote about how to use Eclipse with a few plugins to have a portable $\LaTeX$ editor.
There was a limitation however: though I hinted that some compilers exist in a portable version, I used TeXlipse with an installed MiKTeX. Now, a friend of mine required an editor to fine-tune something I prepared, and I did not wish to force a full installation.
So, here is how I prepared a portable $\TeX$ editor on a USB stick in half an hour (most of which was spent downloading), which shall work on any Windows machine.
Preparing the USB stick
I have got into the habit of installing the PortableApps platform on my new USB sticks, so I chose to respect the usual tree:
Documents> where all personal files will be, especially our $\LaTeX$ workspace
PortableApps> where the applications will be, in our case the TeXlipse IDE and the MiKTeX compiler
Nothing complicated here: just go and download MiKTeX portable. You get a self-extracting file which you just need to unzip into
<your USB drive>:\PortableApps\Miktex.
OK, you are good to go on the compiler part.
When you need a package, MiKTeX will download it and store it inside its own directory, thus keeping it available for the next time you need it.
You could stop here. MiKTeX can be launched. A systray icon would appear, and when you right-click it, you can launch TeXworks. I missed the project management, though, and the ability to specify where to put temporary files, or generated PDF.
So I stick with TeXlipse, and if you do too, you will never have to launch the MiKTeX. Well, it might be good to do so once in a while, just to check if updates are available.
Now, the real part…
First step: get a clean Eclipse IDE (rid of all non-essential features, since we only need the plugins we will install).
Unzip your file in
:\PortableApps\. I personally renamed the
eclipse folder into
OK, just a precaution before launching Eclipse. Go into your eclipse directory and edit the
eclipse.ini file to add the highlighted line:
UTF-8 is a logical choice when manipulating $\LaTeX$ files, which will often include the following in their header:
If you change this value in your source file, don’t forget to change the properties of your $\LaTeX$ project accordingly in TeXlipse. But we are not there yet.
OK, there you go! Launch Eclipse. It will ask for a workspace. I personally chose
:\Documents\LaTeX projects. Only downside so far: you may have to change the letter when you plug your stick to another computer.
From Eclipse to TeXlipse
For those who know Eclipse
Installing the plugins is quite straightforward: set up
http://texlipse.sourceforge.net as an update site, and install the TeXlipse and Pdf4eclipse (and Bibsonomy if you have the use for it) plugins, and restart.
For those who don’t
A step-by-step installation guide is available on the TeXlipse website.
Setting the compilers up
OK, all that is left to do for your portable $\TeX$ editor to work is to tell TeXlipse where to find the programs it needs to compile your source files.
To do this, Window > Preferences. Open then the Texlipse > Builder Settings. Now, the harsh part
Now, for each builder you need, you will have to set the place where the builder can be found. If you used the directory hierarchy, you have the following:
So, to avoid getting caught with problems such as drive letters, you can access the builder with a relative path.
So, for instance, when setting PdfLatex, you can set the path to
Apply this to all the builders you might need. You may use the above picture as an example.
All right, you’re good to go! Create your project and start $\TeX$-typing!
I thought of making a package available, but:
- I have no hosting;
- I am not sure I will take time to keep it up-to-date.
I’ll keep an attentive ear for any feedback!