Setting up TeXlipse and SumatraPDF

When you really need to get yourself to finally start working on something, you brain usually kicks into overdrive looking for anything unrelated to occupy itself witOOOH, SHINEY... Start looking up something on wikipedia, and three hours later you no longer remember how you got to where you are right now and there are still ten or so unread tabs in your browser.

Some time ago I've started to try and trick my lazy ass brain into channeling these efforts into something productive. Need to start coding a new project? Hey, let's check out that fancy new DVCS that everyone is going on about! New project? Let's learn a new language! Maybe not optimal, but it still gets me there (eventually).

Then there is this year's thesis. While still desperately trying to avoid starting work on it, I accidentaly stumbled across LaTeX, immediately thinking 'this might be it'.

I've opted to using Eclipse (along with TeXlipse plugin) for the actual writing, since I was already pretty familiar with Eclipse and none of the editors available under Windows raised interest in me (I've heard heaps of praise for Kile, though). I got the actual LaTeX core with the MikTeX package.

The MikTeX installation is... strange. After unpacking the downloaded archive, the installation itself is launched from a PDF document, no less. You scroll down the document, which also acts as a sort of a manual, clicking hyperlinks, which will run the actual (un)installers for the various components. Also - and this pissed me off a bit - it refuses to start unless you have Adobe Acrobat Reader installed (I'm using Sumatra for viewing PDF files).

(Don't trust that fucker, you probably only want MikTeX)

So, after installing MikTeX, you probably want to set up your editor. The package comes with TeXnic Center, but you don't want that, dear sir or madam.

We'll be using Eclipse, BECAUSE THE TITLE SAID SO. Grabbing it is pretty straightforward, just visit this page and pick one that suits you best; the plugin will work with either build. Unpack the zip archive where you want, and fire it up (you might need to install Java JRE/JDK if you don't have one already. Eclipse will display a helpful warning message before dying if that is the case).

After starting it up, we'll be visiting Help > Install new software...



Just enter texlipse.sourceforge.net into the text field, and Eclipse itself should take care of the rest.

This should get you up and running, you can start creating your LaTeX project right now if you so wish. There are however some other things i'd like to mention, as they were the sole reason I even decided to write this post. These are the mythical beasts known as 'forward-search' and 'inverse-search'. Particularly inverse-search is useful, since it allows your editor to move your cursor to a certain row by double-clicking a corresponding passage in the resulting PDF document.

Setting this is a bit more tricky, and though I found some tutorials/examples of setting it up correctly, I didn't find a single one that would have all of the settings right. So, off we go.

First, we enable synctex support in our PDF generator. Go to Window > Preferences...


The `-synctex=-1` is the interesting part. Yes, that's `minus one`. Don't ask.

Now, we just need to set up the PDF viewer, SumatraPDF, again BECAUSE THE TIT-- you get the idea.

Still in the preferences dialog, we'll look for Texlipse > Viewer settings. We'll add a new viewer:


The interesting parts are:
-reuse-instance %fullfile
[ForwardSearch("%fullfile","%texfile",%line, 0,0,1)]
The first one prevents launching a new instance of Sumatra every time you want to view the result. The second one helpfully highlights current line in the previewer.

Now for the final round, configuring Sumatra itself. Run Sumatra with a command line parameter `-inverse-search foo`. This will open up an additional option in Sumatra's preferences dialog:

Sneaky.

You'll want to paste the following line into the dropdown:

javaw -classpath "C:\Program Files\eclipse\plugins\net.sourceforge.texlipse_1.4.1\texlipse.jar" net.sourceforge.texlipse.viewer.util.FileLocationClient -p 55000 -f %f -l %l
It will of course differ depending on your location of Eclipse installation and the version of TeXlipse you are using.

Now we can fire up Eclipse, start a new document and try us some fancy inverse searchin'.


Posted at at 13:11 on 2011-04-16 by Posted by halka | 0 comments   | Filed under:

Cisco VPN client alternative


TL;DR: If the Cisco VPN client isn't working out for you for whatever reason, try a free VPN cient from Shrew Soft.


For a long time, we've been using a Debian linux based firewall at work, and OpenVPN for all our remote connection, God-dammit-they-are-bugging-me-on-vacation-again needs.

Our network admin, a really nice Russian guy, has since moved on to bigger and better things, and we hired a Cisco certified something-something (I hope I'm not coming across as disrespectful, this guy really knows his stuff, just don't know the proper term and can't be arsed to search for it) in his place. This resulted in our switching, unsurprisingly, to Cisco networking products.

With this comes the ugly baggage that is the Cisco VPN client. Slow to start (sometimes upwards of 30 seconds on my laptop) - disc trashing included, slow to connect, dropping connection like crazy (as a comparison, OpenVPN hung on to connections tooth-and-nails), and I had to use it in a virtual machine running Windows XP as it stubbornly refused to connect when run under Vista (thankfully, the problem no longer exists on Windows 7).

I was thoroughly flabbergasted when I found out about vpnc, which I used on my home desktop (running FreeBSD at the time). I'd just run it, wait for about half a second, and that was that. Connection established. No waiting, no disc activity, no nothing. I was still using Cisco's client software on my Windows system.

When I upgraded my system a few weeks ago, I've opted to use 64-bit Windows since the amount of RAM has passed the magic number. I was pretty much prepared for some programs refusing to run (I was warned beforehand). Unfortunately, since Cisco VPN client is among those, I had to look for an alternative.


That is when I found these guys and their VPN client. Fast start, responsive, works on 64 bit windows. Pretty much all I wanted (though it still drops connection sometimes; can't help that one I guess). The ability to import Cisco's .pcf profiles (which it shares with vpnc, by the way) is also a nice feature.

Posted at at 12:25 on by Posted by halka | 0 comments   | Filed under: