LaTeX, Part (4): Before you begin TeX-ing

Now that you have finished downloading and installing the main components, it’s time to start learning LaTeX!

My plan is to give you the basics that you need to start writing and some resources for more advanced stuff. The learning curve is a bit steep, but once you get the basics down you can easily search the Internet for resources to help you figure out how to do something.

Note of Caution

Before we begin, I’d like to start with an extremely important warning. Until you are absolutely confident in your use of LaTeX, do not use it as a replacement for your normal writing program. Why? Two reasons:

  1. Figuring out how to do new things might take a long time. TeX authoring uses a text-only interface, so even things like adding images and tables has to be done in code. Though none of these things are particularly difficult, they will take some time to figure out. If you have deadlines for your projects and not enough experience with TeX, this can create a huge problem (it has for me!).
  2. If you have spent a lot of time trying to get your TeX document to work the way you want, and the you decide that it’s taking too much time, or you can’t figure out how to do something, or whatever, you’ll want to move your document over to Word (or, hopefully, OpenOffice) where you are more comfortable. Now you have a problem. Your TeX document is littered with tags and extra text that will also get pasted into your word processor. You will have to go through and delete every single one of those tags and commands, and then italicize and make bold everything over again. For a long or complicated document, this can take a really long time (I had to do it with an 18 page paper because my Professor wanted it in Word format!).

You’ll end up with a pdf document made from your TeX document. You can also get dvi and ps output, as I mentioned before, but you can’t get something that is directly editable. So make sure you know what format your project has to be in before you do it with TeX.

The Basics

For those familiar with HTML, this stuff will be rather straight-forward. For anyone who isn’t and who is not familiar with computer code in general, it won’t be at all straight-forward. I’ll keep it as simple as I can, so just skim over it if this is easy for you.

In in HTML document, you have tags that designate several parts. They are as follows:

      Content goes here.

I know it seems round-about to talk about HTML structure when trying to explain TeX structure, but I think it helps clarify.

So in the HTML document you absolutely must have the <html> </html> tags. The first one tells the browser that the HTML language is being used now, and the other one tells it that the document is over. Inside of these tags you have the <body></body> tags. You can see already the way that HTML is a hierarchical structure, using tags-within-tags.

Anyway, the <body> tag tells the browser that everything following, until the </body> tag, should be displayed in the browser window. You can put other tags inside this body environment as well, such as paragraphs (<p></p>) and headings (<h1></h1>).

LaTeX works in a similar fashion. There are three lines of the language that you absolutely must have in order to define a TeX document. Simple, right? However, just as in HTML, those few lines give you an awfully boring document. The power is in all of the other commands.

LaTeX also uses the hierarchical structure in some respects, by using things called environments. An environment is simply a place where new rules apply. For example, there is a list environment where only certain commands pertaining to making a list can be used and a math environment where you use commands for making mathematical formulas. Learning which commands to use in which environments takes a little time, but is mostly intuitive.

One major difference in TeX structure is that, in HTML, each element (<something> </something>) has a beginning and an end. In LaTeX there are many more commands, and many of them do not require an explicit “end.” Those that do require and end do so in a different way.

Go on to the next part to actually start writing in LaTeX!

Back to Part (3) | Continue to Part (5)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s