Advanced Formatting in LATEX

Advanced Formatting in LATEX

Advanced Formatting in LATEX Gianluca Bianchin [email protected] Graduate Quantitative Methods Center University of California, Riverside LFSC1425 - March 15, 2018 G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 1 / 31 What is LATEX LaTeX is a document preparation system. When writing, the writer uses plain text as opposed to the formatted text found in WYSIWYG ("what you see is what you get") word processors like Microsoft Worda. ahttps://en.wikipedia.org/wiki/LaTeX G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 2 / 31 About this workshop Why you are here: Your advisor gets mad when he/she sees MS Word documents!! Papers written by your peers look a lot fancier than yours!!! This workshop: Provides useful references to start using LATEX Discusses the usage of templates, and how to start using them LATEX is a lot of "guess-and-check" The most effective way is to learn by doing G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 3 / 31 About this workshop Why you are here: Your advisor gets mad when he/she sees MS Word documents!! Papers written by your peers look a lot fancier than yours!!! This workshop: Provides useful references to start using LATEX Discusses the usage of templates, and how to start using them LATEX is a lot of "guess-and-check" The most effective way is to learn by doing G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 3 / 31 Advanced Formatting in LATEX: Outline 1 Using Templates 2 Document Body 3 Citations Using BibTeX G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 4 / 31 Using Templates G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 5 / 31 Articles template: IEEE Most scientific paper venues provide templates for manuscripts: For instance: IEEE templates link G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 6 / 31 UCR thesis template Another template you may be looking for: UCR thesis template link G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 7 / 31 Components of a template or LATEX documents Source code file: .tex file (source code) ) the only document you should edit Formatting files: .cls file (document class file) .clo file (class option file) .sty file (style file) .bst file (BibTeX style file) .bib file (BibTeX file) G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 8 / 31 Document Body G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 9 / 31 Sectioning The main matter of a typical shorter document is divided into sections LATEXis instructed to start a section with the nsectionftitleg command A section may be subdivided into subsections, which may themselves be divided into subsubsections, paragraphs, and subparagraphs 1 nsectionfg 2 nsubsectionfg 3 nsubsubsectionfg 4 nparagraphfg 5 nsubparagraphfg G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 10 / 31 Sectioning The main matter of a typical shorter document is divided into sections LATEXis instructed to start a section with the nsectionftitleg command A section may be subdivided into subsections, which may themselves be divided into subsubsections, paragraphs, and subparagraphs 1 nsectionfg 2 nsubsectionfg 3 nsubsubsectionfg 4 nparagraphfg 5 nsubparagraphfg G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 10 / 31 Sectioning Any nsection command may be followed by a nlabel command, so that you can refer to the section number generated by LATEX 1 nsectionfIntroductiong 2 nlabelfSec:introg 3 The command nreffS:introg refers to the number of the section and the command npagereffS:introg refers to the number of the typeset page where the section title appears. G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 11 / 31 Backslash operator in LATEX The Backslah operator is used for Commands nsectionfg, ncitefg, nreffg, nlabelfg, nbeginfg, nendfg Formatting (discuss double backslash) ntetxitfg, ntextbffg, nn Special characters and math nsigma, nPhi, nfracfgfg,nsum fgˆfg Show reserved characters n#, n$, nˆ, n%, n&, nf, ng G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 12 / 31 Numbered lists A numbered list is created with the enumerate environment: 1 This space has the following properties: 2 nbeginfenumerateg 3 nitem Grade 2 Cantor; nlabelfCantorg 4 nitem Half-smooth Hausdorff; nlabelfHausdorffg 5 nitem Metrizably smooth. nlabelfsmoothg 6 nendfenumerateg 7 Therefore, we can apply the Main Theorem. G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 13 / 31 Numbered lists A numbered list is created with the enumerate environment: 1 This space has the following properties: 2 nbeginfenumerateg 3 nitem Grade 2 Cantor; nlabelfCantorg 4 nitem Half-smooth Hausdorff; nlabelfHausdorffg 5 nitem Metrizably smooth. nlabelfsmoothg 6 nendfenumerateg 7 Therefore, we can apply the Main Theorem. G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 13 / 31 Bulleted lists A bulleted list is created with the itemize environment: 1 We set out to accomplish a variety of goals: 2 nbeginfitemizeg 3 nitem To introduce the concept of smooth functions. 4 nitem To show their usefulness in differentiation. 5 nitem To point out the efficacy of using smooth functions in Calculus. 6 nendfitemizeg G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 14 / 31 Bulleted lists A bulleted list is created with the itemize environment: 1 We set out to accomplish a variety of goals: 2 nbeginfitemizeg 3 nitem To introduce the concept of smooth functions. 4 nitem To show their usefulness in differentiation. 5 nitem To point out the efficacy of using smooth functions in Calculus. 6 nendfitemizeg G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 14 / 31 Floating: tables and figures Figures and tables are treated in a special way in LATEXsince they cannot be broken across pages LATEXmoves (floats) a table or an illustration to the top or bottom of the current or the next page if possible Further away otherwise Placing tables and figures is often a tedious guess-and-check process, that requires extensive help from Google G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 15 / 31 Floating: tables and figures Figures and tables are treated in a special way in LATEXsince they cannot be broken across pages LATEXmoves (floats) a table or an illustration to the top or bottom of the current or the next page if possible Further away otherwise Placing tables and figures is often a tedious guess-and-check process, that requires extensive help from Google G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 15 / 31 Tables A table environment is set up as follows: 1 nbeginftableg 2 Place the table here 3 ncaptionftitle g 4 nlabelfTa:xxx g 5 nendftableg where nreffTa:xxx g references the table in the text Most templates have strict rules on tables formatting (see conference.tex) G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 16 / 31 Figures A figure environment is set up as follows: 1 ( nusepackagefgraphicxg ) 2 3 nbeginffigureg 4 Place the graphics here 5 ncaptionftitle g 6 nlabelfFi:xxx g 7 nendffigureg where nreffFi:xxx g references the figure in the text Most templates have strict rules on figures formatting (see conference.tex) G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 17 / 31 In-Line vs Displayed formulas P1 k This is an in-line formula k=0 r , while the following is a displayed formula: 1 X rk (1) k=0 Large symbols appear in a "compact" version in in-line formulas. 1 This is an in-line formula $nsum fk=0gˆfninftyg rˆk$, 2 while the following is a displayed formula G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 18 / 31 In-Line vs Displayed formulas P1 k This is an in-line formula k=0 r , while the following is a displayed formula: 1 X rk (1) k=0 Large symbols appear in a "compact" version in in-line formulas. 1 This is an in-line formula $nsum fk=0gˆfninftyg rˆk$, 2 while the following is a displayed formula G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 18 / 31 Displayed formulas The equation environment creates a displayed formula and automatically generates an equation number 1 nbeginfequationg 2 nlabelfE:firstIntegralg 3 nint f0gˆfnpig nsinx n, dx = 2 4 nendfequationg The equation number, which is automatically generated, depends on how many numbered displayed formulas occur before the given equation G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 19 / 31 Displayed formulas The equation environment creates a displayed formula and automatically generates an equation number 1 nbeginfequationg 2 nlabelfE:firstIntegralg 3 nint f0gˆfnpig nsinx n, dx = 2 4 nendfequationg The equation number, which is automatically generated, depends on how many numbered displayed formulas occur before the given equation G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 19 / 31 Displayed formulas: referencing To reference a formula without having to remember its number (which also can change when you edit your document) give the equation a symbolic label by using the nlabel command and refer to the equation in your document by using 1 see~(nreffE:firstIntegralg) on page~npagereffE:firstIntegralg. G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX March 15, 2018 20 / 31 Aligned formulas Alignment is very important for multi-line formulas, especially when working with double column documents. LATEX has many ways to typeset multiline formulas. One of these is the align environment. r2 = s2 + t2; 2u + 1 = v + wα; x + z x = p s + 2u 1 nbeginfalign*g % Non-starred version will add multiple numbers 2 rˆf2g = nsqrtfsg,nn 3 2u + 1 = v + wˆfnalphag,nn 4 x = nfracfx+zgfnsqrtfs+2uggnn 5 nendfalign*g G.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    38 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us