Basic Guidance About LaTeX

download Basic Guidance About LaTeX

of 222

Transcript of Basic Guidance About LaTeX

  • 7/24/2019 Basic Guidance About LaTeX

    1/222

    A Short Course onUsing LaTex

    Umair Rafique (Lecturer)CS Department,

    Air University, s!ama"a#

  • 7/24/2019 Basic Guidance About LaTeX

    2/222

    Why Bother?

    Preparing professional quality documents

    Changing Text Formatting Style

    Bibliography anagement

    Changing reference style !"ailability of #aTex Templates for almost all $ournals and

    conferences%

    & 'ery fe( pro"ide SWord Templates

    ) *mair +afique ,

  • 7/24/2019 Basic Guidance About LaTeX

    3/222

    Course -ntroduction

    T(o days course ./0thand /1th2uly3

    4o( to use #aTex for producing professional quality documents

    & Text Formatting

    & Tables5 Figures5 !lgorithms& athematical 6xpressions5 Theorems

    & +eference .Bibliography3 anagement

    & uch more

    Six 78 minute sessions .three on each day3

    Will co"er all the basics of document formatting using #aTex

    9) *mair +afique

  • 7/24/2019 Basic Guidance About LaTeX

    4/222

    Bonus

    Simplified5 ready to use5 templates for some ma$or publishers .-66656lse"ier and Springer3

    ! complete template for S and Ph: thesis

    !ll #aTex related installation setups Tips on ho( to benefit from S ;ffice for use in #aTex

    ) *mair +afique

  • 7/24/2019 Basic Guidance About LaTeX

    5/222

    -nstructor -ntroduction

    Ph%:% .Thesis !ccepted35 =anyang Technological *ni"ersity5Singapore%

    !rea of +esearch> !rtificial -ntelligence

    & -ntelligent !gents

    & !ction +epresentation for Commonsense +easoning

    #aTex?

    4omepage> http>(((%ntu%edu%sghome@umai888/ Aoogle> *mair +afique

    @) *mair +afique

    http://www.ntu.edu.sg/home5/umai0001/http://www.ntu.edu.sg/home5/umai0001/
  • 7/24/2019 Basic Guidance About LaTeX

    6/222

    Course Syllabus

    /0th 2ulySession / .7>88 to /8>983 -ntroduction to #atex5 -nstallation5 Creating aSimple :ocumentSession , .//>88 to /,>983 !uthors and Titles5 Chapters5 Sections5 Table of

    Contents5 #abels5 Cross+eferencing5 Page Styles5 #istsSession 9 ./,>/@3 Figures5 Araphs5 Tables5 and ParagraphFormatting

    /1th 2ulySession / .7>88 to /8>983 Bibliography anagement using BibTex5

    Theorems5 Formatting your C' using #aTex%Session , .//>88 to /,>983 Writing !lgorithms5 athematical 6xpressionsand 6quationsSession 9 ./,>/@3 *sing Well no(n #atex Templates .-66656lse"ier5 Springer3

    0) *mair +afique

  • 7/24/2019 Basic Guidance About LaTeX

    7/222

    Session /

    -ntroduction to #aTex5 -nstallation5

    Creating a Simple :ocument

  • 7/24/2019 Basic Guidance About LaTeX

    8/222

    ;utline

    Terminology> Tex5 #aTex5 P:F #aTex5 iTex5 ProText

    Tex 6ditors

    & TexStudio

    &TexWors& TeDnic Center

    & TexaerD

    -nstalling #atex using ProText

    -nstalling the Tex 6ditor TexaerD

    Creating a Basic :ocument What #atex Can +eally :o?

    E) *mair +afique

  • 7/24/2019 Basic Guidance About LaTeX

    9/222

    Tex

    Tex is a lo(le"el marup and programming language created by:onald nuth in /711 to typeset documents attracti"ely andconsistently%

    The fine control TeD offers maes it "ery po(erful5 but also difficultand timeconsuming to use%

    TeD is reno(ned for being extremely stable5 for running on manydifferent inds of computers5 and for being "irtually bug free%

    4o(e"er it requires a consistent stage of learning5 and additional

    times building custom macros for text formatting%

    ) *mair +afique 7

  • 7/24/2019 Basic Guidance About LaTeX

    10/222

    #aTex -

    #aTex is a document preparation systems based on TeD and includes prebuilt macros%

    #aTeD pro"ides a highle"el language that accesses the po(er of TeD%

    #aTeD essentially comprises a collection of TeD macros and a program to

    process #aTeD documents% Because the TeD formatting commands are "ery lo(le"el5 it is usually much

    simpler for endusers to use #aTeD%

    -t (as created by #eslie #amport in early /7E8s%

    -ts purpose is to simplify TeD typesetting5 especially for documents

    containing mathematical formulae% any authors ha"e contributed extensions5 called pacages or styles

    Some of these are bundled (ith most TeD#aTeD soft(are distributions%ore can be found in the Comprehensi"e TeD !rchi"e =et(or . CT!=3%

    ) *mair +afique /8

  • 7/24/2019 Basic Guidance About LaTeX

    11/222

    #aTex --

    *sing #aTex

    & Gou can concentrate purely on the structure and contents of the documentand not (orry about layout issues%

    & Gou donHt need to manually ad$ust fonts5 text siIes etc as #aTeD taes care

    of them automatically%& The layout5 fonts5 tables etc% are consistent throughout the document%

    & athematical formulae can be easily typeset%

    & -ndexes5 footnotes5 citations and references are generated easily%

    Gou donJt see (hat the final "ersion (ill loo lie (hile typing% -nstead you

    see the logical structure of the document% The #aTeD document is a plain text file containing the content of the

    document5 (ith additional marup%

    ) *mair +afique //

  • 7/24/2019 Basic Guidance About LaTeX

    12/222

    P:F#aTex

    !n extension to #aTex

    The main difference bet(een #aTeD and P:F#aTeD is that (hereas#aTeD outputs :'- .:e'ice -ndependent3 files5 P:F#aTeD canoutput P:F files directly%

    This allo(s tight integration of P:F features such as hypertext linsand tables of contents%

    ) *mair +afique /,

  • 7/24/2019 Basic Guidance About LaTeX

    13/222

    #aTeD :istributions> iTex

    #aTeD distribution is a collections of pacages and programs

    The programs you expect to find in any #aTeD distribution are

    & latex compiler reads a #aTeD %tex file and creates a %d"i

    &pdflatex compiler reads a #aTeD %tex file and creates a %pdf& d"i,ps con"erts the %d"i file to %ps .postscript3%

    & d"i,pdf con"erts the %d"i file to %pdf

    & and a lot of pacages

    iTex .for Windo(s3

    & iTeD can update itself by do(nloading ne( "ersions of pre"iouslyinstalled components and pacages5 and has an easy installationprocess% !dditionally5 it can as users (hether they (ish to do(nloadany pacages that ha"e not yet been installed but are requested by thecurrent document%

    ) *mair +afique /9

  • 7/24/2019 Basic Guidance About LaTeX

    14/222

    #aTex 6ditors

    Pro"ide an easy to use interface for (riting and compilingdocuments in #atex

    Tae care of all the document processing connecting to #aTexengine in the bacground

    & -t is al(ays good to install #aTex first and then any #aTex 6ditor

    =ormally include an integrated "ie(er so you can (rite your #atexdocument and see the resulting P:F document all using the sameeditor

    -nclude many useful features lie spell checing5 menus for insertingsymbols etc%

    :oIens of #aTex editors are a"ailable

    ) *mair +afique / -nstall TexaerD

    ) *mair +afique 98

  • 7/24/2019 Basic Guidance About LaTeX

    31/222

    TexaerD -nstallation /

    ) *mair +afique 9/

  • 7/24/2019 Basic Guidance About LaTeX

    32/222

    TexaerD -nstallation ,

    ) *mair +afique 9,

  • 7/24/2019 Basic Guidance About LaTeX

    33/222

    TexaerD -nstallation 9

    ) *mair +afique 99

  • 7/24/2019 Basic Guidance About LaTeX

    34/222

    TexaerD -nstallation ne an# ?>arne

    Page argins

    $usepacage%top@*Bcm, "ottom@*Bcm,!eft@*Bcm,right@5*7Bcm'geometry

    Fancy 4eadersKusepacagefancyh#r

    ) *mair +afique 0@

  • 7/24/2019 Basic Guidance About LaTeX

    66/222

    ) *mair +afique 00

  • 7/24/2019 Basic Guidance About LaTeX

    67/222

    fancyhdr example

    $pagesty!efancy

    $!hea#

    $chea#

    $rhea#$"fseries The performance of ne; gra#uates

    $!foot4rom * /rant$cfootTo Dean A* Smith

    $rfoot$thepage

    $rene;comman#$hea#ru!e;i#th8*=pt

    $rene;comman#$footru!e;i#th8*=pt

    ) *mair +afique 01

    fancyhdr for :ouble Sided

  • 7/24/2019 Basic Guidance About LaTeX

    68/222

    fancyhdr for :ouble SidedPrinting

    KfancyheadNO clear all header fields

    KfancyheadL+;5#6MNKbfseries The performance of ne( graduatesO

    KfancyfootNO clear all footer fields

    KfancyfootL#65+;MNKthepageO

    KfancyfootL#;5C6MNFrom> % ArantO

    KfancyfootLC;5+6MNTo> :ean !% SmithO

    Krene(commandNKheadrule(idthON8%

  • 7/24/2019 Basic Guidance About LaTeX

    69/222

    fancyhdr With Section4eadings> :efault

    KfancyheadL#65+;MNKslshape KrightmarO

    KfancyheadL#;5+6MNKslshape KleftmarO

    KfancyfootLCMNKthepageO

    ) *mair +afique 07

    fancyhdr With Section

  • 7/24/2019 Basic Guidance About LaTeX

    70/222

    fancyhdr With Section4eadings> CustomiIed

    $!eftmarcurrent chapter name printed lie C4!PT6+ 9% T4-S -ST46 C4!PT6+ T-T#6

    $rightmarcurrent section name printed lie /%0% T4-S -S T46S6CT-;= T-T#6

    Kleftmar contains the left argument of the last Kmarboth on thepage

    Krightmar contains the right argument of the first Kmarboth or theonly argument of the first Kmarright on the page%

    Gou can influence ho( chapter5 section5 and subsection information.only t(o of them3 is displayed by redefining the Kchaptermar5Ksectionmar5 and Ksubsectionmar commands

    ) *mair +afique 18

  • 7/24/2019 Basic Guidance About LaTeX

    71/222

    ) *mair +afique 1/

    fancyhdr With Custom Section

  • 7/24/2019 Basic Guidance About LaTeX

    72/222

    fancyhdr With Custom Section4eadings .example3

    $pagesty!efancy

    $fancyhea#

    $a##to!ength$hea#height$"ase!inesip

    $rene;comman#$hea#ru!e;i#th8*=pt

    $rene;comman#$footru!e;i#th8*8pt

    $rene;comman#$chaptermar%&'$mar"oth$chaptername$ $thechapter* E&

    $rene;comman#$sectionmar%&'$marright$thesection*$ E&

    $a##to!ength$hea#sep.8*&in

    $fancyhea#%L3,L0'$+aeUppercase$!eftmar$$$rightmar

    $fancyfoot%C'$thepage

    ) *mair +afique 1,

  • 7/24/2019 Basic Guidance About LaTeX

    73/222

    ) *mair +afique 19

  • 7/24/2019 Basic Guidance About LaTeX

    74/222

    #ist 6n"ironments

    By default t(o types of list en"ironments are a"ailable

    $"eginenumerate

    $item This is my first num"ere# item

    $en#enumerate

    $"eginitemiFe

    $item This is my first "u!!et item

    $en#itemiFe

    These can be nested in any (ay%

    ) *mair +afique 1 !*T4;+6:-T;+5 T-T#65 C4!PT6+P!A6S5P*B#-S46+5 G6!+

    & ;ptional fields> ';#*6=*B6+5 S6+-6S5 TGP65 !::+6SS5 6:-T-;=5

    ;=T45 =;T6 incollection:! part of a boo ha"ing its o(n title%

    & +equired fields> !*T4;+5 T-T#65 B;;T-T#65 P*B#-S46+5 G6!+

    & ;ptional fields> 6:-T;+5 ';#*6=*B6+5 S6+-6S5 TGP65 C4!PT6+5P!A6S5 !::+6SS5 6:-T-;=5 ;=T45 =;T6

    inproceedings:!n article in a conference proceedings%& +equired fields> !*T4;+5 T-T#65 B;;T-T#65 G6!+

    & ;ptional fields> 6:-T;+5 ';#*6=*B6+5 S6+-6S5 P!A6S5 !::+6SS5;=T45 ;+A!=-_!T-;=5 P*B#-S46+5 =;T6

    ) *mair +afique /97

    +eference 6ntry Types cont%%

  • 7/24/2019 Basic Guidance About LaTeX

    140/222

    manual:Technical documentation%

    & +equired fields> T-T#6

    & ;ptional fields> !*T4;+5 ;+A!=-_!T-;=5 !::+6SS5 6:-T-;=5;=T45 G6!+5 =;T6

    mastersthesis:! asterJs Thesis

    & +equired fields> !*T4;+5 T-T#65 SC4;;#5 G6!+

    & ;ptional fields> TGP65 !::+6SS5 ;=T45 =;T6

    misc:For use (hen nothing else fits%

    & +equired fields> =;=6

    & ;ptional fields> !*T4;+5 T-T#65 4;WP*B#-S46:5 ;=T45 G6!+5 =;T6

    phdthesis:! Ph: Thesis%

    & +equired fields> !*T4;+5 T-T#65 SC4;;#5 G6!+

    & ;ptional fields> TGP65 !::+6SS5 ;=T45 =;T6

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    141/222

    proceedings:The proceedings of a conference%

    & +equired fields> T-T#65 G6!+

    & ;ptional fields> 6:-T;+5 ';#*6=*B6+5 S6+-6S5 !::+6SS5;=T45 P*B#-S46+5 ;+A!=-_!T-;=5 =;T6

    techreport:! report published by a school or other institution5usually numbered (ithin a series%

    & +equired fields> !*T4;+5 T-T#65 -=ST-T*T-;=5 G6!+

    & ;ptional fields> TGP65 =*B6+5 !::+6SS5 ;=T45 =;T6

    unpublished:! document ha"ing an author and title5 but not

    formally published%& +equired fields> !*T4;+5 T-T#65 =;T6

    & ;ptional fields> ;=T45 G6!+

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    142/222

    6xample %bib File

    B-B[all%bib

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    143/222

    #aTex :ocument?

    -nclude the follo(ing command at the place (here you (ant your+eference section to appear

    $"i"!iography??Ga!!

    $"i"!iographysty!ea""rv

    4ere QB-B[allR is the name of the %bib file (hile Qabbr"R is thebibliography style%

    Cite a reference using the Kcite command%

    Compile the #aTex document at least threetimes to get all thereferences right%

    6xamples%

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    144/222

    %bst File> +eference Styles

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    145/222

    Specifies ho( references for a gi"en document are styled%

    ! large number of reference styles are a"ailable%

    See bibstyles%pdf for the details of follo(ing styles%

    ) *mair +afique / plain

  • 7/24/2019 Basic Guidance About LaTeX

    146/222

    ) *mair +afique / abbr"

  • 7/24/2019 Basic Guidance About LaTeX

    147/222

    ) *mair +afique / alpha

  • 7/24/2019 Basic Guidance About LaTeX

    148/222

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    149/222

    %bib style examples

    ) *mair +afique /

  • 7/24/2019 Basic Guidance About LaTeX

    150/222

    Theorems *sing amsthm

    Pacage

    ) *mair +afique /@8

    Theorem

  • 7/24/2019 Basic Guidance About LaTeX

    151/222

    With theorem (e can mean any ind of labelled part that (e (ant toloo separated from the rest of the text and (ith sequential numbersnext to it%

    This approach is commonly used for theorems in mathematics5 butcan be used for anything%

    & 6xamples

    & :efinitions

    KpacageNamsthmO

    ) *mair +afique /@/

    Basic Theorems

  • 7/24/2019 Basic Guidance About LaTeX

    152/222

    $ne;theoremname1rinte# output

    The first argument is the name you (ill use to reference it5 thesecond argument is the output #aTeD (ill print (hene"er you use it%

    Kne;theoremmy#efDefinition (ill define the mydef

    en"ironment if you use it lie this$"eginmy#ef

    Kere is a ne; #efinition

    $en#my#ef

    ) *mair +afique /@,

    Theorem =umbering

  • 7/24/2019 Basic Guidance About LaTeX

    153/222

    ;ften the counters are determined by section5 for exampleTheorem ,%9 refers to the 9rd theorem in the ,nd section of adocument% Can do so using the command%

    $ne;theoremname1rinte# output%num"er"y'

    numberby is the name of the section le"el .section5 subsection3% By default5 each theorem uses its o(n counter%

    -t is also common for similar types of theorems .e%g% Theorems5#emmas and Corollaries3 to share a counter% This can be done as

    $ne;theoremname%counter'1rinte# output

    counter is the name of the counter to be used% *sually this (ill bethe name of the master theorem%

    ) *mair +afique /@9

    Theorem =umbering

  • 7/24/2019 Basic Guidance About LaTeX

    154/222

    Gou can also create a theorem en"ironment that is not numbered byusing the ne(theoremV command% For instance5

    $ne;theorem

  • 7/24/2019 Basic Guidance About LaTeX

    155/222

    $"eginproof

    Kere is my proof

    $en#proof

    -f you (ould lie to manually name the proof5 include the name insquare bracets

    $"eginproof%1roof of important theorem'

    Kere is my important proof

    $en#proof

    Kqedhere command 6xamples

    ) *mair +afique /@@

    Theorem Styles

  • 7/24/2019 Basic Guidance About LaTeX

    156/222

    -t adds the possibility to change the output of the en"ironmentsdefined by Kne(theorem using the Ktheoremstyle command

    $theoremsty!esty!ename

    the argument is the style you (ant to use%

    !ll subsequently defined theorems (ill use this style%& plain:*sed for theorems5 lemmas5 propositions5 etc% .default3

    & definition:*sed for definitions and examples

    & remark: *sed for remars and notes

    6xample

    ) *mair +afique /@0

  • 7/24/2019 Basic Guidance About LaTeX

    157/222

    Formatting your C'

    6xample

    ) *mair +afique /@1

  • 7/24/2019 Basic Guidance About LaTeX

    158/222

    6nd of Session puts the algorithm across the t(o columns%

    procedure > lie algorithm en"ironment but>

    & the caption no( (rites Procedure name%%%

    & the syntax of the Kcaption command is restricted as follo(> you *ST puta name follo(ed by , braces lie this Q=ame.3R% Gou can put argumentsinside the braces and text after% -f no argument is gi"en5 the braces (illbe remo"ed in the title%

    & label no( puts the name .the text before the braces in the caption3 of theprocedure or function as reference

    procedureV > puts the procedure across the t(o columns function > lie procedure but (ith Function in the title%

    functionV > puts the function across the t(o columns%

    ) *mair +afique /0 changes the name of en"ironment algorithm intoalgorithm,e and so allo(s to use the pacage (ith some $ournalstyle (hich already define an algorithm en"ironment% Changes alsothe command name for the list of algorithms5 it becomesKlistofalgorithmes

    figure> algorithms are put in classical figures and so are numberedas figures and putted in the Klistoffigures%

    algopart> algorithms are numbered (ithin part numbers%

    algochapter> algorithms are numbered (ithin chapter numbers%

    algosection> .default3 algorithms are numbered (ithin sectionnumbers%

    boxed> to ha"e algorithms enclosed in a box%

    ) *mair +afique /0@

    ;ptions Cont%%

  • 7/24/2019 Basic Guidance About LaTeX

    166/222

    boxruled> to ha"e algorithms enclosed in a box

    ruled> to ha"e algorithms (ith a line at the top and the bottom% =otethat the caption is not centered under the algorithm anymore but isset at the beginning of the algorithm%

    algoruled> as abo"e but (ith extra spaces after the rules% plain> the default5 (ith no feature%

    lined> KSet#ine becomes the default

    "lined> KSet'line becomes the default

    noline> KSet=oline becomes the default

    linesnumbered> lines of the algorithms are numbered except forcomments and inputoutput .(-nput and (-n;ut3% Gou mustuse KnllabelNlabelO to label thoses lines%

    ) *mair +afique /00

    Set'#ine

  • 7/24/2019 Basic Guidance About LaTeX

    167/222

    ) *mair +afique /01

    :ata5 +esult5 -nput and ;utput

  • 7/24/2019 Basic Guidance About LaTeX

    168/222

    K(:ataNinputO

    K(+esultNoutputO

    K(-nNinputO

    K(;utNoutputO

    ) *mair +afique /0E

    Comments

  • 7/24/2019 Basic Guidance About LaTeX

    169/222

    KtccNline.s3 of commentO .c style3

    KtccVNright $ustified side commentO

    KtccVLrMNright $ustified side commentO

    KtccVLlMNleft $ustified side commentO

    KtcpVNright $ustified side commentO .c`` style3

    ) *mair +afique /07

    ifthenelse commands

  • 7/24/2019 Basic Guidance About LaTeX

    170/222

    K-fNconditionONthen blocO

    K-f.then comment3NconditionONthen blocO

    Kl-fNconditionONthenJs line textO

    K6lse-fNelseif blocO

    Kl6lse-fNelseifJs line textO K6lseNelse blocO

    Kl6lseNelseJs line textO

    Ke-fNconditionONthen blocONelse blocO

    ) *mair +afique /18

    #oops

  • 7/24/2019 Basic Guidance About LaTeX

    171/222

    KForNconditionONtext loopO

    KlForNconditionONline text loopO

    KWhileNconditionONtext loopO

    KlWhileNconditionONline text loopO

    KFor6achNconditionONtext loopO KlFor6achNconditionONline text loopO

    KFor!llNconditionONtext loopO

    KlFor!llNconditionONline text loopO

    K+epeatNend conditionONtext loopO

    Kl+epeatNend conditionONline text loopO

    ) *mair +afique /1/

    6xamples

  • 7/24/2019 Basic Guidance About LaTeX

    172/222

    ) *mair +afique /1,

    6xamples cont%%

  • 7/24/2019 Basic Guidance About LaTeX

    173/222

    ) *mair +afique /19

    6xamples cont%%

  • 7/24/2019 Basic Guidance About LaTeX

    174/222

    ) *mair +afique /1 #aTex (iiboo .Ch /0and /13

    ) *mair +afique /1E

    Some Basics

  • 7/24/2019 Basic Guidance About LaTeX

    179/222

    KusepacageNamsmathO

    or

    KusepacageNmathtoolsO

    text text formulas are displayed inline5 that is5 (ithin the body of

    text (here it is declared% e%g%5 - can say that a ` a X ,a (ithin thissentence%

    & KbeginNmathO%%%KendNmathO or K.%%%K3 or U%%%U

    displayed displayed formulas are separate from the main text%

    & KbeginNdisplaymathO%%%KendNdisplaymathO

    & KbeginNequationVO%%%KendNequationVO& KLKM

    /17) *mair +afique

    Spaces

  • 7/24/2019 Basic Guidance About LaTeX

    180/222

    spaces ha"e no significance inside math mode

    K5

    K

    K>

    Kquad

    ) *mair +afique /E8

    Symbols and Aree #etters

  • 7/24/2019 Basic Guidance About LaTeX

    181/222

    KL

    Kforall x Kin D5 Kquad Kexists y Kleq Kepsilon

    KM

    KL Kalpha5 K!lpha5 Kbeta5 KBeta5 Kgamma5 KAamma5

    Kpi5 KPi5 Kphi5 K"arphi5 KPhi

    KM

    ) *mair +afique /E/

    ;perators

  • 7/24/2019 Basic Guidance About LaTeX

    182/222

    KL

    Kcos .,Ktheta3 X Kcos, Ktheta Ksin, Ktheta

    KM

    KL

    Klim[Nx Kto KinftyO Kexp.x3 X 8

    KM

    ) *mair +afique /E,

    Po(ers and -ndices

  • 7/24/2019 Basic Guidance About LaTeX

    183/222

    KL

    [Nn`/O X n, ` [n, [Nn/O

    KM

    KL f.n3 X n@ `

  • 7/24/2019 Basic Guidance About LaTeX

    184/222

    KL

    KfracNnON.n3O X KbinomNnONO

    KM

    KL KfracNKfracN/ONxO`KfracN/ONyOONyIO

    KM

    Kdfrac5 Ktfrac .for enforcing display or text style33

    KL 9[1

    KM

    ) *mair +afique /E UKbigl.KbeginNsmallmatrixO

    aZbKK cZd

    KendNsmallmatrixO Kbigr3U

    to not increase leading in a portion of text%

    ) *mair +afique /7

    Kquad

    Kqquad

    ) *mair +afique /7E

    dots

  • 7/24/2019 Basic Guidance About LaTeX

    199/222

    Kdots Kldots

    Kcdots

    K"dots

    Kddots

    ) *mair +afique /77

    ath Symbols

  • 7/24/2019 Basic Guidance About LaTeX

    200/222

    ) *mair +afique ,88

  • 7/24/2019 Basic Guidance About LaTeX

    201/222

    ) *mair +afique ,8/

  • 7/24/2019 Basic Guidance About LaTeX

    202/222

    ) *mair +afique ,8,

  • 7/24/2019 Basic Guidance About LaTeX

    203/222

    ) *mair +afique ,89

  • 7/24/2019 Basic Guidance About LaTeX

    204/222

    ) *mair +afique ,8someequationO

    @, @ X ,8

    KendNequationO

    this references the equation KrefNeq>someequationO%

    ) *mair +afique ,80

  • 7/24/2019 Basic Guidance About LaTeX

    207/222

    =umbering Within Sections

  • 7/24/2019 Basic Guidance About LaTeX

    208/222

    KdocumentclassL/,ptMNarticleO KusepacageNamsmathO

    Knumber(ithinNequationONsubsectionO

    KbeginNdocumentO

    KsectionNFirst SectionO KsubsectionN! subsectionO

    KbeginNequationO

    #J X N#ONKsqrtN/KfracN",ONc,OOO

    KendNequationO

    KendNdocumentO

    ) *mair +afique ,8E

    Subequations

  • 7/24/2019 Basic Guidance About LaTeX

    209/222

    KbeginNsubequationsO ax(ellJs equations>

    KbeginNalignO

    BJZXKnabla Ktimes 65KK

    6JZXKnabla Ktimes B

  • 7/24/2019 Basic Guidance About LaTeX

    210/222

    KL ! Kxleftarro(NKtextNthis (ayOO B

    Kxrightarro(LKtextNor that (ayOMNO C

    KM

    ) *mair +afique ,/8

    ore !rro(s

  • 7/24/2019 Basic Guidance About LaTeX

    211/222

    KL a Kxleftrightarro(LunderMNo"erO bKK

    ! Kx#eftarro(LunderMNo"erO BKK

    B Kx+ightarro(LunderMNo"erO CKK

    C Kx#eftrightarro(LunderMNo"erO :KK

    : Kxhooleftarro(LunderMNo"erO 6KK

    6 Kxhoorightarro(LunderMNo"erO FKK

    F KxmapstoLunderMNo"erO AKK

    KM

    ) *mair +afique ,//

    align and alignV

  • 7/24/2019 Basic Guidance About LaTeX

    212/222

    The align and alignV en"ironments are used for arranging equations ofmultiple lines% !s (ith matrices and tables5 KK specifies a line brea5 andZ is used to indicate the point at (hich the lines should be aligned%

    KbeginNalignVO

    f.x3 ZX .x`a3.x`b3 KK

    ZX x, ` .a`b3x ` ab KendNalignVO

    KbeginNalignO

    f.x3 ZX x< ` 1x9 ` ,x, Knonumber KK

    ZKqquad NO ` /8x ` /,

    KendNalignO

    ) *mair +afique ,/,

    Braces Spanning multiple lines

  • 7/24/2019 Basic Guidance About LaTeX

    213/222

    KbeginNalignO f.x3 ZX Kpi KleftKN x< ` 1x9 ` ,x, Kright%KnonumberKK

    ZKqquad Kleft% NO ` /8x ` /, KrightKO

    KendNalignO

    ) *mair +afique ,/9

    cases and dcases

  • 7/24/2019 Basic Guidance About LaTeX

    214/222

    KL u.x3 X

    KbeginNcasesO

    KexpNxO Z KtextNif O x Kgeq 8 KK

    / Z KtextNif O x \ 8

    KendNcasesO

    KM

    KL

    a X

    KbeginNdcasesO

    Kint xK5 dxKK

    b,

    KendNdcasesO

    KM

    ) *mair +afique ,/