Sep 25
Ubuntu 8.04, SUN Java6 JDK, TexLive, Eclipse 3.4 and Texlipse
I’ve noticed recently that I had two mediocre computers when I really only needed one. I took the best parts from both (which again, are mediocre at best, but are all I can afford at the moment) and combined them into one machine. On this machine I installed Linux: Ubuntu 8.04 to be exact. Using the alternative install CD, I used two harddrives to create software RAID-0 and RAID-1 devices on which to place the /root and /home partitions respectively. My goal is to completely ween myself from windows completely, at least on my home computers, and I’m still working towards this goal.
I am a graduate student after all, and I still need to be able to write papers on my home computer for publication in technical journals. Standard procedure on my old windows computer was to use MikTex and TeXnicCenter. MikTex is great because it automatically downloads and installs whatever latex packages it needs on the fly, and TeXnicCenter beats the snot out of notepad. After switching to Ubuntu and Gnome specifically, I started tracking down replacements for these two pieces. The most intriguing (and first) solution I came across was using the Eclipse 3.4 (Ganymede) development environment with the Texlipse plugin. Eclipse is an extremely extendable platform that has great plugins and tools for developing in all sorts of languages, and I’ve been using a customized version at work to develop software which runs on some Texas Instruments fixed-point DSPs and Xilinx FPGAs.
The first step to getting a workable Eclipse-based LaTex environment working in Ubuntu is to install a Java Development Kit (JDK), whether that kit is the Sun JDK 6 or one of the open-source (openjdk) distributions. Since I already had the Sun JDK installed as a prereq for a different program, I’ll outline that first. On my particular system, I have installed both the JDK and the JRE, which I believe are both required, although I’m not sure about the JDK. Therefore, to install Eclipse 3.4 using the Sun JDK, (sourcing john from jhcore.net):
Install the Sun JRE and JDK:
sudo apt-get install sun-java6-jre sun-java6-jdk
Then download and install Eclipse 3.4:
wget http://ftp.osuosl.org/pub/eclipse/technology/epp/downloads/release/ganymede/R/eclipse-java-ganymede-linux-gtk.tar.gz tar xzvf eclipse-java-ganymede-linux-gtk.tar.gz mv eclipse eclipse3.4
Edit: It has come to my attention that there is a service release (SR1) to Eclipse 3.4. Therefore, when downloading Eclipse, the package name should be downloaded with:
wget http://ftp.osuosl.org/pub/eclipse/technology/epp/downloads/release/ganymede/SR1/eclipse-java-ganymede-SR1-linux-gtk.tar.gz
I haven’t tried this installation yet, but it is my guess that the process will be identical.
At this point, you should have a working copy of Eclipse installed in your home directory which can be run by ~/eclipse3.4/eclipse. The next step is to install TexLive, which is a pretty good LaTex package for Linux. In Ubuntu, this is accomplished by:
sudo apt-get install texlive-latex-base
There are other TexLive packages in the Unbuntu repository, but it is my understanding that the texlive-latex-base package includes the necessary binaries (like latex, pdflatex, and pslatex) needed to compile *.tex files. As for the LaTex classes and style packages, that’s where MikTex comes in. Wait, what?
MikTex is a great LaTex package manager for windows, but it turns out you can compile it for linux too! I’m not going to go through it step by step, because that website does an excellent job of it. Just make sure when you’re compiling that you SPECIFY YOUR HOME DIRECTORY PROPERLY TWICE in the part where it says:
cmake -G "Unix Makefiles" -DMIKTEX_INSTALLROOT="/home/YOUR USER/texmf" -DMIKTEX_ROOTS="/home/YOUR USER/texmf"
This is important because this will be the directory where the MikTex package manager stores the LaTex packages when it downloads them. Also, that website says to run a sudo make install which will install the package into the texmf directory and, by virtue of running this using sudo, make root the owner of the texmf directory or some directories in it. It is convenient to sudo chown -R YourUser:YourUser ~/texmf to give yourself permissions to install packages and update the MikTex database without the sudo command. By default, TexLive is already configured (in /etc/texmf/texmf.cnf) to look for LaTex packages in $HOME/texmf when compiling LaTex files. BAM! Now when you need a LaTex package like cite, you can just run:
mpm --update-db mpm --install=cite
Piece of cake.
The last piece of the puzzle is the Texlipse plugin for Eclipse. This does the syntax highlighting, compiling, etc, etc in Eclipse. It works pretty well I might add. In Eclipse 3.4, it is a piece of cake to install. Just run eclipse and go to the Help >> Software Updates… menu and add a new site: http://texlipse.sourceforge.net/ . Then check the box next to the site you just added and hit install. Also a piece of cake.
You should now have a completely usable LaTex editing environment at your fingertips, and since it’s based on Eclipse, you can use all sorts of other great add-ons like Subclipse for accessing your LaTex documents stored in a SVN repository.
Hope I’ve helped to make this process a little more straightforward for someone else.
1 Comment so far
Leave a comment
![[del.icio.us]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/google.png)
![[Slashdot]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/slashdot.png)
![[Technorati]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/technorati.png)
![[Yahoo!]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.electrosizzle.com/wp-content/plugins/bookmarkify/email.png)

Thanks for this posting! It helped me a lot to get miktex configured on Hardy!