Chapter1 Template
1.1Howtocompilea
1.1.1Tools
Toprocessthefilesyou(may)need:
• pdflatex (forexamplefrom tetex package ≥ 0.9-6,whichyoucan getfrom RedHat5.2);
• acroread (aPDFviewer,availablefrom http://www.adobe.com/);
• ghostscript ≥ 5.10 (forexamplefromRedHatContrib)and ghostview or gv (fromRedHatLinux);
• efax packagecouldbeuseful,ifyouplantofaxdocuments.
1.1.2Howtousethetools
Followthesesteps:
1. putallsource .tex filesinonedirectory,thenchdirtothedirectory(orput someofthemintheLATEXsearchpath—ifyouknowhowtodothis);
2. run“pdflatexfile.tex”onthemainfileofthedocumentthreetimes (three—topreparevalidtableofcontents);
3. toseeorprinttheresultuse acroread (unfortunatelysomeversionsof acroread mayproducePostScriptwhichistoocomplex),or
4. run ghostscript:“gvfile.pdf”todisplayor: “gs-dNOPAUSE-sDEVICE=pswrite-q-dBATCH-sOutputFile=file.psfile.pdf” toproduceaPostScriptfile;
5. run“faxsendphone-numberfile.ps”asroottosendafax,or—ifyou knowhowtodothis—modifythe fax scripttobeabletofax .pdf filesdirectly (youhavetoinsert“|%PDF*”somewhere...).
1.2Howtowriteadocument
1.2.1Themaindocument
Choosethenameofthedocument,say document.Copy template.tex to document.tex,theneditit,changethetitle,theauthorsandsetproperinclude(s)forallthechapters.
1.2.2Chapters
Eachchaptershouldbeincludedinthemaindocumentasaseparatefile.Youcan chooseanynameforthefile,butwesuggestaddingasuffixtothenameofthe mainfile.Forourexampleweusethefilename document_chapter1.tex.
First,copy template_chapter.tex to document_chapter1.tex andaddtheline
\include{document_chapter1}
inthe document.tex,thenedit document_chapter1.tex,changethe chaptertitleandeditthebodyofthechapterappropriately.
1.2.3Spell-checking
Do useaspell-checker,please!
Youmayalsowanttocheckgrammar,styleandsoon.Actuallyyoushould doit(ifyouhaveenoughsparetime).Butyou must checkspelling!
Youcanusethe ispell packageforthis,fromwithin emacs,orfromthe commandline:
ispell-tdocument_chapter1.tex
1.3.LATEXANDPDFLATEXCAPABILITIES 7
1.3LATEXandpdfLATEXcapabilities
1.3.1Overview
Firstyouedityoursource .tex file.InLATEXyoucompileitusingthe latex commandtoa .dvi file(whichstandsfordevice-independent).The .dvi file canbeconvertedtoanydevice-dependentformatyoulikeusinganappropriate driver,forexample dvips.
Whenproducing .pdf filesyoushoulduse pdflatex,whichproducesdirectly .pdf filesoutof .tex sources.Notethatinthe .tex fileyoumayneed tousesomePDFspecificpackages.
Forviewing .tex filesuseyourfavouritetexteditor,forviewing .dvi files underXWindowSystemuse xdvi command, .ps filescanbeviewedwith gv (or ghostview)and .pdf fileswith acroread, gv or xpdf
1.3.2LATEX
Alotofexamplescanbefoundinthisdocument. Youshouldalsoprint
• doc/latex/general/latex2e.dvi and
• doc/latex/general/lshort2e.dvi
fromyour tetex distribution(usuallyin
• /usr/share/texmf or
• /usr/lib/texmf/texmf).
1.3.3pdfLATEX
Consult doc/pdftex/manual.pdf fromyour tetex distributionformore details.Veryusefulinformationscanbefoundinthe hyperref and graphics packagemanuals:
• doc/latex/hyperref/manual.pdf and
• doc/latex/graphics/grfguide.dvi.
1.3.4Examples
References
MIMUW
Hyperlinks
Thisisatarget. Andthisisalink.
Dashes,etc.
Therearethreekindsofhorizontaldash:
• -(useinsidewords;forexample“home-page”,“X-rated”)
• –(usethisonebetweennumbers;forexample“pages2–22”)
• —(usethisoneasasentenceseparator—likehere)
Nationalcharacters
• ó,é,í,...
• è,à,ì,...
• ô,ê,...
• õ,ñ,...
• ö,ë,...
• ˙z
• ˛a,˛e
• ł,ø,ß
Thereareotherwaystodothis,seethedocumentationfor inputenc package.
Reservedcharacters
Somecharactershavesomespecialmeaning,thuscannotbeenteredintheusual way.
• $&%#_{} • \ • ˜ˆ
Formoreexamplesandsymbolsseechapter3of lshort2e.dvi.
Fonts
• Roman
• Emphasis
• Mediumweight—thedefault
• Boldface
• Upright
• Slanted
• Sansserif
• SMALLCAPS
• Typewriter
• andsizes: – tiny
scriptsize
footnotesize
small
normalsize
– large
– Large
– LARGE
– huge
– Huge