ynline versionX http://dust.ess.uci.edu/doc turdy PUth eugustD PHHSISXHW e LTEX Cheat Sheet y ghrlie ender niversity of gliforni t srvine heprtment of irth ystem iene niversity of gliforni srvineD ge WPTWUEQIHH oieX @WRWA VPREPWVU pxX @WRWA VPREQPST zender@uci.edu gopyright © PHHH{PHHSD ghrles F ender ermission is grnted to opyD distriute ndGor modify this doument under the terms of the qx pree houmenttion vienseD ersion IFI or ny lter version pulished y the pree oftwre poundtionY with no snvrint etionsD no prontEgover extsD nd no fkEgover extsF he liense is ville online t http://www.gnu.ai.mit.edu/copyleft/fdl.htmlF Contents gontents vist of pigures vist of les I sntrodution A P v i snstlltion PFI PFP PFQ PFR PFS PFT PFHFI ersonl pkges psPpdf F F F F F F F F F F Pps F F F F F F F F F F F psPepsi F F F F F F F F F F osters F F F F F F F F F F dvips F F F F F F F F F F F hpi F F F F F F F F F PFTFI iewing F F F F F PFTFP hyperref F F F F F PFTFQ wnipulting F F PFTFR pdfsreen F F F F PFTFS thumpdf F F F F PFTFT pdfthum F F F F les F F F F F F F F F F PFUFI epstopdf F F F F F PFUFP pgrding F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F i I I I I P P Q Q Q R R R S T T T U U U V PFU CONTENTS ii F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F W IH IH IH IH IH IH II II II IP IP IP IQ IS IS IT IT IT IT IT IU IV IW IW IW PH PH PI PI PQ PQ PR PR A Q sing v i QFI xp F F F F F F F F F F F F F F F F F F F QFIFI usefont F F F F F F F F F F F F F F F QFIFP suxes F F F F F F F F F F F F F F F QFP hependenies F F F F F F F F F F F F F F F QFQ gittions F F F F F F F F F F F F F F F F F F QFR htes nd imes F F F F F F F F F F F F F QFS snditing henitionsD gommndsD piles QFT isnfo F F F F F F F F F F F F F F F F F F QFTFI snserting i into isnfo F F F QFTFP exiPhtml F F F F F F F F F F F F F QFTFQ exiPltex F F F F F F F F F F F F F QFTFR th F F F F F F F F F F F F F F F F F QFTFS exRht F F F F F F F F F F F F F F F QFU rwvGqwv F F F F F F F F F F F F F F F QFV sndexing F F F F F F F F F F F F F F F F F F QFW vine xumering F F F F F F F F F F F F F F QFIH ertil ping F F F F F F F F F F F F F F QFII rorizontl ping F F F F F F F F F F F F QFIP ertim F F F F F F F F F F F F F F F F F F QFIQ g F F F F F F F F F F F F F F F F F F F F QFIR termrks F F F F F F F F F F F F F F F F QFIS ymols F F F F F F F F F F F F F F F F F F QFIT qrphis F F F F F F F F F F F F F F F F F F QFITFI glipping nd ottion F F F F F F QFIU rdemrks F F F F F F F F F F F F F F F F QFIV gurrenies F F F F F F F F F F F F F F F F F QFIW eronyms nd erevition F F F F F F F QFPH ext mples with mth F F F F F F F F W R ext ypogrphy S wth SFI SFP SFQ SFR RFI qothi F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F RFP ext ponts F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F wth gonventions wth iqutions F F wth ponts F F F F wth mples F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PI PQ filiogrphy sndex PU PW List of Figures I P hortwve gloud poring F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PhP F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IV IW List of Tables I P Q R S T U V W IH pont ettriutes F F F F F F F F F F pilenme uxes F F F F F F F F F ext yjet ypes F F F F F F F F rwvGqwv peil ghrters i pmily ymols F F F F F F F ypesetting ext F F F F F F F F F ext eries nd tyles F F F F F F ext ponts F F F F F F F F F F F F F wth ponts F F F F F F F F F F F F ypesetting wth F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F W IH II IR IU PI PP PP PR PS 1 Introduction Just a box of rain| Wind and water| Believe it if you need it, if you don't just pass it on omeone one sid tht the est wy to lern lnguge ws to spek itF his is my A ttempt to lern viD one of the most hllenging nd useful lnguges ever devisedF his setion is devoted to introdutory mteril nd mtters generi to typogrphyF A etion P desries vi instlltion nd mintenneD etion Q ontins hints on using A viD etion R is devoted to text typogrphyD etion S overs formtting mthemtisF \foo is undened snidentllyD the rst letter of the preeding prgrph ws dropped4 y lling the \bigdrop mro dened y the dropcaps.sty pkgeX \bigdrop0pt3cmr10SomeoneF F F F enother pkge ple of hndling lrge rst letters of prgrphs is the lettrine.sty pkE geF wost of the doumenttion for lettrine ppers to e in prenhD howeverF S 2 Robert Hunter Box of Rain e LTEX Installation A his setion desries vi instlltionD mintenneD nd upgrdesF hnks to homs isser for produing the i distriution tht s useD tetexF A wny ylympin i nd vi gurus do not like the edrt qxGvinux instlltionF epprently edrt does not hnge the tetex defults from their iuropen settingsF his A 2 L TEX INSTALLATION P my use vertil mrgins to hnge in weird wysD eFgFD in printouts ut not in ghostviewD or in acroread ut not in xdviF hen this ours the solution is to reongure i y running texconfig s rootX sudo texconfig dvips paper letter sudo texconfig xdvi us PFHFI ersonl kges he TEXINPUTS nd BIBINPUTS environmentl vriles determine the i serh pthF hese should e set in strtup lesD eFgFD .bashrcX export TEXINPUTS=".:${HOME}/tex//:${HOME}/crr//:${DATA}/ps//: \ ${TEXMFDIR}/pdftex//:${TEXMFDIR}/tex//::" export BIBINPUTS=".:${HOME}/tex//:${TEXMFDIR}/bibtex//::" sf these vriles re not set then pkges must e in the urrent diretory or the defult system serh pthsF he :: tivtes the defult system serh pthsF he // indites tht diretories eneth the speied diretory should e serhed reursivelyF hese symoli links should not e neessry when TEXINPUTS ontins ${HOME}/tex//X sudo sudo sudo sudo sudo sudo sudo sudo ln -s ${HOME}/tex/ncarletter.cls ${HOME}/tex/cls/ncarletter.cls ln -s ${HOME}/tex/zenletter.cls ${HOME}/tex/cls/zenletter.cls ln -s ${HOME}/tex/bib.bib ${HOME}/tex/cls/bib.bib ln -s ${HOME}/tex/csz.sty ${HOME}/tex/cls/csz.sty ln -s ${HOME}/tex/jgr_abb.tex ${HOME}/tex/cls/jgr_abb.tex ln -s ${HOME}/tex/cls ${TEXMFDIR}/tex/latex/csz ln -s ${HOME}/tex/bst ${TEXMFDIR}/bibtex/bst/csz texhash A sing vi to produe hp les is lots of funF here is n entire xp wesite devoted to this topiF 2.1 ps2pdf he ps2pdf progrm onverts omplex ostsript les into hp lesF ps2pdf is the qhostsript replement for edoe histillerF e distiller killerD you might syF st is highly ongurleY full detils re ville hereF ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true \ -dEmbedAllFonts=true -sAutoRotatePages=PageByPage \ -sColorConversionStrategy=LeaveColorUnchanged in.ps out.pdf he AutoRotatePages nd ColorConversionStrategy swithes re importnt when onE verting slide presenttionsF he EmbedAllFonts option tells ps2pdf to emed ll fonts in the output leF his mkes the output le more portleF he ghostsript ommnd to onvert ostsript into hp ws posted to comp.text.tex on PHHRHVPSX A 2 L TEX INSTALLATION gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter \ -dPDFSETTINGS=/printer -dCompatibilityLevel=1.3 -dMaxSubsetPct=100 \ -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=foo.pdf \ foo.ps Q ith teTeXD one n tell ll DVI mnipultors @inluding pdftexD xdviD dvipsA to emed fonts y using one ommndF he updmap ommnd lters the font ongurtion les of ll these progrms under teTeXX sudo updmap --setoption pdftexDownloadBase14 true 2.2 a2ps he a2ps progrm onverts text les to ostsript a2ps --no-header fl.txt a2ps --no-header fl.txt -o fl.ps a2ps --columns=80 --font-size=12 --lines-per-page=52 --no-header fl.txt -o fl.ps 2.3 ps2epsi he ps2epsi progrm reomputes the miniml possile ounding ox of ostsript nd inspsulted postsript lesF ps2epsi foo.ps foo.eps 2.4 Posters A greting onferene posters using vi is not well doumentedF he a0poster pkge is designed to hold onferene postersF epssplit n rek up poster into letter @or eRA sized pieesD whih you n then put k together like ig jigsw puzzleF pirstD thoughD you my need to turn your poster into n EPS le using ghostsriptD gsX gs -q -sDEVICE=epswrite -sOutputFile=${DATA}/ps/pst_ZNT03.eps -r600 -q - < ${DATA}/ps/ps epssplit -o ${DATA}/ps/pst_ZNT03_mlt.ps -mar 2.5mm ${DATA}/ps/pst_ZNT03.eps se psresize to resize the poster to t onto single pgeF hefult units re pointsD ut either cm or in my e speied for entimeters or inhesD respetivelyF psresize -W1106 -H905 -w2728.575 -h3334.59 ${DATA}/ps/pst_ZNT03.ps ${DATA}/ps/pst_ZNT03_ psresize -Wwdt_in -Hhgt_in -wwdt_out -hhgt_out ${DATA}/ps/pst_ZNT03.ps ${DATA}/ps/pst_ZN psresize -W60.0in -H40.0in -w11.00in -h8.5in ${DATA}/ps/pst_ZNT03.ps ${DATA}/ps/pst_ZNT0 oster sizes should tke dvntge of ommon lrge formt printer sizesF he most ommon printer widths re QT nd RP inhesF he gs smgeorks print shop @@WRWA VPRETRIRD xturl ienes sD oom PIIPA hrges out 6IH C 6IP ft 1 for QT inhEwide postersD nd 6IS C 6IS ft 1 for RP inhEwide postersF A 2 L TEX INSTALLATION R 2.5 dvips he dvips progrm onverts hs les to ostsript lesF st lso helps generte other formts suh s hpF dvips -o nco.ps nco.dvi # Convert DVI to Postscript yne very importnt feture of dvips is tht it my e used to generte eutiful hp les without hving to invoke pdflatexF his is omplished y setting the dvips output pipe to hp dvips -Ppdf -G0 -o nco.ps nco.dvi # Convert to Postscript intermediate, then PDF ps2pdf -Ppdf -G0 nco.ps nco.pdf # Convert Postscript to PDF he resulting hp le does not preserve the helpful hp feturesD suh s hyperlinksD ut it does pper s intended in hp reders suh s acroreadF his proedure is very useful when pdflatex does not workD eFgFD for omplited lesD or when the soure is in some other formtD eFgFD isnfoF nfortuntelyD the -Ppdf swith my typeset ligtures suh s 4 or 4 inorretlyF he solution is to dd the -G0 swithD or to upgrde to more reent versions of dvipsF st is lso reommend to dd -Pcmz nd -amz swithesF his is explined in the i peF enother feture of dvips is its ility to produe i @inpsulted ostsriptA les from ll or prts of doumentF dvips -Ppdf -G0 -E -i -o rt.ps rt.dvi # Convert to Postscript intermediate, then PDF 2.6 PDFTEX hpiD y Hn Th^ ThnhD is miroEtypogrphi extensions to the i typesetting sysE a ea temF hpi produes hp output diretlyD rther thn using ostript onverter suh s ghostscriptF Prof. Dr. Hans Hagen ontriuted muh to the development of hpiF rgen runs privte ompnyD rgm edvned houment ingineeringD tht supports mro pkge for i lled gonitF hpi tends to give insrutle error messgesF por more informtive dignostisD invoke with pdflatex -k 255 foo.texF A here re two distint ommnds tht deEvi lesD detex nd untexF hese onverters A re relly viEstrippers|they only do good jo of preserving unformtted textF e good A lterntive for formtted text is to onvert the hp le @rther thn the vi leAD to textF pdftotext omplishes thisF poiltex requires the dvips option in order to produe lndspe mode foilsF he hyperref pkge interferes with poiltex nd reks the rotting pilityF PFTFI iewing he three free reders acroreadD ghostviewD nd xpdf ll disply hpi lesF he edoeEsupplied acroread ws intentiionlly rippled to not refresh douments on the yF o irumvent thisD keep nother doument openD then use C-w to lose the doument nd C-o to open the le ginF roweverD acroread does hve the nie ility to onvert hp to ostsript usingD eFgFD A 2 L TEX INSTALLATION S acroread -help # Print acroread options acroread -toPostScript -level2 -size letter -pairs -shrink fl_nm.pdf fl_nm.ps for fl in `ls *.pdf` ; do acroread -toPostScript -level2 -size letter -pairs -shrink ${fl} ${fl/pdf/ps} done for fl in `ls *.ps` ; do kprinter ${fl}; done PFTFP hyperref A he hyperref pkge provides most of the vi9s interfe to the eEwre fetures of hp les supported y pdflatexF hp les support links within doumentsD nd etween the doument nd the orld ide e @AF pdflatex utomtilly onverts most synttilly useful doument entry points to internl linksF por exmpleD the rst setion of n rtile formt doument will e linked to the internl nme section.1F rene the rst setion of doument foo.pdf stored t http://foo.com/doc.pdf hs the glol v http://foo.com//doc.pdf#section.1F A vi douments rete tive links to suh vs with the \href ommndF por exmE pleD the following links should tively point to this prtiulr setion of this doument s n internl link nd s n externl linkD respetivelyF as an \href{subsubsection.2.5.2}{internal link} and as an \href{http://dust.ess.uci.edu/doc/ltx/ltx.pdf#subsubsection.2.5.2}{external link}, he \href mro n ess lol4 vsF his lol le link esses the hyperrefE generted link to etion R through the r file:// protoolX This \href{file:///data/zender/ps/ltx.pdf#section.4}{active link} ... hen lol le link points to the le eing viewedD the viewer @eFgFD xpdfA jumps to the link without spwning new viewerF vol le links re etter omplished with the stndrd A vi \label nd \ref mrosF xonethelessD hyperref utomtilly genertes lels t stndrdized lotions in mny doument typesF he \href mro is more useful for essing remote vsF his remote v link should ess the hyperrefEgenerted link to etion R through the r http:// protoolX \href{http://dust.ess.uci.edu/doc/ltx/ltx.pdf#section.4}{remote URL link} o resolve remote vsD the urrent viewer spwns new viewer proess @proly sed on the defult hndler for the mimeEtypeD in this se hpA to downlod nd disply the remote doumentF nfortuntelyD no viewers seem intelligent enough to open the remote doument to the speied setionF sn other wordsD the viewer downlods the remote doument orretlyD nd then the new viewer opens the doument to ge ID rther thn to the speied setion @etion R in this seAF hyperref provides the following mros for neEgrined ontrolX \hyperdef{category}{name}txt % Mark text with category.name \hyperref{URL}{category}{name}{text} % Link text to URL#category.name \hyperbaseurl{URL} % Prepend URL to following URLs \hypertarget{sxn:abb}{} % fxm A 2 L TEX INSTALLATION T mples of these mros for generi situtions re \hyperref{sxn}{}{} % fxm \hyperref{}{sxn}{abb}{fxm} % Link text to URL#category.name \hypertarget{sxn:abb}{} % fxm etul trgets tht work in typil situtions re \hyperbaseurl{file:///data/zender/ps/abb.pdf} \hypertarget{sxn:abb}{} he \hypertarget ommnd sets fxmF PFTFQ wnipulting st is often helpful to mnipulte hp doument using ntive hp tools so tht no lossy onversions to other formts @eFgFD ostsriptA need e doneF he hp toolkit pdftk is useful for thisF prom the pdftk homepgeX sf hp is eletroni pperD then pdftk is n eletroni stpleEremoverD holeEpunhD inderD seretEdeoderEringD nd EyEglsses hptk my e used to mergeD splitD deryptD enryptD urstD unompressD nd repir hp lesF o extrt susets of pges from hp doumentD pdftk A=${DATA}/ps/prp_itr.pdf cat A2 output ~/prp_itr_smr.pdf PFTFR pdfsreen enother useful pkge is pdfscreenF pdfscreen relies hevily on hyperref nd numer of other pkgesF s hve instlled the entirety of pdfscreen in ${TEXMFDIR}/tex/latex/pdfscreenF roweverD only pdfscreen.sty nd few other les in the diretory re stritly required for the instlltion to workF his should e xed so the i diretory does not ruft upF rinting pdfscreen presenttions is sometimes usefulF o do thisD set pdfpagemode={FullScreen}, % Starts in full screen mode, hit 'Esc' to escape pdfmenubar=true % Allow access to reader's menubar in the \hypersetup portion of the premleF his will strt the presenttion in full sreen mode nd mke the reder @eFgFD acroreadA menur ville one the presenttion is esped4 usingD eFgFD EscF PFTFS thumpdf hp les hve the pility to show thumnilsD reduedEsize imges of eh pgeF he vrious i engines do not generte thumnils utomtilly @sine they reAD so tht some intervention is required to insert them in the nl hp doumentF he two freely ville methods re the thumbpdf pkgeD y reiko yerdiekD nd pdfthumbD prt of the PPower4 @4 A projetF he typil usge of thumbpdf is A 2 L TEX INSTALLATION pdflatex ltx.tex;thumbpdf ltx;pdflatex ltx.tex U he thumbpdf pkge my lso e used in ostsript proessing his is omplished y setting the dvips output pipe to hp dvips -Ppdf -G0 -o ${DATA}/ps/ltx.ps ltx.dvi thumbpdf --modes=dvips --level2 --useps ${DATA}/ps/ltx.ps dvips -Ppdf -G0 -o ${DATA}/ps/ltx.ps ltx.dvi ps2pdf ${DATA}/ps/ltx.ps ${DATA}/ps/ltx.pdf pdf2ps ${DATA}/ps/ltx.pdf ${DATA}/ps/ltx.ps PFTFT pdfthum he 4 http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4projet reE ted the hp resenttion ost roessorF snstll this pkge in generi diretories then rete thumnil dditions to ny hp leF sudo mkdir ${TEXMFDIR}/tex/generic/ppower4 sudo mv *.sty ${TEXMFDIR}/tex/generic/ppower4 sudo mv ppower4 pdfthumb /usr/local/bin pdfthumb in.pdf out.pdf pdfthumb nco.pdf nco.pdf2;/bin/mv nco.pdf2 nco.pdf 2.7 Tables A les re perhps the most diultEtoEmster spet of viF se the rotating.sty pkge to rotte tlesF \begin{sidewaystable} \end{sidewaystable} hen lrge portions of text @mny pgesA re to e printed sidewysD then lndspe mode is lled forF pootnotes in tles re lso trikyF PFUFI epstopdf hpi does not reognize *.eps les diretlyF snsted these must e onverted to hpE formt with epstopdfF he epstopdf pkge y reiko yerdiek is very useful when using A hpviF for fl in `ls *.eps` ; do epstopdf ${fl} done he pkge epstopdf.sty does this utomtillyF st onverts ostsript @*.psA nd enpsuE lted ostsript @*.epsA les to pdf les @*.pdfA utomtilly @using epstopdfA if the pdf les do not lredy existF roweverD this pility is intrinsilly somewht inseure sine it A 2 L TEX INSTALLATION V A involves llowing vi to run shell ommndsF reneD epstopdf is not instlled y defult nd speil permissions must e set to tivte itF o enle this feture t runEtime useD eFgFD pdflatex -shell-escape test.texF o permnently enle this feture for the whole distriution set shell_escape = 1 in ongurtion le texmf.cnfF PFUFP pgrding pgrding hpiX cd ${DATA}/tmp;mkdir pdftex;cd pdftex ftp://ftp.muni.cz/pub/tex/local/cstug/thanh/pdftex/snapshots gunzip pdftex-20010806-linux.zip ./configure --prefix=/usr --datadir=/usr/share make sudo mv /usr/bin/pdfetex /usr/bin/pdftex /usr/bin/ttf2afm /data/zender/bck sudo mv ${TEXMFDIR}/web2c/pdftex.pool ${TEXMFDIR}/web2c/pdfetex.pool /data/zender/bck sudo cp pdfetex pdftex ttf2afm pdftosrc /usr/bin sudo cp pdfetex.pool pdftex.pool ${TEXMFDIR}/web2c sudo texhash cd ${DATA}/tmp;mkdir pdftex;cd pdftex sudo mv pdftex-20010806.tgz ${DATA}/tmp/pdftex tar xvzf pdftex-20010806.tgz cd src ./configure --prefix=/usr/share cd texk/web2c make pdftexbin cd ${DATA}/tmp/pdftex/src/texk/web2c sudo cp pdfetex pdftex ttf2afm pdftosrc /usr/bin sudo cp pdfetex.pool pdftex.pool ${TEXMFDIR}/web2c finries nd pool les re loted in the diretory ${DATA}/tmp/pdftex/src/texk/web2cF ou must regenerte .fmt les pdftex.fmt nd pdflatex.fmt fter instlling new version of the hpi inry nd pdftex.pool lesF pdftex -ini -fmt=pdftex plain \\dump pdftex -ini -fmt=pdflatex latex.ltx or sudo fmtutil --byfmt pdftex sudo fmtutil --byfmt pdflatex epprentlyD texconfig init my do oth in one fell swoopF hen updte the grphis .def le to the newest version t http://www.ctan.org/ tex-archive/macros/pdftex/graphics/pdftex.def A 3 USING L TEX W le IX pont ettriutesa ettriute lue inoding OT1 OT2 T1 OML OMS OMX U pmily cmr cmss cmtt gomputer modern romnD gomputer modern sns serifD gomputer modern typewriter eries @weightA ul el l sl m sb b eb ub ltrlightD ixtrlightD vightD emilightD wediumD emioldD foldD ixtroldD ltrold eries @widthA uc ec c sc m sx x ex ux ltrondensedD ixtrondensedD gondensedD emiondensedD wediumD emiexpndedD hpe n it sl sc u xormlD stliD lntedD mll ps ize a Sources: Kopka and Daly [1999] find /usr/share/ -name pdftex.def cd ${TEXMFDIR}/tex/latex/graphics/ sudo mv pdftex.def pdftex.def.orig sudo cp ~/pdftex.def . 3 e Using LTEX 3.1 NFSS A he font sheme used in vi is known s the New Font Selection Scheme @nfssAF nfss reognizes ve distint font ttriutesX encodingD familyD seriesD shapeD nd size whih my e set individully with the ommnds he font size tkes two seprte rgumentsD the point size of the font nd the vlue of A \baselineskipF le I shows smple vlues for eh font ttriuteF v i omes with n intertive doument whih prints font tles on demndF latex ${TEXMFDIR}/tex/latex/base/nfssfont.tex Name of the font to test = ygoth \help \sample fontencodingfencodegD fontfamilyffamgD fontseriesfwt wthgD fontshapefformgD nd fontsizefline spgF he font series onsists of two vluesD weight nd widthD onteE nted sequentilly into one rgumentD wt wth of etween one nd four hrtersD eFgFD ebscF A 3 USING L TEX IH le PX pilenme uxesa ux ixmple wening Ftfm pplrFtfm a Sources: Kopka and Daly [1999] \bye QFIFI usefont suxes \usefontF ponts my e swiftly hnged with the \usefont mroF his mro tkes four rgumentsX QFIFP A le P shows the onventionl mening of some of the lenme suxes in the vi universeF ome hrters suh s re hrd to essF por this purposeD use the \symbol ommnd Kopka and DalyD IWWWD pF TQF por exmpleD \symbol{126} produes ~D the tilde symolF 3.2 Dependencies A fuilding nd mintining omplex vi les is nonEtrivil nd requires eort similr to mintining omplex modelF here re two wys to keep trk of the dependenies of soure leF he rst is to dd the ommnd \listfiles somewhere in the doument A premleF his uses vi to print the le dependenies to sreen during proessingF he seond is to dd the ommnd \RequirePackage{snapshot} before the \documentclass ommndF his will generte dependeny le @*.depA leF 3.3 Citations A rere we try some typil vi iliogrphi ittions IF eommended formt for iting vs is demonstrted y invoking \cite{Zen01b}X Zender PHHI 3.4 Dates and Times he datetime.sty pkge provides ne ontrol for printing dtes nd timesF st provides the \xxivtime nd \ordinal ommndsF 3.5 Indicating De nitions, Commands, Files st is helpful to indite wht type of ojet text refers toF por exmpleD the isnfo doE umenttion system disrimintes etween IS types of text ojetF xot ll those types re A relevent here sineD eFgFD vi hs super ittion hndling ility lredyF le Q list A 3 USING L TEX II le QX ext yjet ypesa gommnd elternte ixmple esult wening \acronym \acr eronym \cite eferene \code rogrm ode \command \cmdprn gommnd nme A \cmdltxprn vi gommnd nme \dfn \trmdfn henition \email iletroni mil ddress \env invironment vrile \file \flprn pile nme \kbd ueyord input \key peifying keys \mchprn whine nme \nmprn roper nme \option yption nme \samp \smpprn viterl hrter sequene \url orld ide e lotion \var wetsyntti vrile a Sources: T XInfo manual E the types of text ojets tht pper in this doumenttionD nd the ommnds neessry to indite tht type of textF por onsistenyD most ojet types re dened extly s in isnfoF 3.6 TEXInfo A e lrge suite of tools is ville for mnipulting vi nd isnfo doumentsF QFTFI snserting i into isnfo @tex % Define TeX macros to roughly correspond to LaTeX style files \def\dfr{d} % [frc] Math differential @end tex QFTFP exiPhtml he texi2html ommnd onverts isnfoEformt mnuls into rwv formtF he soures re ville from the g server A 3 USING L TEX IP cvs -d :pserver:t2h-anon@urmel.mathematik.uni-kl.de:/usr/local/Singular/cvsroot login cvs -d :pserver:t2h-anon@urmel.mathematik.uni-kl.de:/usr/local/Singular/cvsroot co Texi2 with the pssword texi2htmlF QFTFQ exiPltex A he texi2latex ommnd onverts isnfoEformt mnuls into vi formtF he soures re ville from the qx projet server http://www.nongnu.org/texi2latexF texi2latex requires n v proessor suh s xonF sudo apt-get install libsaxon-java cd ${DATA}/tmp/texi2latex-0.9.4 export CXX=g++-3.4 make sudo make install texi2latex ~/nco/doc/nco.texi # First, install saxon version 6.5.3 cd ${DATA}/tmp mkdir saxon-6.5.3 cp saxon6_5_3.zip saxon-6.5.3 cd saxon-6.5.3 unzip saxon6_5_3.zip QFTFR th A he tth @iEtoErwvA ommnd onverts viEformt douments into rwv formtF tth -a -Lltx -p${TEXINPUTS}:${BIBINPUTS} < ltx.tex > ltx.html he -a swith tells tth to automatically run ommnds like latexD bibtexD etFD to generte ny neessry uxiliry lesF ell tth the root word for the uxiliry les with the -L swithF tth serhes for les on the pth speied y the -p swithF pull doumenttion is ville t le:///usr/share/doc/tth/tth manual.htmlF eording to the mnulD A r does not reognize the \usepackage ommnd y defult euse the vi mros tht re input y this ommnd lmost lwys ontin tode hnges or other usges inomptile with rF or requires tht personl pkges use \input insted of \usepackageF his usully imposes nonEgeneriD nd thus A uneptleD onstrints on the soure vi doumentF QFTFS exRht A tex4ht is oth pkge nd progrm tht onverts v iEformt douments into rwvF st is est to invoke the tex4ht suite of progrms using the htlatex sriptF htlatex ltx.tex A 3 USING L TEX IQ his produes rwv les of the form ltx.cssD ltx[0-9].htmlD ltx.xrefD ltx.lgD ltx.idvD ltx.4ctD ltx.tcD sf interested in displying pges with mozillaD in prtiulrD use the mzlatex sriptX mzlatex ltx.tex his produes wv les of the form ltx[0-9].xmlF 3.7 HTML/SGML rypertext wrkup vnguge @rwvA is used to enode douments displyed y most e rowsersF le R summrizes the most ommon wys to implement of speil hrters in A rwvD nd their vi equivlentsF A 3 USING L TEX wnemoni rwv le RX rwvGqwv peil ghrtersa A xumeri rwv LTEX esult <foo@bar> $<$foo@bar$>$ IR <foo@bar> è é ý   C. S. Zender Α α − × ÷ ± ∂ µ € ©       — – ‘ ’ “ ” … ↔ ← → è \`{e} e é \'{e} e ý \'{y} y   non-breakable space nonErekle spe C. S. Zender C.~S. Zender C. S. Zender Α $\Alpha$ @qreek pitl letter lphA α $\alpha$ @qreek smll letter lphA − $-$ @winus signA × $\times$ ¢ @wultiplition signA ÷ $/$ = @hivision signA ± $\pm$ ¦ @lusEminus signA ∂ $\partial$ @ @rtil dierentilA µ $\mu$ @wiro signA € \texteuro ¿ @euro signA © \copyright ©   foo\;bar foo r @em speA   foo\:bar foo r @en speA   foo\,bar foo r @thin speA — --| @em dshA – -{ @en dsh ‘ `foo` foo @left single quottion mrkA ’ 'foo' 9foo9 @right single quottion mrkA “ ``foo`` foo @left doule quottion mrkA ” ''foo'' 4foo4 @right doule quottion mrkA … \hellip F F F @low horizontl ellipsisA ↎ \leftarrow 6 @horizontl leftEright rrowA ← \leftarrow 2 @left rrowA → \rightarrow 3 @right rrowA A 3 USING L TEX IS 3.8 Indexing A rere we show some typil vi indexing nd rossEindexing whih mke use of the \index ommnd nd derivtions thereofF IF he following instne of the word qurk4 is indexed using \trmdfn{quark}X quarkF hen proessed with the \usepackage[hyperindex]{hyperref} pkgeD the index should point k to this instne @s long s backref=trueAF PF he following instne of the word qurk4 is indexed using \trmidx{quark}X qurkF @A he following index of the uthor romer impson4 uses \trmdfn[Simpson, Homer]{Homer Simpson} so tht romer impson4 ppers vertim in the text ut is indexed y the optionl rgument impsonD romer4X Homer SimpsonF gompre this to \trmidx[Simpson, Homer]{Homer Simpson}X romer impson nd to \trmidx{Homer Simpson}X romer impsonF \index{Baggins!Frodo}D \index{Baggins!Bilbo}D \index{Baggins!Bilbo!adventures}D \index{Baggins!Bilbo!rings}F QF elted onepts my e rossEindexed nd suEsorted s wellF por exmple \index{Frodo|see{Baggi ples 9prodoD see fggins9 in the indexF xesting relted item is omplished yD eFgFD RF he index requires some help to determine where to ple nonEstndrd symolsF por exmpleD METAFONT should e indexed lphetilly s wetfont4D not s wetfont4D while \MF should e indexed lphetilly s wp4F his is omplished y the ommnd \index{Metafont@\MF}F he rgument efore the @ is the lexiE ogrphil vlue of the entry used for lphetiztionD nd the rgument fter the @ is the vlue tully written to the indexF fy the sme tokenD the ommnd \index{index@\verb+\index+} ples the word \index under the letter i4F xote tht this method is tedious nd prone to error sine it involves typing the word inE dex4 three timesF reiko yerdiek hs provided me with the ommndD \cmdltxidx whih prints \cmdltxidx in the text nd in the index t the orret lphetil loE tionF 3.9 Line Numbering 1 2 3 4 5 6 7 8 9 o numer eh line in doumentD use the pkge lineno.styF he \linenumbers ommnd turns on lineEnumeringD nd the \nolinenumbers turns it oF o demonstrteD the next few setions hve lineEnumering turned onF he pkge is very exile nd supports options like \pagewiselinenumberingD \rightlinenumbersD etF lineno.sty even supports leling lines nd refering to spei lines with the stndrd referene ommndsD eFgFD \refF nfortuntelyD lineEnumering is expensive in terms of proessing time nd ontents of the A uxiliry leD so expet vi to slow down when lrge mounts of mteril re numeredF hen printing soure odeD it my e desirle to niely formt ertin keywords in the A lngugeF he vi ommnd \cxx prints g++4 insted of the unformtted gCC4F A 3 USING L TEX 10 11 IT 3.10 Vertical Spacing o hnge the vertil sping in doumentD use the pkge setspace.styF 12 13 14 15 16 17 18 19 3.11 Horizontal Spacing ping etween numers nd dimensions is omplited issueF he issue is most often igE nored y noviesD ndD for those who reD there re no universl solutionsF e relted question is the sping etween multiple physil dimensions in single unitD soElled interdimensional spacingF he J. Fluid. Mech. onvention ppers to e \; spe etween the vlue nd dimensionD nd then \, spe for interdimensionl spingD eFgFD 5\;cm\,s$^{-1}$ produes S m s 1 F eq journls pper to use \, in oth positionsD eFgFD 5\,cm\,s$^{-1}$ produes S m s 1 F 20 21 22 23 24 25 26 27 28 29 30 3.12 Verbatim he pkge listings.sty ontins extensive options to niely formt input odeF pirst one must dene the urrent lnguge environment with the \lstset ommndD eFgFD n l s t s e t f% Set up l i s t i n g s . s t y environment lnguge ave eD % Language f o r l i s t i n g s . s t y n l s t i n l i n e s t r i n g s t y l e anttfamily D keywordstyleanttfamilyg yne \lstset hs een initilizedD the \lstinline ommnd is used to formt ode inlineD nd the lstlisting environment is ville to ple longer ode frgments in disply styleF A he srcltx pkge enles xdvi to disply vi ode synhronized with the displyX elso onsider the fancyvrb.sty pkge y imothy vn ndtF 3.13 CVS A sing g in vi douments is not strightforwrdF xormn qry reommended the following on comp.text.tex \def\CVS$#1: #2 ${\expandafter\def\csname CVS#1\endcsname{#2}} \CVS$Revision$ \CVS$Date$ nd use it like \date{\CVSDate, version \CVSRevision}F his reipe only works when g versioning is turned onD iFeFD when the -kk option is not speiedF he ove denition must pper in the doument eing trkedD iFeFD the .tex leD rther thn style leF ytherwise the version informtion will reet the evolution of the style le nd not the doument eing trkedF nfortuntely this ontriutes to premle lotF 3.14 Watermarks rinting messge on eh pge is useful to wtermrk drft workD so it is FAQF o A do this in viD use the \draftcopy pkge y tuergen ollmerF he word hep4 A 3 USING L TEX IU le SX i pmily ymolsa ymol gommnd kge i \TeX none isnfo \TeX{}InfoD \TeXInfo csz A \LaTeXD \LATEX vi noneD texnames A P vi " \LaTeXe none METAFONT METAFONT \MF m ogo \METAFONT texnames ewEi \AMSTEXD \AmSTeXD \AMSTeX texnames Bibi \BIBTEXD \BIBTeXD \BibTeX texnames [1999] a Sources: Kopka and Daly @ssuming n inglish doumentA will e lzed ross the speied pgesF ghostview hs troules showing DRAFT wtermrk in the onEsreen windowF qhostsript @gsA works ne with wtermrksF termrking pdfiEgenerted les requires more sophistited pkge lled eso-pic whih is ontined in wrtin hroder9s ms undleF por pdfD try the followingX e \usepackage[pdftex]{graphics,color} % \usepackage{eso-pic} % Required for Draft (\AddToShipoutPicture) \AddToShipoutPicture{\resizebox{0.9\pdfpagewidth}{0.9\pdfpageheight}% {\rotatebox{60}{\color[gray]{0.8}\hspace*{5mm}\textsc{Sample Paper}}}} 3.15 Symbols A he vriety of symols vi n produe is stoundingF he denitive soure of these symols is the ymols doument y wF ott kinD ville from ftp://cam.ctan.org/ tex-archive/info/symbols/comprehensive/F ome of the more frequently used iE relted symols re listed in le SF he \usepackage{texnames} mkes the proper logos villeD utD ording to oin pirirnsD it is n outEofEdteD poorly oded pkge whih should e voided if possile @iFeFD use mflogo insted for METAFONTAF eording to the u i peD por those who don9t wish to quire the 9proper9 logosD the nonil thing to do is to sy AMS-\TeX for ewEiD Pic\TeX for iiD Bib\TeX for fiiD nd so onF4 ixtending this dvie to wore reent pkges hve their own stylesF e few of the A more useful re \textsc{pdf}\TeX for pdfiD nd \textsc{pdf}\LaTeX for pdfviF yften font is nmed fter its retorD whether person or ompnyF hus lerning the nmes of font retors is good mnemoni for the pkge nmesF he marvosym fonts re nmed for wrtin ogel9s ymols4F A 3 USING L TEX IV pigure IX gp for @A tnury nd @A tulyF 3.16 Graphics snlusion of grphis imges is ontrolled y the graphix pkgeF he \includegraphics mro imports ostsript @*.psA nd enpsulted ostsript @*.epsA les utomtillyF xormlly grphis oat in doumentsD iFeFD their position vries so s to ow well with the surrounding textF hese ots re usully pled within the figure environmentD so tht ption my e esily ddedF ith sizing nd ptionD the skeleton ode to inlude grphil gure looks like \begin{figure*} \centering \includegraphics[width=0.5\hsize]{SWCF_x_01}\vfill \includegraphics[width=0.5\hsize]{SWCF_x_07}% \caption[Shortwave Cloud Forcing]{SWCF for (a) January and (b) July. \label{fgr:SWCF_x1}} \end{figure*} imilr ommnds produed pigure ccF he figure environment only spns single text olumnF he figure* environment spns ll olumns in multiEolumn doumentF he loE tion of the ot is n optionl rgument to the figure environmentD eFgFD \begin{figure*}[b] to ple the ot t the ottom of the urrent or the next pgeF st is not strightforwrd to import other grphis typesF ster grphis suh s gif A nd jpeg must rst e onverted to ostsriptF vi will do this utomtilly if it knows the onversion rulesF his my e omplished with the \DeclareGraphicsRule ommndF A 3 USING L TEX IW pigure PX PhPF he prerequisite is tht shellEexeutle exist whih n produe ostsriptF he ommnd gif2eps used to exist nd ould hndle gif imgesF rere is how gif gure might e indited \DeclareGraphicsRule{.gif}{eps}{}{`gif2eps #1 -} % Convert GIF files to eps \begin{figure*} \centering \includegraphics[width=0.5in,height=0.5in]{/data/zender/fgr/dmr/r2d2.gif} \caption[R2D2]{R2D2.\label{fgr:r2d2}} \end{figure*} hese ommnds produed pigure PF xote the use of the width nd height options to size the gureF sf only one dimension were givenD then graphicx would utomtilly mintin the nturl spet rtio of the gureF QFITFI glipping nd ottion o trim imgesD use the trim nd clip options to includegraphicsF peify the viewport mrgins in the order veftD fottomD ightD opF vierty4 is good mnenomoni for the lbrt orderingF \includegraphics[width=1.0\hsize,clip=true,trim=0.75in 4.1in 0.1in 4.9in]{/data/zender/f 3.17 Trademarks sdentifying intelletul property orretly requires some knowledge of opyrights nd trdeE mrksF ht distinguishes trdemrk from registered trdemrk or servie mrk is A not lerF vi utomtilly mkes ville the symols \copyrightD \texttrademarkD nd \textregistered to denote these mrks Kopka and DalyD IWWWD pF PQWF por exE mpleD this work is gopyright © PHHH{PHHQ y meF Linux\textregistered produes vinux®F Linux\texttrademark produes vinux @where the supersript is utomtiAF roweverD the text ompnion pkge textcomp provides nier versions of \texttrademark nd \textregistered thn the defultsD so rememer to lod it for importnt doumentsF textcomp lso provides some symols tht re uniqueD suh s \textservicemark @eFgFD vinuxAD \textonehalf @½AD \textonequarter @¼AD nd \textthreequarters @¾AF 3.18 Currencies he euroD the oil urreny of the iuropen nionD my e typeset with \texteuro @¿AF yther urreny symols inludeF F F A 3 USING L TEX PH 3.19 Acronyms and Abbreviation erevitions re ontrtions of phrses into sequene of letters eh usully representing the rst letter of wordF erevitions re not intended to e pronouned s single wordF por exmpleD e is n revitionF eronyms re revitions whih re pronounele without spelling the revition letterEyEletterF hus sfw is not n ronymD ut xey isF ypogrphil onventions set ronyms in smllps4 fontD iFeFD font where pitl letters re smller thn the regulr text fontF sn iD smllps is one of the font shpes @§QFIAF eriodils whih follow this onvention inlude The EconomistF hus ronyms my e orretly typeset on the y4 using the \textsc mroF por exmpleD \textsc{nco} produes ncoD while \textsc{Unix} produes UnixF here is lso homerew mroD \acrD whih is urrently just wrpper for \textscF por exmpleD \acr{nco} produes ncoF efter rising the question hen to use smllps for ronymsc4 on the comp.text.tex usenet listD vriety of nswers nd rtionles were proposedF oin pirirns noted tht frr feeton speied notEquiteEsmll ps vrint for use in ugotF ris ode for tht is \usepackage{relsize} \def\acro#1{\textsmaller{#1}\@} \acro{TUG} conferences aren't much like \acro{SOSP}s. ythers simply use smll text font \newcommand{\cap}[1]{{\small{#1}}} \newcommand{\capRB}[1]{\raisebox{1pt}{\small{(}}\small{#1}\raisebox{1pt}{\small{)}}} \TeX\ User Group \capRB{TUG} conferences aren't much like \cap{SOSP}s. 3.20 Text Samples A rere we try some typil vi text formttingF IF rere we use the ustom \dgr @degreeA mroD rst in text modeD then in mth modeF \dgr uses \ensuremath so there should e no disernile diereneX 10\dgr S--10\dgr N gives IH {IH x4F 10$\dgr$S--10$\dgr$N gives IH {IH x4F PF \includegraphics will utomtilly sle grphi to t within given ox while mintining spet rtio with this rgument width=xxx,height=yyy,keepaspectratio wo ommnds useful for typesetting vs nd eEmil ddresses re \url nd \hrefF le T show the results of vrious typesetting tehniques on vsD inluding prolemti long vsF 4 TEXT TYPOGRAPHY PI le TX ypesetting ext1 esult A vi gommnd \url{nco.sourceforge.net} nco.sourceforge.net \href{http://nco.sourceforge.net}{NCO Homepage} xgy romepge \url{zender@uci.edu} zender@uci.edu \url{http://some/really/long/URL/that/wants/to/wrap} http://some/really/long/URL/ that/wants/to/wrap \href{http://some/really/long/URL/that/wants/to/wrap}{Short Name} hort xme nfortuntelyD the dvips driver is unle to utomtilly rek vs ross linesF yn the other hndD pdflatex intelligently reks vs whenever neessryF e comp.text.tex thred initited on ytF PRD PHHI y ylive woeller disusses the resons for thisF husD s demonstrted in le TD douments my e formtted dierently depending on whether they re produed with dvips or pdflatexF 4 Text Typography othi fonts oupy speil ple in the history of typogrphy sine they pper in the oldest typeset texts in estern iviliztionF nnis rrlmous used METAFONT to design four interesting yld qermn fontsF he qothi letter inititing this prgrph if from the nnis initil4 font lled yinitF es mentioned oveD the initil letter of prE grphs is dropped4 with the dropcaps pkgeD in this se \bigdrop{0pt}{3}{yinit}{G}othicF F F F A nfortuntelyD essing nonEdefult fonts in vi generlly involves mnipulting very detiled nd omplex speition shemeD nfss @§QFIAF G 4.1 Gothic nnis prkturX \usefont{U}{yfrak}{m}{n} Hello, World. nnis qothiX \usefont{U}{ygoth}{m}{n} re)oD orldF nnis hwherX \usefont{U}{yswab}{m}{n} Hello, World. nnis snitilX \usefont{U}{yinit}{m}{n} 4.2 Text Fonts HW le U shows dierent series nd styles of the defult text fontF 4 TEXT TYPOGRAPHY PP le UX ext eries nd tyle A vi pont esult efghipqrstuvwxydefghijklmnopqrstuvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \textrm \textsf \texttt \textup \textit \textsl \textsc \textmd \textbf \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge efghipqrstuvwxydefghijklmnopqrstuvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012 efghipqrstuvwxydefghijklmnopqrstuvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 efghipqrstuvwxydefghijklmnopqrstuvwxyzHIP ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 efghipqrstuvwxydefghijklmnopqrstuvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk ABCDEFGHIJKLMNOPQRSTUVWXYZab ABCDEFGHIJKLMNOPQRSTUVWXYZab le VX ext ponts3 le V shows dierent fmilies of text fontsF A vi pont esult \textgoth \textfrak \textswab efghipqrstuvwxy§fgh"klmnopqr`uvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqruvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqruvwxyz0123456789 5 MATH PQ 5 Math Typography 5.1 Math Conventions he sy hs estlished onventions regrding symols ppering in mthemtil douE ments Kopka and DalyD IWWWD pF IRPF he most often violted onventionD whih is lso esy A voided with viD onerns the use of upright fonts for symols denoting xedD onstnt vluesF oD for exmpleD the se of the nturl logrithm should e denoted e rther thn simply eF his is omplished y using $\me$ rther thn $e$F vikewise the imginry numer is i @\miA rther thn i @$i$AY pi is @\mpiA rther thn @\piAD nd the symol for dierentil element isD eFgFD dx @$\dfr x$AD rther thn dx @$dx$AF pperse upright qreek symols my e otined from the symbols font or from the txfonts pkgeF \mathbf is old upright mthemtil fontD nd ontins only vtin nd upperse qreek lettersF he pkge upgreek.sty supplies upright qreek letters when the norml letter ommnd is prexed with up4D eFgFD \uppi produes wheres \pi produes F nfortuntelyD the letters produed y upgreek.sty pper to e oldfeF he pkge bm.sty oldfes qreek letters @s does the \pmb or oor mn9s old4 from amsbsy.styAF he pkges mathptmx.sty nd mathpazo.sty rete fullD oldEitliD lphets in the imes nd ltino fontsD respeE tivelyF hether this onvention pplies to qreek numeril prexes is unlerF por exmpleD micronD IH 6 mD is often written m4 @$\mu$mAF he in mD howeverD hs xed vlue @IH 6 AF st isD in esseneD universl onstnt muh like F herefore mirons should e written with n upright muD iFeFD µmF wost journlsD inluding eq journlsD dhere to this formtF eording to Kopka and Daly IWWWD pF IRPX imple vriles re represented y itli lettersD abcxyzF etors re written in old fe itliD s Bv!F ensors of Pnd order nd mtries my pper in sns serif fontD s MDI he speil numers eD iD D s well s the dierentil opertor dD re to e written in an upright font to emphsize tht they re not vrilesF SF e mesurement onsisting of numer plus dimension is n indivisile unitD with smller thn norml spe etween themD s SFQ km nd TP µmF he dimension is set in n upright fontF IF PF QF RF Kopka and Daly IWWW reommend using 5.2 Math Equations vengthy derivtions my require reking the derivtion ross pge oundryF st is generlly onsidered smrter to dillow pge reks etween eqution lines y defultD nd to require the uthor to speilly enle them where neessryF hus norml disply environmentsD eFgFD the eqnarray environmentD do notD y defultD llow reking ross pgesF he \displaybreak ommnd uses rek in prtiulr eqution on prtiulr pgeF he optiml position for the \displaybreak is just efore the \\ where it should tke eetF \displaybreak tkes n optionl integer rgument vlued H to R to indite the 5 MATH PR degree of penlty ssoited with reking disply environmentD with H merely llowing rek to tke pleD nd R requiring tht the pge rekD eFgFD \displaybreak[4]F ewEi lso supplies the \allowdisplaybreaks mro whih hnges the defult to permit displyed equtions to ow smoothly from one pge to the nextF his mro should e pled in the doument premleF \allowdisplaybreaks tkes n optionl integer rgument vlued I to R to indite the degree of penlty ssoited with reking disply environmentD with R eing the most permissiveD eFgFD \allowdisplaybreaks[4]F 5.3 Math Fonts le W shows the dierent mthemtil fontsF he \mathscr ommnd is dened y multiple pkgesF hen \usepackage[mathscr]{eucal} is employedD \mathscr prints vertil sript fontD ut when \usepackage{mathrsfs} is in eet \mathscr prints n ornte nd very urvy sript font reminisent of wedding invittionsF le WX wth ponts4 A vi gommnd esult qreek \bm upgreek.sty \mathnormal \mathrm \mathsf \mathtt \mathit \mathbf \mathcal \mathbb \mathscr \mathfrak \pmb ¡¢£¤¥¦§¨© "#o$%&' ! µo ¡¢£¤¥¦§¨© "#o$%&' ! ABCDEF GHIJKLMNOP QRST UV W XY Zabcdefghijklmnopqrstuvwxyz012345 efghipqrstuvwxydefghijklmnopqrstuvwxyzHIPQRSTUVW ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 efghipqrstuvwxydefghijklmnopqrstuvwxyzHIP efghipqrst uvwxy defghijklmnopqrstuvwxyzHIP ABCDEFGHIJKLMNOPQRSTUVWXYZafghijklmnopqrstuvwxyz0123 ABCDEF GHIJKLMNOP QRST UV W XY ZabcdefghijklmnopqrstuvwxyzHIPQRS fxm PHHQHPPRX fegn produing oo mny mth lphets used in version norml4 A BC DE F G H I J K L M N OPQRS T U V W X Y Z ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 5.4 Math Samples A vi ontins mny usefulD ut hrdEtoErememerD ommnds nd symols for formtting mthemtisF st is esy to forget when to use unommon symols like \lesssimD \gtrapproxD nd \,F le IH shows results of dierent mthemtil typesetting tehniquesF 5 MATH PS le IHX ypesetting wth5 A vi gommnd esult @p j @T V @p \frac{\partial \prs}{\partial \tpt}\big|_{\vlm} @T V @p \frac{\partial \prs}{\partial \tpt}\Big|_{\vlm} @T V @p \frac{\partial \prs}{\partial \tpt}\bigg|_{\vlm} @T V @p \frac{\partial \prs}{\partial \tpt}\Bigg|_{\vlm} @T V 10\dgr \times 10\dgr IH ¢ IH ~ \tilde{\dmt}_{\nbrsbs} Dn ~ \tilde{\dmt_{\nbrsbs}} Dn ~2 \tilde{\dmt}_{\nbrsbs}^{2} Dn ~2 \tilde{\dmt_{\nbrsbs}^{2}} Dn " \bar{\dmt}_{\nbrsbs} Dn " \bar{\dmt_{\nbrsbs}} Dn "2 \bar{\dmt}_{\nbrsbs}^{2} Dn "2 \bar{\dmt_{\nbrsbs}^{2}} Dn \hat{\dmt}_{\nbrsbs} Dn \hat{\dmt_{\nbrsbs}} Dn 2 \hat{\dmt}_{\nbrsbs}^{2} Dn 2 \hat{\dmt_{\nbrsbs}^{2}} Dn \overline{\dmt}_{\nbrsbs} Dn \overline{\dmt_{\nbrsbs}} Dn \overline{\dmt}_{\nbrsbs}^{2} D2 n 2 \overline{\dmt_{\nbrsbs}^{2}} Dn \underline{\dmt}_{\nbrsbs} Dn \underline{\dmt_{\nbrsbs}} Dn \underline{\dmt}_{\nbrsbs}^{2} D2 n 2 \underline{\dmt_{\nbrsbs}^{2}} Dn \dot{\dmt}_{\nbrsbs} Dn \dot{\dmt_{\nbrsbs}} Dn 2 \dot{\dmt}_{\nbrsbs}^{2} Dn \frac{\partial \prs}{\partial \tpt}|_{\vlm} 5 MATH PT le IHX @ontinuedA A vi gommnd esult 2 Dn Dn Dn 2 Dn 2 Dn ~ Dn ~ Dn ~2 Dn ~2 Dn { ~ { { \dot{\dmt_{\nbrsbs}^{2}} \ddot{\dmt}_{\nbrsbs} \ddot{\dmt_{\nbrsbs}} \ddot{\dmt}_{\nbrsbs}^{2} \ddot{\dmt_{\nbrsbs}^{2}} \vec{\dmt}_{\nbrsbs} \vec{\dmt_{\nbrsbs}} \vec{\dmt}_{\nbrsbs}^{2} \vec{\dmt_{\nbrsbs}^{2}} \imath \vec{\imath} \hat{\imath} \mathbf{\vec{\iii}} \mathbf{\iii} \mathbf{\hat{i}} \mbox{\boldmath$\hat{\imath}$} \mbox{\boldmath$\hat{\iii}$} \jmath \vec{\jmath} \hat{\jmath} \mathbf{\hat{j}} \mbox{\boldmath$\hat{\jmath}$} \vec{k} \hat{k} \mathbf{\hat{k}} \mbox{\boldmath$\hat{k}$} \int_{0}^{\infty} \dstnbrrds \; \dfr\rds \int_{0}^{\infty} \dstnbrrds \: \dfr\rds \int_{0}^{\infty} \dstnbrrds \, \dfr\rds \int_{0}^{\infty} \dstnbrrds \dfr\rds \int_{0}^{\infty} \dstnbrrds \! \dfr\rds \dstfnc_{\nbrsbs}(\dmt) \dstfnc^{\mathrm{o}}_{\nbrsbs}(\dmt) ~ i i i { i j | ~ k k R | ~ | | k k I nr dr n I nr dr n R0 I nr dr n R0 I nr dr n R0 I nrdr R0 nn @DA no @DA n 0 n BIBLIOGRAPHY PU le IHX @ontinuedA esult A vi gommnd \dstfnc^{o}_{\nbrsbs}(\dmt) \dstfnc^{e}_{\nbrsbs}(\dmt) \tilde{\gsd}^{2} \tilde{\gsd}^{\!\!2} \tilde{\gsd^{2}} \tilde{\gsd^{\!\!2}} \dmtnaa \dmtnar \dmtnma \dmtnmr \dmtnwa \dmtnwr \mbox{\textonehalf}D \mbox{\textonequarter} \frac{1}{2} \frac{2}{3} 1/2\2/3 x^{1/2} x^\frac{1}{2} a \lesssim b a \lessapprox b a \gtrsim b a \gtrapprox b \pi \Pi \mpi \mathbf{\pi \Pi} \bm{\pi \Pi} \hm{\pi \Pi} \uppi \pmb{\pi} no @DA n ne @DA n g 2 ~ g2 ~ ~2 g ~ 2g " Dn " Dn ~ Dn ~ Dn Dn Dn ½¼ I=P P=Q x1=2 1 x2 a.b a/b a&b a'b ¥ 12 23 ¥ ¥ ¥ Bibliography A uopkD rFD nd F F hlyD A Guide to LTEX2eD seond edFD eddisonEesleyD edingD wssD IWWSF A uopkD rFD nd F F hlyD A Guide to LTEX2eD third edFD eddisonEesleyD edingD wssD BIBLIOGRAPHY PV IWWWF aD aD QFIFPD aD QFIUD SFID SFI enderD gF FD ditive trnsfer in the irth systemD http://dust.ess.uci.edu/facts/ rt/rt.pdf4D PHHIF I Index \,D IT \;D IT AutoRotatePagesD P ColorConversionStrategyD P DVID Q EPSD Q EmbedAllFontsD P PPower4D T \,D PR \gtrapproxD PR \hrefD SD PH \lesssimD PR \mathbfD PQ \urlD PH a2psD Q acroreadD RD T clipD IW comp.text.texD PI detexD R dvipsD QD RD PI epssplitD Q epstopdfD U file://D S ghostscriptD R ghostviewD R gsD Q htlatexD IP http://D S lstlistingD IT mozillaD IQ mzlatexD IQ pdflatexD RD PI pdftexD Q pdfthumbD T pdftkD T pdftotextD R ps2epsiD Q ps2pdfD P psresizeD Q teTeXD Q tex4htD IP texi2htmlD II texi2latexD IP trimD IW tthD IP untexD R updmapD Q xdviD QD IT xpdfD RD S .bashrcD P a0posterD Q amsbsy.styD PQ bm.styD PQ datetime.styD IH dropcaps.styD I epstopdf.styD U fancyvrb.styD IT foo.pdfD S lettrine.styD I lineno.styD IS listings.styD IT mathpazo.styD PQ mathptmx.styD PQ pdfscreen.styD T rotating.styD U setspace.styD IT texmf.cnfD V upgreek.styD PQD PR Hn Th^ ThnhD R a ea Prof. Dr. Hans HagenD R \acrD PH edoe histillerD P eqD ITD PQ rtile formtD S \allowdisplaybreaksD PR \AMSTeXD IU fggins filoD IS dventuresD IS ringsD IS prodoD IS \baselineskipD W \BibTeXD IU \bigdropD I \bmD PR PW INDEX QH \labelD S gCCD IS \cmdltxidxD IS gonitD R gD II \cxxD IS \copyrightD IW dtesD IH lndspeD U \LARGED PP \LargeD PP \largeD PP \LaTeXD IU \LaTeXeD IU \DeclareGraphicsRuleD IV \dgrD PH dierentilD PQ \displaybreakD PQ \documentclassD IH \draftcopyD IT \linenumbersD IS \listfilesD IH \lstinlineD IT \lstsetD IT \mathbbD PR \mathbfD PR \mathcalD PR \mathfrakD PR \mathitD PR \mathnormalD PR \mathrmD PR \mathscrD PR \mathsfD PR \mathttD PR METAFONTD IS \MFD IU \MFD ISD IU \miD PQ hsD R eEmil ddressesD PH enodingD W inspsulted postsriptD Q \ensuremathD PH iD R euroD IW fmilyD W otD IV \fooD I \footnotesizeD PP prodoD see fggins qhostsriptD P ghostsriptD PD Q qxD IP qreekD PR mironD PQ mimeEtypeD S \mpiD PQ romer impsonD IS \hrefD S rwvD II{IQ \HugeD PP \hugeD PP \hypertargetD T rypertext wrkup vngugeD IQ \includegraphicsD IVD PH \indexD IS \indexD IS \inputD IP nturl logrithmD PQ includegraphicsD IW xew pont eletion hemeD W \nolinenumbersD IS \normalsizeD PP xpD P yerdiekD reikoD T \ordinalD IH \pagewiselinenumberingD IS interdimensionl spingD IT ltinoD PQ hpD PD R hp toolkitD T hptkD T piD PQ INDEX QI imesD PQ timesD IH \tinyD PP vD S vsD IHD PH \usefontD IH \piD PQ \pmbD PQD PR postersD Q ostriptD R ostsriptD P{R qurkD ISD IS \refD SD IS \rightlinenumbersD IS \usepackageD IP rotteD U vn ndtD imothyD IT orld ide eD S vD IP \xxivtimeD IH xonD IP \scriptsizeD PP seriesD W shpeD W impsonD romerD ISD IS sizeD W \smallD PP speil hrtersD IQ \symbolD IH tlesD U \TeXD IU isnfoD RD II \TeXInfoD IU \textbfD PP \texteuroD IW \textfrakD PP \textgothD PP \textitD PP \textmdD PP \textonehalfD IW \textonequarterD IW \textregisteredD IW \textrmD PP \textscD PHD PP \textservicemarkD IW \textsfD PP \textslD PP \textswabD PP \textthreequartersD IW \texttrademarkD IW \textttD PP \textupD PP thumnilsD T