Skip to main content
   
Andrew Roberts @ School of Computing

Getting to grips with Latex - Setting up Latex (within the SoC)

by Andrew Roberts

Since writing this, it would appear that problems with the installation of Latex on the SoC windows 2k machines has been rectified. Simply type "set PATH=%PATH%;c:\progra~1\texmf\miktex\bin;" at a command line, and things should work ok. (Needs to be typed each time you open a command-line unless you put it in your path permanently.)

Before you can even begin getting to grips with Latex, you need to ensure the software is available and correctly configured so that you can get on with producing your documents. And so that is purpose of this tutorial - to ensure you can access Latex correctly. It is not a guide on how to install Latex on your own PC, but only how to access the software already installed on machines within the School of Computing.

Latex in Linux

This is extremely simple - there is nothing to do! If you are using a Linux machine here, then just follow the future tutorials as specified and everything will work perfectly.

Latex in Windows

This is slightly more problematic. The Windows version of Latex is commonly packaged as MikTex (I'm not entirely sure why, but try not to be concerned by the slightly different name, the actual commands you use are the same). This version has been installed in the machines in this department, however, despite my best efforts, I can't seem to get it to function properly. It doesn't offer any clues as to what's wrong, so it is difficult to rectify. Hopefully, support will deal with it soon.

Not to worry though! In the meantime, there is a work-around that will still allow windows users to use Latex. It requires a couple of extra (albeit, small) steps to get up and running. To summarise, it consists of editing your Latex files on Windows, and then remotely logging in to your Linux account to execute Latex (which as already noted, works perfectly). Don't panic if you have never touched Linux before, you will barely have to learn anything new.

Editing your file in your Linux account

You may not be aware, but you can access all your files in your Linux account from within Windows as easily as your local files. It therefore makes sense to simply store your Latex documents within this space, so that when you run the software from Linux, it can find your work straight away.
  1. Open Windows Explorer.
  2. On the left, you should see "My Network Places". Select this.
  3. A networked folder should then be displayed as "[your username] on Csunix". This is your userspace on your Linux account. Double click to enter this space.
  4. You will be prompted for your Linux username and password. If you do not know your Linux password, then you need to go and see support.
  5. Your Linux file-space will then be presented. I would recommend creating a new directory for your Latex files. Goto: File/New/Folder on the Explorer menu and type in a sensible name (I will assume you have used "latex").
  6. From now on, you have a place to store your Latex documents. Which ever editor you choose, you will be able to open and save files to this space.

Logging into your Linux account

Assuming now that you have a Latex document saved in your new latex directory (follow the next tutorial!), and you now want to get Latex to process it and produce it's output. You must first log into Linux, where Latex is set up correctly.
  1. Click on the Start button, select Programs and look for a program called Putty. This the tool to use to remotely log into your Linux account.
  2. Once Putty has loaded, you need to specify a couple of details first:
    • Host Name: cslin-gps.comp.leeds.ac.uk
    • Protocol: SSH (this should then automatically update the port number to 22).
  3. Click Open.
  4. It will open a connection to the Linux server, and then ask you for login details. "Login as" is asking for your username. Once entered, the password it wants is your Linux password.
  5. If all goes well, you should then get to a command-prompt.
  6. Now that you are logged in, you should go to the directory where your work is stored. Type: "cd latex" followed by Enter. If you called your directory something different, then obviously use that. Also, be careful, Linux files are case-sensitive, so 'Latex' is different from 'latex'.

Running Latex

This is straight-forward from this point on. You just type in 'latex [filename.tex]' and return. It is assumed that the filename specified does reside in the current directory. The files output from Latex will also be created in this directory. Obviously, these can be access through Explorer for you to view. When working from any of the tutorials, the necessary commands will be provided, so just follow them.

Summary

If you've successfully got through this tutorial, then you are now armed with the knowledge of how to process your Latex documents via the Latex software in Linux. Admittedly, it is frustrating that the Win version doesn't work as intended, but I hope you'll see it's not much extra hassle to get round this problem.


Back to Latex tutorials.
Back to misc.