Getting Started With LaTeX

It took me a little while to get up to speed with LaTeX, so hopefully, this will help other people out a little bit.  I understood TeX conceptually, I even understood what the syntax probably looked like because I had done a little playing around with groff.  But for some reason, good tutorials on installation and running TeX was simply absent.  I tried using the TeX Live CD from tug.org, but that was a miserable failure since I don't know how to use emacs well enough to even exit the program.

But the one thing that TeX Live made me realize was that a nice suite of TeX packages was probably already on my system.  Another important revelation that hit me was that TeX doesn't compile to anything typically readable.  It compiles to DVI files, which is a format that very view people have even heard of.  The classic way of producing documents is to then take the DVI files and convert them to PS.  But of course very few people have a PostScript viewer on their machine (if you consider most people to be running Windows).  So the next important discovery was that in a given installation of TeX/LaTeX, there was a good chance to have a program called pdflatex which takes a TeX file and converts it into PDF--a much more common format.

So I started out by running some sample TeX files online through pdflatex with some success.  Then I started trying to write my own files, which I met with some success.  But I noticed two things:

At this point I decided that if it was going to be worth my time to learn TeX, then I'd have to use some of the features that made TeX superior to using a word processor, most notably the feature that really urged me to use TeX:  keeping track of references within documents.  This alone (to me) makes a TeX suite worth using.  It beautifully  handles things like bibliography references, orders them, and will even format them in the desired bibliography style for you.  It will also allow you to insert citations, footnotes, and endnotes without making you worry about their position on the page, their numbering, etc.  All of this makes it very easy to add and remove references, and simply write a paper without having to keep track of how you have referenced your text.

As for the first problem, I decided to look around for a TeX IDE.  I found a good one for Linux and an an even better one for Windows.

TeX on Linux

For Linux there is Kile.  I'm not a KDE user, so I will understand if there is some gnashing of teeth for having to install the KDE infrastructure to run this program, but I think KDE offers enough nice software that the extra disk space is worth it.  Kile is one of those pieces of software.  The thing I don't like about Kile is that it is non-intuitive in many ways, which is the reason I found the Windows IDE better.  For example, there is no apparent way to close files, and if you attempt to close Kile and reload it, it remembers which files are open.  I only recently (one day previous to writing this) figured out that the (apparently only) way to close a file is to click the black circle button with an x on the left hand of the tool bar (right next to open).

If you want to start a new project with Kile, there is the Project menu which is pretty simple.  If you're just starting to learn TeX (like me), you might want to play around with the Quick Start on the Wizard menu.  If you would like to open an existing TeX document and create a project for it, follow these steps:

  1. Put your TeX file(s) for that document in their own directory.
  2. Go to Project -> New Project
  3. Name your project.
  4. Select the folder for your project.
  5. Uncheck "Create new file and add it to this project"
  6. Click OK.  You now have a project open.  (You have to remember this because Kile gives no indication as to whether or not a Project is open until you try to go open or close one.)
  7. Now go to Project -> Add new files to project... to add your files.  You want to add .tex, .bib, and other source files.

When you have your  main .tex file open, if you notice on the toolbar is a symbol for Adobe's PDF format.  And to the left of it should be that symbol next to a large gear.  The button on the left is for running pdflatex on your source file, and the one on the right is for viewing it.

TeX on Windows

I was quite impressed with the TeX software I found for Windows, when I was able to find it.  Since Windows doesn't come with a suite of TeX programs, you will need to install two things:

What is TeX?

If you're still confused, maybe you need to hear this:  TeX is a type setting system.  You write a source file (in a plain text editor) which describes the layout and the content of your document.  It's a more abstract representation of a document than a word processor gives you.  Word processors typically give you a very concrete, hands-on experience to writing a document--what you see is what you get (WYSIWYG).

Ok, so what is all this stuff about LaTeX, MiKTeX, and pdflatex?  Being a beginner, I'm still a little hazy on all of this as well, but as far as I can tell LaTeX is a package of programs which implements TeX and some popular TeX macros.  I think LaTeX is much easier to use than plain TeX which is why I decided to call this "Getting Started with LaTeX."  MiKTeX is similar, but seems to also include LaTeX within it.

Finally, I think it is worth mentioning that the 'X' in TeX is pronounced as a 'C' so that it sounds like "tech."