Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TABLE OF CONTENTS
Introduction
The typesetting process
Installing the typesetting program
Latex commands
Structure of a typeset document
Text and math
Typesetting regular text
Spaces and carriage returns
Font sizes
Boldface
Italics
Boldface and italics
Indentation
Spaces
Special text symbols
Quotation marks
Footnotes
Exercises and Examples
Headings and Chapter Titles
Figures and Tables
Typesetting mathematics
Boldface math and Italic math
Variables and Numbers
Equals sign and Arithmetic symbols
Spaces
Fractions
Square roots and other roots
Exponents and superscripts
Subscripts
Greek letters
Degrees
Dot, dot, dot
Angles
Set theory symbols
Function names
Exercises
Finding errors
Correcting errors
Introduction
This manual will explain how to typeset documents using the Latex typesetting language. Typesetting text
with Latex is very easy. It takes a little more time to learn how to use Latex commands to typeset
mathematical expressions, but once you learn, it becomes easy and you will be able to type much faster. I
will send you easier pages at first and as you get more comfortable we will start sending pages with more
mathematics.
I will also send you examples of pages that have already been typeset so that you can look at how the Latex
commands have been used.
Typesetting commands indicate things like what size the letters should be, whether they should be in bold
type, italics or some other style, and a variety of other formatting options.
The typesetting language we use for this project is called Latex and it will be discussed later in this manual.
Latex is also the name of the program we use to convert the typeset text into a PDF document.
The typesetting process for this project has five steps. You will repeat these five steps for every image that
we send you.
The images we send will be in the JPEG format and can be viewed with your web browser (Explorer,
Firefox, etc). If you prefer another image format, let us know and we can talk about it. You are also
welcome to use an OCR (optical character recognition) program and a scanner if you have them.
Certain kinds of formatted text need to be typeset using Latex commands. The only Latex commands you
will need for regular (non-mathematical) text are commands for boldface and italics. For mathematical
expressions, you will use a lot of Latex commands. These commands will be discussed in more detail later
in this manual.
This command will put the word "boldface" in darker bold letters.
In addition to the typesetting commands you added to the text while typing, there are a few extra Latex
commands that have to be added to the beginning and end of every document. These will be explained
later.
Once the Latex program has been downloaded, the file "protex.exe" will be on your desktop. Double-click
the file and follow the instructions as the program installs itself on your computer. A PDF file that comes
with the program will explain how to submit typeset text to the Latex program.
Latex commands
All Latex typesetting commands begin with a backslash, "\". Many of the commands use braces (a left
brace, "{", and a right brace, "}") to enclose letters, words and phrases.
Do not use any Latex commands that do not appear in this manual. There are hundreds of different Latex
commands for formatting text, but in this project we only want to use a small number of basic commands.
Don't try and get fancy. That's not what we want. We are only going to use the most basic Latex commands
for this project and that will make yourtypesetting job a lot easier. We don’t want you slowed down trying
to figure out how to make things look exactly like the pages you type and having to type a lot of extra
commands to do so.
\documentclass{article}
\setlength{\parskip}{2mm}
\setlength{\parindent}{0pt}
\begin{document}
And all typeset documents end with the following one line of text.
\end{document}
All of the text you copy from the image will be inserted between these beginning and ending lines of text.
You need to type this text at the beginning and end of every document you submit to the Latex program.
Note: The third command (\setlength{\parskip}{2mm}) puts 2mm of space between paragraphs.
Note: The fourth command (\setlength{\parindent}{0pt}) tells Latex not to indent any paragraphs. Don't try
to imitate the indentation you see in the pages you type. We don't want any paragraphs indented at this
time.
All the text that you typeset will be in one font and one size, even if it appears larger or smaller on the page
you are copying. We will not use indentation of paragraphs, even if they are indented in the images. The
only special commands you will need to use for non-mathematical text is to copy the boldface and italics
that you see in the images.
Font sizes
All text will appear in one font size. The default font size we use is 10 points. A point equals 1/72 of an
inch or 3/100 of a centimeter. Do not try to typeset any text to be a different size.
Boldface
To make a word or phrase boldface, use the \boldface{ } command and put the word or phrase inside the
braces.
Example
Italics
To make a word or phrase italic, use the \textit{ } command and put the word or phrase inside the braces.
Example:
You type: The \textbf{\textit{ hypotenuse}} of a right triangle is always longer than either of the other two
sides.
Latex prints: The hypotenuse of a right triangle is always longer than either of the other two sides.
Indentation
All Latex files will include the \setlength{\parindent}{0pt} command near the beginning of the file to
suppress the indentation of paragraphs. Do not try to indent paragraphs.
There are certain symbols in the images which need to be typeset using special commands because the
symbols are also used as typesetting symbols in Latex. They are listed below
Quotation marks
Don't use the regular quotation marks found on your keyboard. To typeset two opening quotation marks,
use two `s, which are usually found on the key to the left of the 1 key at the upper left of your keyboard.
For closing quotation marks we use two 's, found on the key to the left of the Return key. For single quotes,
use one each of the opening and closing marks.
Footnotes
Some images that you type have footnotes at the bottom of the page. Do not try to typeset these footnotes at
the bottom of your pages.
Instead, insert the text of the footnote in double parentheses right after the sentence in which the footnote
appears. A double parentheses looks like this: ((This is a footnote.))
Exercises and Examples
Many of the exercises and examples in the textbooks are set in a smaller font that the regular text. All of the
text you typeset will be the same size so you don't have to take any action to reduce the size of the fonts for
exercises or examples.
\begin{center}
\textsf{Fig. 195. A quadratic equation.}
\end{center}
You can use these three commands as a template for all the figures and tables in the text; just change the
caption and figure number each time you use it.
Note: the \textsf{ } command puts the text of the caption into a sans serif font. Don't try to copy the
typestyle of any unusual fonts you see on the pages you copy. All text will be set in the same font except
for the captions.
MATHEMATICS
Many of the pages you type will contain mathematical expressions. You don't need to understand any of the
math, but you will need to learn how to copy the expressions so that they appear correctly in the PDF
document.
The number one rule to follow when typesetting math expressions is this:
Math mode
When an expression is surrounded by single or double dollar signs, we say the expression is in “math
mode.”
A math expression is any group of numbers or letters that appear with any sort of mathematical symbol for
addition, subtraction, multiplication, division, etc.
If you want this expression to appear centered on a line by itself, we type: $$1 + 1 = 2$$
Boldface math
Somestimes a math expression will be in boldface in the image you are copying. We will not be using
boldface with math expression, so do not try to put math expressions in boldface, even if they appear in
boldface in the text.
Italic math
In most cases, any letters or words that appear in math mode will be typeset in italics. This happens
automatically, you don’t use the \textit{ } command.
Variables
In math textbooks, all variables are set in italics. In Latex, we don't use the \textit command. We put the
variable into math mode by enclosing the variable with dollar signs. All variables will be typeset in math
mode, meaning they will be surrounded by single dollar signs. And any text in math mode will
automatically be typeset in italics. You will spend a lot of time putting individual variables between dollar
signs. It is the most common kind of mathematical expression.
In geometry, a variable is a letter that is used to stand for a point, line, or other geometrical element. Single
upper-case variables usually represent points and angles. Two upper-case variables together represent a line
or line segment. Three or more upper-case variables represent triangles, circles, rectangles and other
polygons. Lower case variables usually represent the sides of figures.
In algebra, variables represent unknown quantities. They are usually lower case letters like a, b, c, x, y, z.
You will be typesetting many variables. All math variables that appear by themselves in a sentence should
be surrounded by a single dollar sign on each side of the variable. If the variable is followed by a
punctuation mark such as a comma, semicolon or period, you can include the period within the dollar signs.
Example:
The variables $a, b$ and $c$ are used to indicate the lengths of the triangle $ABC$.
Numbers
Numbers do not need to be surrounded by dollar signs if they appear alone in a sentence with no related
math symbols. But if a number is part of an equation that includes an equals sign, =, or a mathematical
operator such as a plus sign, minus sign, multiplication symbol, or division symbol, then the entire
expression should be surrounded by dollar signs.
Equals sign
Any math expression that includes an equals sign must be surrounded by dollar signs
Arithmetic symbols
Any math expression that includes a plus sign, a minus sign, a multiplication symbol or a division symbol
must be surrounded by dollar signs.
Spaces
Use the \quad command to create spaces in math expressions.
Fractions
There are two ways to typeset fractions
2. A fraction can be typeset using the \frac{ }{ } command, where the numerator of the fraction appears
within the first set of braces and the denominator appears within the second.
This command is very useful and can be used with numbers and algebraic expressions.
Examples
$\frac{1}{2}$
$$\frac{a + b}{c + d}$$
To type other roots you add an extra parameter to the square root command: \sqrt[n]{ }. The [n] parameter
uses square brackets, not braces, and indicates which root is being extracted.
Examples:
$5^2 = 25$
The temperature today was $25^\circ" Celsius.
Subscripts
Subscripts are typed using the underscore character, _.
Example: The table entries $a_1, a_2$ and $b_1$ are all equal to 0.
Greek letters
Greek letters are sometimes used as variables in math textbooks. They are most often used to represent
angles in trigonometry sections.
Degrees
We use the degree symbol to denote angle measurements and temperatures. To typeset the degree symbol
we combine two Latex commands, the superscript carat, ^, and the circle, \circ.
The three dots indicate that the numbers continue on in the same pattern.
Angles
In geometry textbooks, the symbol, angle, is used to indicate that a certain variable represents an angle. To
typeset his angle symbol, type: \angle
Set theory symbols
Two commonly used symbols in set theory are the union symbol and the intersection symbol.
Function names
Some commonly used mathematical functions are represented by three-letter abbreviations that are in
regular text format (not in italics). These abbreviations often appear in mathematical expressions, but since
all text in mathematical expressions that are surrounded by dollar signs is set in italics, we need a
convenient way to be sure that these function names are not set in italics. To do this we use special Latex
commands.
Here are some common function names:\cos, \csc, \exp, \ln, \log, \sin, \tan. By using these special
commands we prevent them from being typeset in italics.
Exercises
Many numbered exercises include multiple individual problems which are identified with lower-case
alphabetical letters. These letters should be set in text mode.
Example:
Draw figures showing the following angles placed in standard position; determine the quadrant in which
each angle lies; use a protractor, and mark the angles with curved arrows:
(a) $30^\circ$; (b) $135^\circ$; (c) $210^\circ$; (d) $315^\circ$; (e) $-50^\circ$; (f) $-120^\circ$; (g) $-
330^\circ$; (h) $405^\circ$.
Finding errors
Common errors include:
One common source of error is not having matching dollar signs. Every dollar sign that starts a
mathematical expression must be matched by another dollar sign that ends the mathematical expression. It's
very easy to forget a dollar sign, and doing so leaves the other dollar sign unmatched.
2. Unbalanced braces
Another common error is to forget to use a closing brace for those commands that use braces.
Correcting errors
1. Look at the error messages
If you precede a line of Latex typesetting with a percent sign, %, that line will not be processed by the
Latex program. This feature is often taken advantage of to leave comments in the .tex file that explain why
certain things were done a certain way. But it can also be used as a way to find errors in your text.
The Format menu option of the window that I paste my Latex typesetting into has options for Commenting
and Uncommenting a block of text. I select the text first, then I choose Format > Comment, and a percent
sign is put in front of every line I have selected. And all the lines are then displayed in a red color.
When I then run Latex, none of those lines will appear in the PDF output. If I want the text to appear in the
output, I can select the text again and choose Format > Uncomment, and then run Latex.
This ability to easily Comment and Uncomment a block of text can be used as a way to find errors in the
text. For example, if I have an error somewhere in my text, I can begin by Commenting the first half of the
text and then running Latex. If it runs without error, then I know that the error must be in the half that I
Commented. If it doesn't output okay, then I know that the error is in the half of my text that I didn't
comment.
Once I know which half of the text the error is in, I can then Comment half of that half, and thereby narrow
down the error to one half of one half of the text (or one quarter of the text). I can keep doing this until I
find the line that is causing the error. This process of narrowing down the error to half of the text, and then
to half of half of the text, and so on is called a binary search.
This method assumes that there is only one error in the text and it doesn't work for every kind of error.
If your Latex program doesn't allow you to Comment blocks of text, you can just delete half of the text and
see if Latex can process the remaining half. (Be sure to keep a copy!) It's the same principle, but you have
to keep swapping blocks of text in and out of the Latex window.