Writing A Paper in Latex
Writing A Paper in Latex
A
T
E
X
Joe Struss
Jan. 28, 2011
Contents
1 Creating a Paper
The Basics 3
1.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 The Document Wrapper . . . . . . . . . . . . . . . . . . . . . 3
1.3 The Document . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Making Changes to a Paper 7
2.1 Common Documentclass Options . . . . . . . . . . . . . . . . 7
2.2 Style Alterations to a Documentclass . . . . . . . . . . . . . . 7
2.3 Helpful Document Commands . . . . . . . . . . . . . . . . . . 9
2.4 Additional L
A
T
E
X Packages . . . . . . . . . . . . . . . . . . . . 10
3 Other Parts of the Paper 12
3.1 Title Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Dividing your paper into parts . . . . . . . . . . . . . . . . . 13
4 Mathematics Power 14
4.1 Lining up on a decimal point . . . . . . . . . . . . . . . . . . 16
4.2 Under-/Over-Brackets and Parentheses . . . . . . . . . . . . . 17
4.3 Hypothesis and Bold Lowercase Greek Characters . . . . . . 18
4.4 Putting a Box around a Parbox with Math Formula . . . . . 19
4.5 The Amsmath and Latexsym Packages . . . . . . . . . . . . . 20
5 Accents and Writing in Espa nol with the Babel Package 21
5.1 General L
A
T
E
X Accents and Babel . . . . . . . . . . . . . . . . 21
5.2 Using Spanish Babel: An Extended Example . . . . . . . . . 22
1
6 Creating a Presentation with L
A
T
E
X 24
6.1 The Slides Documentclass . . . . . . . . . . . . . . . . . . . . 24
6.2 The Beamer Documentclass . . . . . . . . . . . . . . . . . . . 26
6.3 3-D Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
A Font Types and Styles 28
B PDF Files and .EPS Graphics 29
C General L
A
T
E
X Information 30
D Basic L
A
T
E
X on a UNIX System 31
References 33
2
Chapter 1
Creating a Paper
The Basics
1.1 Getting Started
If you are using L
A
T
E
X on a Windows or Macintosh, you would normally cre-
ate your document in the editor provided with the TeXnicCenter, TeXWorks
or TeXShop software then compile your .tex document using the PDFL
A
T
E
X
compiler by pressing a Build or Compile button. If there are any errors,
you would need to correct them and then re-compile the document. If the
document compiles correctly, you should simply be able to view the result-
ing .pdf le or in most cases it will be displayed to you. See [4] for more
information.
1.2 The Document Wrapper
The rst thing you need to do in a L
A
T
E
X document is to tell L
A
T
E
X the type
of document that are creating this is known as choosing a documentclass.
You do this with the \documentclass{class} command. There are ve ba-
sic document classes: book, report, article, slides and letter. The report
and article classes are good for short papers while book is good for longer
papers. Letter and slides are more specic purpose docummentclasses. Let-
ter is used for communications and memos while the slides class is used to
produce presentational slides.
The only other thing that L
A
T
E
X really needs to know is where your doc-
ument begins and ends. Basically you put a wrapper around your document
with the \begin{document} and \end{document} commands.
3
documentclassreport
begindocument
enddocument
1.3 The Document
1.3.1 Paragraphs
Between the begin{document} and \end{document} commands, who put
in the paragraphs for your document. Simply insert one or more blank lines
which signals to L
A
T
E
X to start a new paragraph. L
A
T
E
X ignores the way you
format your sentences on a line and just looks for a paragraph break and
then strings together all the lines that compose a particular paragraph:
documentclassreport
begindocument
Here is the rst sentence of
my document.
Here is my second sentence.
After a paragraph break, I start
a new sentence.
I can put just
one
word
per line if I want to do so.
It makes no dierence at all to L
A
T
E
X.
enddocument
1.3.2 Special Characters
Watch out for the characters: &, #, $, %, , , , , and . These are special
reserved characters in L
A
T
E
X. If you want to use one of these characters in a
document, you will need to put a in front of them. For example: $ will
put a $ into a document. Additionally, you need to put after and or
these characters get squeezed too much by the characters around them like
this \~{}.
The other special characters are: +, =, [, <, > and . These special char-
acters are only available in math mode so you have to put $s around them
in order to use them. For example: $+$ will put a + into a document.
4
Additionally, since the is also the symbol for a reserved character, if you
actually want to use a character in a document- besides just being in math
mode you will also need to add the word backslash after the . This ends up
looking like this in a document: $\backslash$ which is a lot of work just
to get a . Youre actually encouraged in L
A
T
E
X to use the \newcommand
command to make an alias for a group of L
A
T
E
X commands that you often
use and thats what people often do for a . For instance, you could enter in
the preamble: \newcommand{\bs}{\ensuremath{\backslash}} to use \bs
for backslash in your document.
1.3.3 Quotes
L
A
T
E
X uses angular quotes so beginning quotes like this: look dierent
than ending quotes like this: . The left single quote is normally next
to the 1 key on the keyboard while the right single quote key is the normal
quote (or apostrophe key) next to the ; key.
Never use the double-quote key when creating a L
A
T
E
X document unless
you want an umla ut or some other non-english character. Use two beginning
quotes followed by two ending quotes instead or your quotes may look
funny as they will both be angled in the same direction.
1.3.4 Dashes
There are three types of dashes available in L
A
T
E
X. For a word dash, like in
x-ray, use a single hyphen -. For a range dash, like in 110, use two hyphens
in a row . And for a sentence dash, like this, use three hyphens in a
row . The hyphens that are showing here are a little more spaced out
than normal so that they can be seen.
1.3.5 Emphasis and Bolding Characters
Use \emph{word} command to emphasize a word or phrase in your docu-
ment. Use \textbf{word} to bold a word or phrase in your document.
There are a variety of other font changes that you can make in L
A
T
E
X.
These additional font styles are listed in Appendix A. Here are some exam-
ples.
To italicize the word dog, you would normally use the command in a
closed form for italic shape which is textit{dog}. You could also use
the declaration in an open form which would be {itshape dog }. The
itshape in an open form would more commonly be used to italicize an
5
entire paragraph. The paragraph would start with itshape and end with
upshape.
Type style changes only occur in an open form known as a declaration. For
instance, to create elephant in a very small font you would use {tiny elephant
}. You could also use tiny elephant normalsize which would get you the same
result. You could make the text in a paragraph a little smaller by using small
at the start of the paragraph and then normalsize at the end it like what was
done for this paragraph.
There are nine dierent text sizes, three additional shapes, one additional
series and two additional font families that come standard with L
A
T
E
X and
are dependent on the point size with which you begin your document. Stan-
dard point sizes are 10 point (default), 11pt and 12pt. Play around with
changing L
A
T
E
X font shape, series, sizes and styles until you are comfortable
with making changes to them.
1.3.6 Full Example Document
Here is an example document that shows paragraphs, some special char-
acters, quotes, dashes, emphasis and bolding. Try compiling this sample
document with L
A
T
E
X yourself:
documentclassreport
begindocument
And in conclusion
this ultimately showed that
the direct line of support for
the fth division
was emphparamount in
achieving victory.
The 2$+$2 protocol was
used in sending coded messages
during this textbfdecisive conict.
enddocument
Which looks like the following when processed by L
A
T
E
X:
And in conclusion this ultimately showed that the direct line of support
for the fth division was paramount in achieving victory.
The 2+2 protocol was used in sending coded messages during this deci-
sive conict.
6
Chapter 2
Making Changes to a Paper
2.1 Common Documentclass Options
2.1.1 Altering the Base Font Size
You can add options in [ ]s to the documentclass line in order to make base
level changes to a document class. For instance, a L
A
T
E
X document defaults
to a 10pt font size. To change the font size to a base 11pt or 12pt font, you
would add [11pt] or [12pt] to the document line as follows:
\documentclass[11pt]{report}
2.1.2 Making a Twocolumn Paper
Another option you can add is [twocolumn] which when added to a 12pt
base font article class document would look like this:
\documentclass[12pt,twocolumn]{article}
Once this option is in place, your paper will start in two columns.
To switch back to a one column style in a two column document enter
\onecolumn. Once you are in the one column form, you can get back to
two column form by entering \twocolumn. Note: You will get a page break
whenever you use \onecolumn or \twocolumn.
2.2 Style Alterations to a Documentclass
You put in the pramble area of your L
A
T
E
X document those changes or al-
terations that aect your entire document or paper. The preamble area is
between the \documentclass line and the \begin{document} line.
7
documentclassreport
=Preamble stu goes here.
begindocument
2.2.1 Altering the Margins
Changing the Side Margins
The easiest way to change the side margins in L
A
T
E
X is to alter the length
of a full line of text on the page. Just enter:
\setlength{\textwidth}{6 in}
in the preamble of your paper.
The textwidth can be specied in inches (in) or centimeters (cm) when
followed by the appropriate unit of measure.
Changing the Top and Bottom Margins
Just like changing the side margins, the easiest way to change a top or
bottom margin in L
A
T
E
X is to alter the length of the height of the text on
the page. Just enter:
\setlength{\textheight}{9.5 in}
in the preamble of your paper.
The textheight can be specied in inches (in) or centimeters (cm) when
followed by the appropriate unit of measure.
Making the Margins as Narrow as Possibile
If you just want just about as big of a standard page as you can get enter:
\usepackage{fullpage}
in your preamble. The fullpage package automatically sets the smallest
margins for a standard size page.
2.2.2 Altering Document Spacing
You can alter the document spacing by adding the following line to the
preamble of your document or paper:
\renewcommand{\baselinestretch}{Factor}
where Factor is any decimal number. The default factor = 1 so a factor
of 1.5 would be a 50% increase in the amount of space between lines in
your document. Common factor values are 1 for single-spacing, 1.25 for
traditional one and one-half spacing and 1.667 for traditional double-spacing.
8
Another way to alter document spacing is to use the setspace package:
\usepackage{setspace}
The setspace package denes fours commands for you: singlespacing, doublespacing.
onehalfspacing, and setstretch{size}. You can then use these com-
mands in your document to alter your document spacing.
2.3 Helpful Document Commands
Here are some additional L
A
T
E
X commands for altering your document:
newpage =Forces L
A
T
E
X to go to a new page.
newline =Starts a new line within a paragraph.
indent =Used at the start of a paragraph
=to force paragraph indentation.
noindent =Used at the start of a paragraph
=to stop paragraph indentation.
footnoteFootnote here. =Creates a footnote.
centerlineLine to Center. =Center a single line.
hspace 1 in =Creates 1 inch of horizontal space
=within a paragraph.
vspace-.1 in =Creates -.1 inch of vertical space
=before the next paragraph.
The quotation environment indents a section of text an equal amount
from both sides of the page:
beginquotation
The sands of time will denote well
the undertakings and accomplishments
that we do or do not full here today.
endquotation
The sands of time will denote well the undertakings and ac-
complishments that we do or do not full here today.
The center environment allows you to produce one or more lines of cen-
tered text on a page:
begincenter
First line of text.
A second line which is longer.
The last line of text.
endcenter
First line of text.
A second line which is longer.
The last line of text.
9
2.4 Additional L
A
T
E
X Packages
2.4.1 Font Packages
Getting dierent fonts to load into L
A
T
E
X has been dicult to do in the past.
To make this easier to accomplish, the following font packages were created
for use in the preamble of your L
A
T
E
X document:
times, newcent, palatino, bookman and helvet
So to use the times package, one would enter usepackage{times} in
the preamble of a document and then the fonts used in your document
would be from the Times Roman font family. Note: Not all font packages
are available in all versions of L
A
T
E
X.
2.4.2 Color Package
The color package in a PDF document can be used to add a splash of
color here or there to make your document a little more interesting and
appealing to the reader. To use the color package in a PDF document, add
the following line to the preamble of your document:
\usepackage[usenames,dvipsnames,pdftex]{color}
You can then use the following commands in your document: colorclr,
textcolorclrTEXT, colorboxclrTEXT, pagecolorclr, and also
fcolorboxline-clrclrTEXT; to change the standard color, textcolor
and pagecolor within your document.
The standard document colors are: black, yellow, red, blue, magenta,
green and cyan. The additional colors that you can use are: GreenYellow,
Yellow, Goldenrod, Dandelion, Apricot, Peach, Melon, YellowOrange, Or-
ange, BurntOrange, Bittersweet, RedOrange, Mahogany, Maroon, BrickRed,
Red, OrangeRed, RubineRed, WildStrawberry, Salmon, CarnationPink, Ma-
genta, VioletRed, Rhodamine, Mulberry, RedViolet, Fuchsia, Lavender,
Thistle, Orchid, DarkOrchid, Purple, Plum, Violet, RoyalPurple, Blue-
Violet, Periwinkle, CadetBlue, CornowerBlue, MidnightBlue, NavyBlue,
RoyalBlue, Blue, Cerulean, Cyan, ProcessBlue, SkyBlue, Turquoise, Teal-
Blue, Aquamarine, BlueGreen, Emerald, JungleGreen, SeaGreen, Green,
ForestGreen, PineGreen, LimeGreen, YellowGreen, SpringGreen, OliveG-
reen, RawSienna, Sepia, Brown, Tan and Gray. The complete list in color
can be found at: http://en.wikibooks.org/wiki/LaTeX/Colors.
Heres a simple text color example:
Hello. \color{red} Good-bye. \color{black} Hello again.
which would produce:
Hello. Good-bye. Hello again.
10
2.4.3 Graphicx Package
The graphicx package is the standard package which most people use to
add a graphic or two to a L
A
T
E
X document. If you are producing a PDF
document with L
A
T
E
X then you are limited to using common web graphic
types like .jpg, .gif, .pdf and .png for use in your document. To use the
graphicx package, add the following to the preamble of your document:
usepackage[pdftex]{graphicx}
Then within you document to add your graphic enter:
\includegraphics{graphicname.type}
Heres an example of putting a graphic into a document. To put a graphic
named sprhub.jpg into your document, after you added the graphicx package
to the preamble, you would add the following line to your document:
\centerline{\includegraphics{sprhub.jpg}}
which would produce something like this:
2.4.4 Hyperref Package
The hyperref package adds hypertext links in your PDF document between
your Table of Contents, bibliographies and page-references. The hyperref
package has a lot of options but can be used in your preamble in a very
plain way:
usepackage[pdftex]{hyperref}
or here are the options that were used in the preamble of this document:
\usepackage[pdftex,hypertexnames=false,linktocpage=true]{hyperref}
\hypersetup{colorlinks=true,linkcolor=blue}
11
Chapter 3
Other Parts of the Paper
3.1 Title Page
To add a title page to your paper, just add the following lines to your doc-
ument just after the \begin{document} line:
titleTitle of Your Document
authorYour O. Name
dateJuly 4, 1996
maketitle
You can leave out the date command and L
A
T
E
X will automatically put in
todays date. Additionally you can break a title into multiple lines by using
s and you can have more than one authors name inside of author if
you connect the names with the and command. The title page that L
A
T
E
X
creates is somewhat dierent for each individual document class. To add a
Table of Contents, place tableofcontents after the maketitle command.
3.2 Bibliography
To add a bibliography to your paper with citations you can reference in your
document, add the following to the end of your document:
beginthebibliography9
bibitemlabel1 Joe Struss. Wanderer.
AddisonWesleyScott Co., Inc., NY, NY, 1984.
bibitemlabel2 Sam Anders. CEIA the book.
Nick/Time Publishing, NY, NY, 1994.
endthebibliography
12
Now if I wanted to reference my label1 citation in a paper, I would use the
citelabel1 command and add something like For further information see
citelabel1 and citelabel2 to my document. When this is processed
by L
A
T
E
X it comes out like For further information see [1] or [2].
3.3 Mathematics
Mathematics is what L
A
T
E
X does best! A $ enters you into a simple math
mode in L
A
T
E
X while the next $ will bring you back out again. Here are
some basic things you can do while in math mode:
Use to superscript: $A23$ =A
23
Use to subscript: $B b3$ =B
b3
Use fractopbottom to make a fraction: $frac345$ =
34
5
Use sqrt to create a square root: $sqrt42$ =
42
Do: $sum i=2n b i$ to create =
n
i=2
b
i
Do: $int ac f(x) dx$ to create =
_
c
a
f(x)dx
There are also lots of special symbols in math mode including a full line
of greek symbols like beta and psi . More information on math mode
is available in Chapter 4 or in any standard L
A
T
E
X manual.
3.4 Dividing your paper into parts
The following sectioning commands are available in L
A
T
E
X to formally divide
your paper up into separate parts or units:
part subsection paragraph
chapter subsubsection subparagraph
section
So if you wanted to start a new chapter named Overview you would en-
ter: chapterOverview. Normally, you start at the chapter level and work
your way down through section, subsection, subsubsection. . . from there.
Warning: Some document classes do not support all levels of sectioning.
For instance, the article document class does not allow either the part or
chapter sectioning levels.
Once you have established sections, you can use labelnlabel and
refnlabel to reference your sections. Just put a label command directly
after a section that you would like to label and then use ref to reference
that label. For instance, I labeled the mathematics section of this chapter
with a labelmath command so I can now use the refmath command
to say see Section 3.3 for some basic mathematics information.
13
Chapter 4
Mathematics Power
Mathematics is at the heart of what T
E
X and L
A
T
E
X do best! Below are some
examples of math modes that are available in L
A
T
E
X. For more complete
mathematical information, see the source books listed after the Appendix.
4.0.1 In-text mathematics
Use $ . . . $ or ( . . . ) to create mathemathematics within a line of text, like
this: $A^{43}$ (which produces A
43
) by using $ to get into math mode and
then another $ to exit math mode. While in math mode, you can use to
produce superscripts and to produce subscripts but if you have more than
one character as a superscript or subscript then you have to enclose your
superscript or subscript in braces . Here are some example:
Variable $D7$ shows =Variable D
7
shows
Here $Y a$ relates =Here Y
a
relates
This shows: $A43$ =This shows: A
43
Here $B 150$ is true. =Here B
150
is true.
4.0.2 Display mathematics
Use [ . . . ] to create mathematics that are set apart from your textual
material. For instance, you can use fracnumdenom to create a L
A
T
E
X
large fraction. So an in-text fraction, would look like this
43x
1698
, while a
display math fraction would look like this:
43x
1698
14
Here are some more examples that use superscripts, subscripts, frac,
sqrt (square root
42), and ldots (ellipsis . . .):
\[ \frac{A^{123} - 7}{T_5} \] = A
123
7
T
5
\[ \frac{1}{\sqrt{75}\ldots\sqrt{123}} \] =
1
75 . . .
123
4.0.3 Mathematical symbols and fonts
There are a large variety of mathematical symbols available in math mode
in T
E
X and L
A
T
E
X. Listed here are just a few standard examples:
\alpha \beta \gamma \theta
\Sigma \Phi \Omega \Psi
\dagger \odot \star \circ
\leq \geq \subset \supset
. . . \ldots \cdots
.
.
. \vdots
.
.
. \ddots
\equiv \approx ,= \neq
.
= \doteq
\leftarrow \rightarrow \Leftarrow \Rightarrow
\triangle \infty \backslash \exists
\sum
_
\int
\prod
\coprod
\bigodot
\bigotimes
\bigcup
\bigsqcup
You can put a slash through a symbol by putting a \not before it. Some
additional mathematical symbols (like ; and 1) are available by using the
latexsym package. See any standard L
A
T
E
X book (like [1] or [2]) for a com-
plete list of mathematical symbols available in L
A
T
E
X. L
A
T
E
X also provides
the following commands for changing type styles in math mode:
italic: 3i \mathit{3i\pi} roman: 3i \mathrm{3i\pi}
sans serif: 3i \mathsf{3i\pi} typewriter: 3i \mathtt{3i\pi}
bold: 3i \mathbf{3i\pi} \boldmath$\Psi$\unboldmath
4.0.4 Other mathematical examples
Here are a few more examples of additional math modes in L
A
T
E
X:
\[ \lim_{n \rightarrow \infty} x = 1 \] =
lim
n
x = 1
15
\[\overbrace{w+\underbrace{x+y}_b+z}^a\] =
a
..
w + x + y
. .
b
+z
\begin{equation}
x \ll y_{2} + \cdots + y_{n}
\end{equation}
=
x y
2
+ + y
n
(4.1)
\[ \begin{array}{cll}
a+b+c & xy & x-y \\
d+e & yz & y-z \\
f & xz & z-x
\end{array} \]
=
a + b + c xy x y
d + e yz y z
f xz z x
\begin{eqnarray}
x & = & 127y \\
y & > & a+b+\cdots+m+\nonumber\\
& & n+o+p+q
\end{eqnarray}
=
x = 127y (4.2)
y > a + b + + m +
n + o + p + q (4.3)
Use eqnarray* instead of eqnarray to produce an equation array with-
out equation numbers.
\usepackage{subeqn} can also be used in the preamble of your docu-
ment to control subequation numbering. Then you can then use \subequations
to start subequation numbering, \newsubequation to start a new set of
subequations, or \nosubequations to turn o subequation numbering; at
the start of a subequation line. Subequation numbering can span separate
environments and can be turned o in a dierent environment than where
it began. The \label and \ref commands can be used in subequations.
Additionally, the subeqn package allows you use the \eqlabel command
instead of \label, which allows you to refer to the whole equation at once.
\eqlabel can be used anywhere within the subequation.
4.1 Lining up on a decimal point
Since LaTeX uses proportional-pitched fonts with dierent sized letters/numbers,
it is normally dicult to align a group of numbers on a decimal point. One
way to do this is to use the typewriter font which is a xed-pitch font, while
another way is to use the exact same number of letters on each side of the
decimal point. A more satisfactory way to do this in a tabular environ-
ment is to split a number across two columns with a [email protected] and then use the
\multicolumn command to span columns in the header. For example:
16
[email protected]@[email protected]
Group & multicolumn2cReading
& multicolumn2cWriting
Fifth Grade & 3&32 & 76&52
Sixth Grade & 219&927 & 114&9542
endtabular
=
Group Reading Writing
Fifth Grade 3.32 76.52
Sixth Grade 219.927 114.9542
You can also use @{\extracolsep{\fill}} as a tabular formatting option
to ll up blank areas in xed width tables (tabular*).
4.2 Under-/Over-Brackets and Parentheses
In standard L
A
T
E
X you can horizontally brace together a standard mathmat-
ical expression with \underbrace and \overbrace, as follows:
$\underbrace{a + \overbrace{b + \cdots + y}^{24} + z}_{26}$
which produces:
a +
24
..
b + + y +z
. .
26
Additionally, there is a L
A
T
E
X package at Iowa State called mathbarr
(available from http://css.ait.iastate.edu/Tex/Local/) that allows you
to horizontally group together a mathematical expression using a bracket or
a parenthesis, as well as the standard brace. Just add the mathbarr package
statement to the preamble of your document:
\documentclass{article}
\usepackage{mathbarr}
\begin{document}
Once you do that, the following commands are available for your use: \overbrack,
\underbrack, \overparen and \underparen. The use of the \overbrack,
\underbrack, \overparen and \underparen are much the same as the
\overbrace and \underbrace commands as shown:
$$ \overbrack{x+\cdots+x}^{k\rm\;times} \qquad
\underbrack{x+y+z}_{>\,0} \qquad
\overparen{x+\cdots+x}^{k\rm\;times} \qquad
\underparen{x+y+z}_{>\,0}$$
which produces:
17
k times
x + + x x + y + z
>0
k times
x + + x x + y + z
. .
>0
The resultant grouping brackets and parentheses look a bit thick but are
the exact same thickness as with the standard braces.
4.3 Hypothesis and Bold Lowercase Greek Char-
acters
Two mathematical problems in L
A
T
E
X are creating hypothesis and bold,
lowercase greek characters.
4.3.1 Hypothesis
You can create your own environment in L
A
T
E
X for stating a hypothesis or
theorem. For this type of problem, create a hanging indent style theorem
by using the \newtheorem command in the preamble of your document:
\newtheorem{guess}{Hypothesis}[chapter]
Then, for each hypothesis enter:
\begin{guess}
\begin{minipage}[t]{4.5 in}
This is my theory which is correct which shows that my theory is correct and
it belongs to me and thus no one else. I composed this theory using two
separate experiments which I also created which are not contained in this
document at all.
\end{minipage}
\end{guess}
The output from my above example would look like this:
Hypothesis 4.1 This is my theory which is correct which shows that my theory is
correct and it belongs to me and thus no one else. I composed this
theory using two separate experiments which I also created which are
not contained in this document at all.
The \newtheorem command allows you to create an environment, which
you name (in my example I named it guess), that will create for you a
theorem-like environment that may optionally be numbered at a specied
18
sectional unit level (in my example I numbered it at the chapter level).
The \newtheorem command declaration should be placed in the preamble
(between the \documentclass line and the \begin{document} line) but
can also be placed anywhere in your document before the environment that
it creates is used. The minipage command used with the \newtheorem
environment gives the hanging indent-style output that major professors
and thesis committee members often look for in a thesis-style paper.
4.3.2 Bold, Lowercase Greek Characters
Bold, lowercase greek characters used to be troublesome to create in L
A
T
E
X but
now the current version of L
A
T
E
X makes it much easier to get these char-
acters. To get an uppercase greek bold letter, simply use \mathbf such as
$\mathbf{2^{ft} \Psi \psi}$ to produce:
2
ft
This gets you bold uppercase greek letters but not bold lowercase greek
letters. To get bold lowercase greek letters, you need to use the \boldmath
command instead such as \boldmath $2^{ft} \Psi \psi$ \unboldmath
to produce:
2
ft
A
\L = L ! = \ae = \o =
\ss = \AE = \O = \dag =
\S = \copyright =c _ \ddag = \P =
\pounds = \i = \j = \={\i} =
However, if you are going to be writing a long passage or an entire document
in a language other than English then standard L
A
T
E
X can be cumbersome. There
is a package called babel which allows you to make another language standard in
an English L
A
T
E
X document. An example of spanish Babel follows but the current
full version of L
A
T
E
X contains language les for: Afrikaans, Bahasa, Basque, Breton,
Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Esparanto, Estonian,
Finnish, French, Galician, German, Greek, Hebrew, Hungarian, Icelandic, Interlin-
gua, Irish Gaelic, Italian, Latin, Lower Sorbian, North Sami, Norwegian, Polish,
Portuguese, Romanian, Russian, Scottish Gaelic, Spanish, Slovakian, Slovenian,
Swedish, Serbian, Turkish, Ukrainian, Upper Sorbian and Welsh. . . and others.
21
To load a babel package, use:
\usepackage[spanish,english]{babel}
If you list more than one babel option, the last option that you choose will
be active when your document begins. You can switch to another language,
like I did for this chapter, by using the \selectlanguage command:
\selectlanguage{spanish}
General babel package information and some specic language informa-
tion can be found in The L
A
T
E
X Companion ([3]). Specic package infor-
mation can be found at CTAN (the Comprehensive T
E
X Archive Network:
http://www.ctan.org/tex-archive/macros/latex/required/babel/.
5.2 Using Spanish Babel: An Extended Example
Hola! The easiest way to create a document in Spanish with L
A
T
E
X is to use
the spanish option within the Babel package:
\usepackage[spanish]{babel}
which is normally placed in the preamble to your document.
The spanish babel package automatically changes all the heading and
titling information that L
A
T
E
X creates for your document into Spanish. For
instance, L
A
T
E
X changes gures from Figure to Figura, a Table gets chan-
ged to a Tabla and the Table of Contents becomes
Indice General.
The spanish babel package also includes some shorthand options for
writing in Spanish as well as also including the standard Spanish symbols
available in normal L
A
T
E
X. Table 5.1 shows a summary of all Spanish symbols
available in the L
A
T
E
X spanish babel package.
Here is an example of a paragraph written with spanish babel: