Part 2: Structured Documents & More Dr John D. Lees

2y ago
30 Views
2 Downloads
608.95 KB
23 Pages
Last View : 2m ago
Last Download : 2m ago
Upload by : Aydin Oneil
Transcription

An Interactive Introduction to LATEXPart 2: Structured Documents & MoreDr John D. Lees-MillerJanuary 26, 2020

OutlineStructured DocumentsTitle and AbstractSectionsLabels and Cross-ReferencesExerciseFigures and ciseWhat’s Next?More Neat ThingsMore Neat PackagesInstalling LATEXOnline Resources

Structured DocumentsIIn Part 1, we learned about commands and environments fortypesetting text and mathematics.INow, we’ll learn about commands and environments forstructuring documents.IYou can try out the new commands in Overleaf:Click here to open the example document in OverleafFor best results, please use Google Chrome or a recent FireFox.ILet’s get started!

Title and AbstractITell LATEX the \title and \author names in the preamble.IThen use \maketitle in the document to actually create the title.IUse the abstract environment to make an abstract.\documentclass{article}\title{The Title}\author{A. Author}The Title\date{\today}A. AuthorJanuary 26, ract goes here.\end{abstract}\end{document}AbstractAbstract goes here.

SectionsIJust use \section and \subsection.ICan you guess what \section* and \subsection* {Introduction}The problem of \ldots\section{Method}1IntroductionThe problem of . . .2MethodWe investigate . . .We investigate \ldots\subsection{Sample Preparation}\subsection{Data nd{document}2.12.2Sample PreparationData Collection3Results4Conclusion

Labels and Cross-ReferencesIUse \label and \ref for automatic numbering.IThe amsmath package provides \eqref for referencing th} % for {sec:intro}1In Section \ref{sec:method}, we \ldotsIntroductionIn Section 2, we . . .2Methodeiπ 1 }\label{eq:euler}e {i\pi} 1 0\end{equation}By \eqref{eq:euler}, we have \ldots\end{document}By (1), we have . . .(1)

Structured Documents ExerciseTypeset this short paper in LATEX:1Click to open the paperMake your paper look like this one. Use \ref and \eqref to avoidexplicitly writing section and equation numbers into the text.Click to open this exercise in OverleafI1Once you’ve tried, click here to see my solution .From http://pdos.csail.mit.edu/scigen/, a random paper generator.

OutlineStructured DocumentsTitle and AbstractSectionsLabels and Cross-ReferencesExerciseFigures and ciseWhat’s Next?More Neat ThingsMore Neat PackagesInstalling LATEXOnline Resources

GraphicsIRequires the graphicx package, which provides the\includegraphics command.ISupported graphics formats include JPEG, PNG and PDF(usually).\includegraphics[width 0.5\textwidth]{gerbil}\includegraphics[width 0.3\textwidth,angle 270]{gerbil}Image license: CC0

Interlude: Optional ArgumentsIWe use square bracketsof braces { } .I\includegraphics accepts optional arguments that allowyou to transform the image when it is included. For example,width 0.3\textwidth makes the image take up 30% of thewidth of the surrounding text (\textwidth).I\documentclass accepts optional arguments, too. or optional arguments, insteadmakes the text bigger (12pt) and puts it into two columns.IWhere do you find out about these? See the slides at the endof this presentation for links to more information.

FloatsIIAllow LATEX to decide where the figure will go (it can “float”).You can also give the figure a caption, which can bereferenced with begin{document}Figure \ref{fig:gerbil} shows dth ww\ldots.}\end{figure}\end{document}Image license: CC0Figure 1: Aww. . . .Figure 1 shows . . .

TablesITables in LATEX take some getting used to.IUse the tabular environment from the tabularx package.IThe argument specifies column alignment — left, right, right.\begin{tabular}{lrr}Item& Qty & Unit \ Widget & 1& 199.99Gadget & 2& 399.99Cable & 3& 19.99\end{tabular}I\\\\\\\\Qty123Unit 199.99399.9919.99It also specifies vertical lines; use \hline for horizontal lines.\begin{tabular}{ l r r } \hlineItem& Qty & Unit \ \\\hlineWidget & 1& 199.99 \\Gadget & 2& 399.99 \\Cable & 3& emWidgetGadgetCableQty123Unit 199.99399.9919.99Use an ampersand & to separate columns and a doublebackslash \ \ to start a new row (like in the align*environment that we saw in part 1).

OutlineStructured DocumentsTitle and AbstractSectionsLabels and Cross-ReferencesExerciseFigures and ciseWhat’s Next?More Neat ThingsMore Neat PackagesInstalling LATEXOnline Resources

bibTEX 1IPut your references in a .bib file in ‘bibtex’ database format:@Article{Jacobson1999Towards,author {Van Jacobson},title {Towards the Analysis of Massive Multiplayer OnlineRole-Playing Games},journal {Journal of Ubiquitous Information},Month jun,Year 1999,Volume 6,Pages or {Fredrick P. Brooks and John Kubiatowicz andChristos Papadimitriou},title {A Methodology for the Study of theLocation-Identity Split},booktitle {Proceedings of OOPSLA},Month jun,Year 1997}IMost reference managers can export to bibtex format.

bibTEX 2IEach entry in the .bib file has a key that you can use toreference it in the document. For example,Jacobson1999Towards is the key for this article:@Article{Jacobson1999Towards,author {Van Jacobson},.}IIt’s a good idea to use a key based on the name, year and title.I LATEXcan automatically format your in-text citations andgenerate a list of references; it knows most standard styles,and you can design your own.

bibTEX 3IUse the natbib package2 with \citet and \citep.IReference \bibliography at the end, and specify dology}show that \ldots. Clearly,all odd numbers are prime\citep{Jacobson1999Towards}.Brooks et al. [1997] show that . . . . Clearly, all odd numbers are prime[Jacobson, 1999].ReferencesFredrick P. Brooks, John Kubiatowicz, and Christos Papadimitriou. A methodology for the study of the location-identity split. In Proceedings of OOPSLA,June 1997.Van Jacobson. Towards the analysis of massive multiplayer online role-playinggames. Journal of Ubiquitous Information, 6:75–83, June 1999.\bibliography{bib-example}% if bib-example' is the name of% your bib file\bibliographystyle{plainnat}% try changing to abbrvnat\end{document}2There is a new package with more features named biblatex but most ofthe articles templates still use natbib.

Exercise: Putting it All TogetherAdd an image and a bibliography to the paper from the previousexercise.1. Download these example files to your computer.Click to download example imageClick to download example bib file2. Upload them to Overleaf (use the project menu).

OutlineStructured DocumentsTitle and AbstractSectionsLabels and Cross-ReferencesExerciseFigures and ciseWhat’s Next?More Neat ThingsMore Neat PackagesInstalling LATEXOnline Resources

More Neat ThingsIAdd the \tableofcontents command to generate a table ofcontents from the \section commands.IChange the \documentclass EEEtran}IDefine your own command for a complicated equation:\newcommand{\rperf}{%\rho {\text{perf}}} \rperf {\bf c}'{\bf X} \varepsilon ρperf c0 X ε

More Neat PackagesIbeamer: for presentations (like this one!)Itodonotes: comments and TODO managementItikz: make amazing graphicsIIpgfplots: create graphs in LATEXlistings: source code printer for LATEXspreadtab: create spreadsheets in LATEXIgchords, guitar: guitar chords and tabulatureIcwpuzzle: crossword puzzlesISee https://www.overleaf.com/latex/examples andhttp://texample.net for examples of (most of) these packages.

Installing LATEXITo run LATEX on your own computer, you’ll want to use aLATEX distribution. A distribution includes a latex programand (typically) several thousand packages.IIIOn Windows: MikTEX or TEXLiveOn Linux: TEXLiveOn Mac: MacTEXIYou’ll also want a text editor with LATEX support. See http://en.wikipedia.org/wiki/Comparison of TeX editorsfor a list of (many) options.IYou’ll also have to know more about how latex and itsrelated tools work — see the resources on the next slide.

Online ResourcesIThe Overleaf Learn Wiki — hosts these slides, more tutorialsand reference materialIThe LATEX Wikibook — excellent tutorials and referencematerial.ITEX Stack Exchange — ask questions and get excellentanswers incredibly quicklyI LATEXCommunity — a large online forumIComprehensive TEX Archive Network (CTAN) — over fourthousand packages plus documentationIGoogle will usually get you to one of the above.

Thanks, and happy TEXing!

Title and Abstract I Tell LATEX the \title and \author names in the preamble. I Then use \maketitle in the document to actually create the title. I Use the abstract environment to make an abstract. \documentclass{article} \title{The Title} \author{A. Author} \date{\today} \begin{document} \maketitle \begin{abstract} Abstract goes here.

Related Documents:

Part No : MS-HTB-4 Part No : MS-HTB-6M Part No : MS-HTB-6T Part No : MS-HTB-8 Part No : MS-TBE-2-7-E-FKIT Part No : MS-TC-308 Part No : PGI-63B-PG5000-LAO2 Part No : RTM4-F4-1 Part No : SS 316 Part No : SS 316L Part No : SS- 43 ZF2 Part No : SS-10M0-1-8 Part No : SS-10M0-6 Part No : SS-12?0-2-8 Part No : SS-12?0-7-8 Part No : SS-1210-3 Part No .

Key takeaway: After being educated on the difference between a lump-sum and a structured settlement, 73 percent of Americans would choose a structured settlement payout when they received their settlement in a personal injury case. Chose structured settlement Chose lump sum CHART 4 - REASONS FOR CHOOSING A STRUCTURED SETTLEMENT

FISHER Stock List Part No : 0305RC33B11 Part No : 1098 Part No : 1098-EGR Part No : 10A3261X12 Part No : 10B8735X012 Part No : 11A1347X012 Part No : 12B7100X082 Part No : 14B3620X012 Part No : 15P1066X062 F Part No : 16A5483X012 Part No : 16A5484X012 Part No : 16A5485X012 Part No : 17492319 Part No : 17A2325X022 Part No : 18A8275X012 Part No .

Structured Classification Some problems require classification of structured outputs For example, part-of-speech tagging x John hit the ball with the stick y N V D N P D N Outputs, y, are structured set of atomic decisions Output space has exponential size relative to input

Moving from structured to open inquiry: Challenges and limits 385 Structured, guided, and open inquiry approaches: advantages and disadvantages The type of inquiry that is more relevant to the teaching and learning facilities available in schools remains controversial among educators. Some teachers prefer using structured or

Part No : FR-PA07 Part No : FR-PU04 Part No : FR-PU07 Part No : FR-U120 Part No : FR-Z220-3.7K Part No : FR-Z240-3.7K-UL Part No : FR-Z-240-75K Part No : FR-Z720-1.5K Part No : FX0N-3A Part No : FX1N-232-BD Part No : FX1N-24MR Part No : FX1N-24MR-ES/UL Part No : FX1N-24MT-ESS/UL Part No :

Upload the e-Bid/ Quotation (bid) documents, technical documents, relevant documents & all the required documents as given below, which are available in the same folder named " Bidders Documents "System will prompt for digital signature certificate while uploading these documents. 4. Packet Bid System:

13. TAB 4: REQUIRED DOCUMENTS All documents must be uploaded in PDF format only. The system will not allow upload of documents in other formats or of documents that exceed the page limits specified in the individual RFAs. Do NOT password protect documents. Do NOT submit documents that are bound together in a single PDF package.