2. Some Definitions
As mentioned in the introduction, LaTeX is a language, so you can't simply start typing and expect to see your document appear before your very eyes[Why is TeX not a WYSIWYG system?]. You need to know a few things before you can get started, so it's best to define a few terms first. Don't worry if there seems a lot to take in, there will be some practical examples later, which should hopefully make things a little clearer.
Throughout this document, source code is illustrated in the form:
The corresponding output (how it will appear in the PDF document)2.1 is illustrated like this:
Take care not to confuse a backslash \
with a forward slash / as they have different meanings.
(Commands typeset in blue, such as
\par, indicate a hyperlink to
the command definition in the
Command definitions are shown in a typewriter font in the form:
In this case the command being defined is called
\documentclass and text typed <like this> (such as
<options> and <class file>) indicates the type of thing you
need to substitute. (Don't type the angle brackets!) For example, if you want the scrartcl
class file you would substitute <class file> with
scrartcl and if you want the letterpaper option you
would substitute <options> with letterpaper, like this:
But more on that later.
Sometimes it can be easy to miss a space character when you're reading this kind of document. When it's important to indicate a space, the visible space symbol ␣ is used. For example:
When you type up the code, replace any occurrence of ␣ with a space.
One other thing to mention is the comment character % (the percent symbol). Anything from the percent symbol up to, and including, the end of line character is ignored by LaTeX. Thus
will produce the output
The percent symbol is often used to suppress unwanted space resulting from line breaks2.2 in the source code. For example, the following code
will produce the output:
which will produce the output:
- ... document)2.1
- This HTML version of the book uses bitmaps to illustrate the output, which doesn't look as good as the actual PDF version.
- ... breaks2.2
- LaTeX treats the end-of-line character as a space.
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).