Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
8Activity
0 of .
Results for:
No results containing your search query
P. 1
Latex Advanced

Latex Advanced

Ratings: (0)|Views: 548|Likes:
Published by Kasu_777

More info:

Published by: Kasu_777 on Jun 10, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/04/2010

pdf

text

original

 
AdvancedL
A
TEX
Tim LoveAugust 30, 2006
Thisdocumentfollowsonfromthe
Word processingusing L
 A
EX
1
doc-ument. It describes the features of L
A
TEX that people at CUED are mostlikely to use. Further information is available from the LaTeX helppage
2
andinthebooks availableforloanfromtheoperatorsinthe
DPO
.Comments and bug reports to Tim Love (tpl@eng.cam.ac.uk).
Contents
1 L
A
TEX Concepts 2
1.1 Environments and commands . . . . . . . . . . . . . . . . . . . . . . . 21.2 Classes and packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Files created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 How to use L
A
TEX at CUED . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Document structure 5
2.1 Counters and Length parameters . . . . . . . . . . . . . . . . . . . . . 52.2 Document and page organisation . . . . . . . . . . . . . . . . . . . . . 62.3 Pagebreaks, footnotes, etc . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Color and Fonts 9
3.1 Colored text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.3 Font Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.4 Font Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.5 Postscript Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.6 Font attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.7 Selection commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/latex basic/latex basic.html
2
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/LaTeX intro.html
Copyrightc
1999-2006 by T.P. Love. This document may be copied freely for thepurposes of education and non-commercial research. Cambridge University Engi-neering Department, Cambridge CB2 1PZ, England.1
 
1 L
A
X CONCEPTS 
4 Environments 14
4.1 Alignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2 Listing Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3 Tabular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.4 Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.5 Pictures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.6 Maths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.7 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.8 Tabbing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.9 Verbatim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.10 Quote, abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.11 Letter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.12 Curriculum Vitae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Customising 20
5.1 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.2 Modications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.3 New Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.4 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.5 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6 More Information 22
1 L
A
TEX Concepts
Writing a L
A
TEX document is rather like writing a program. This makes using L
A
TEXmore difficult in some respects than using a word processor, but there are advan-tages too. For instance creating a table of contents is trivial. Beginners often useunnecessary ‘
\\
’ sequences and write ‘
{\large \textbf{2.1 Method}}\\
when ‘
\subsection{Method}
’ would be much better. Users who think theyknow more about typesetting than L
A
TEX (those who, for example, like underlin-ing) will waste a lot of time too.If you find you’re adding many L
A
TEX constructions you might save time in thelong run by familiarising yourself with the packages (add-ons) described in thepackages
3
section of the online L
A
TEX page. You could even write your own macrosand add-ons.
1.1 Environments and commands
L
A
TEX is a macro-packagefor TEX which has many preset
environments
where muchof the setting up that TEX users have to do explicitly is done for you. An environ-ment has the form
\begin{
environment name
}
3
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/LaTeX intro.html#Packages
2
 
1 L
A
X CONCEPTS 1.2 Classes and packages
.
\end{
environment name
}
L
A
TEX also has commands which affect the formatting of the document. Theirarguments are given in braces. For example,
\textit{This is much more important} than this.
produces as output
This is much more important
than this.The related
\itshape
command doesn’t take an argument. It affects all thesubsequent text in the environment where it’s used.L
A
TEX tries to enforce the idea that the visual appearance of the document (useof fonts, indentation, etc)should derivefrom the logical structure of the document(
i.e.
rather than manually putting the section titles into bold, you should let the
\section
command do it). Resisting this philosophy can lead to extra (usuallyunnecessary) work.L
A
TEX is expandable. Many macros can be loaded in to provide added features.You can also create your own commands and environments. Commands can takearguments that modify their action
Some commands have a
*-form
, a variant on the standard command thatyou get by adding a
*
to the command name.
Mandatory arguments are enclosed in
{}
braces
Optional arguments are enclosed in
[ ]
brackets.
1.2 Classes and packages
At the top of your file you will have a line something like
\documentclass[12pt]{article}
which determines the font size and document class – the type of document you’rewriting. Each class has an associated
*.cls
file in the system directories which isread in at start-up time. Other options accepted by
article
include
10pt
,
11pt
and
twocolumn
.Thenyou’llprobablyneedtoloadinextramacroswiththe
\usepackage
com-mand. Each package has an associated
*.sty
file in the system directories. Thepackages inherit the options from the
\documentclass
line and can be givenothers of their own.
E.g.
\usepackage[dvips]{graphicx}\usepackage[dvips]{color}
tells L
A
TEX that you want to use the extra
graphicx
and
color
macros, and thatyou are going to use
dvips
to convert the resulting file to postscript. You canshorten this to
\usepackage[dvips]{graphicx,color}
3

Activity (8)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
shalfordus liked this
sameera_man liked this
razeghi liked this
ramport liked this
manisha20m liked this
jeanzera liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->