LaTeX Startup

Beginning LaTeX can be a daunting task. I've collected and prepared some info that should help ease the transition into the system.

Introduction

What is LaTeX?

LaTeX (pronounced like lay-tech or la-tech) is a typesetting language. It allows direct control of document preparation through extensible markup commands. In a similar fashion, HTML code is a typesetting language, where the HTML markup instructs the web browser software in how to render a web page.

Some external resources:

Why LaTeX?

There are many arguments for and against such a process. Some of the buzz words include breaking away from what-you-see-is-what-you-get (WYSIWYG) document development, in favour of a more systematic and structured approach.

One of the biggest reasons I like it, aside from being free and open-source, is the programming-like mindset. A document is compiled based on markup consisting of commands and user-defined properties. There is generally a one-to-one correspondence between what you markup the result. All formatting is laid out in plain sight, where you have direct control of how things are handled. The document formatting and content (including diagrams) can be typeset, developed into extensible commands, and reused for maximum efficiency, consistency, and control.

Last, but certainly not least, you can put comments anywhere you like in the marked up document. This is beneficial for two reasons. Comments allow for improved legibility of both content and formatting, and can assist with the content preparation process by allowing the user to stick in little reminders or notes which require future attention.

Although it can be an investment of time and effort to begin using LaTeX and learn various techniques, I believe it is well worth it in the end.

How to LaTeX?

The most basic LaTeX document would look something like the following:

%all lines of text preceded by a "%" is a comment, which is disregarded by the LaTeX compiling process
%
%define the class of the document.  Here, article is the class
\documentclass{article}  

%note: whitespace is your friend!  Put in as much as you'd like to make your document more legible.



%begin the document environment, where all contents and markup will be contained.
\begin{document}  
This is a the most basic document.  %comments can also start midline too!

A blank line is required to start a new paragraph.
%
A line with the comment character (\%) is not considered a blank line!

Curly brackets (\{ and \}) define delimiters to scopes. \textbf{Bolded text} can be defined this way.


%end the document environment.
\end{document}

Some points to note about this:

  • the forward slash (\) introduces a markup command. All words starting with this slash will be interpreted as a command. To typeset a slash in regular text environment, use the \\ command.
  • all text to the right of the percent (%) character will be considered comments, and will be ignored by the compiler. To typeset a percent character, use the \% command.
  • Software required to compile this into a proper document is discussed later.

There are a considerable amount of guides available to get started learning LaTeX. I would recommend performing a search for "introduction to latex" as a start.

Installation

A brief introduction to the requirements is given, followed by system-specific installation guides/notes.

Overview

A LaTeX development environment consists of three major components:

  • LaTeX document editor,
  • backend driver/compiler, and
  • completed result viewer.

Further to this, other tools may be helpful, such as drawing programs for image preparation.

LaTeX Document Editor

Although any simple text editor can suffice, a LaTeX document editor can provide useful features such as syntax highlighting, auto-completion, project association, and compiler control integration. There are various editors available, depending on the operating system of choice.

LaTeX backend driver/compiler

The action of compiling a marked up LaTeX document into a presentable form requires the meat-and-potatoes of the LaTeX effort. This tool will read the LaTeX document, and will develop a typeset document. To use LaTeX conventionally, there is no need to have more than a basic understanding of this part of the system.

In general, the compile process can be performed by using simple command-line commands, such as

latex source.tex    (produces .DVI output)
pdftex source.tex    (produces .PDF output)

.DVI, .PS, .PDF viewer

To view the completed result. Depends on platform.

System-Specific Guides

Windows

I personally use the following software:

Other software of note include:

  • Editor:
  • Driver:
  • Viewer:

Installation Notes

This is written based on the software I use (listed above). Information may not be complete for others.

Download and install the editor, driver, and viewer software. Be sure to make note of their installation paths should you need to configure anything manually. When launched, LEd should automatically detect the MikTeX 2.7 installation, and associate file paths.

If there is some problem with recognizing the MikTeX installation, open the Configuration menu bar item, select Options -> Application -> DVI Viewer, and enter information manually.

Some useful changes include:

  • The project directory (under Configuration -> Options -> Application -> Directories) should be set to something you find useful (eg. d:\Data\LaTeX)
  • Remove the shortcut key SHIFT-SPACE from command "Edit.SelectParenthesis" (under Configuration -> Options -> Application -> Shortcuts. Every time you press space while holding shift, this default shortcut command highlights a block of text within parenthesis. Although this sounds benign, it can be very frustrating when typing while pressing the shift key. If Your Timing Is A Bit Off While Writing A Sentence With Every Letter Capitalized, then the sporadically pressed shift-space can cause all text to be highlighted. While you continue typing, all highlighted text is wiped, and replaced by the newly typed text.

Mac

To be written.

Linux

To be written.

Links