Short introduction to L T EX A A. D. Short introduction to L A T EX Christensen A tour of features with many examples Outline Introduction Differences to WYSIWYG editors Anders Damsgaard Christensen Required software Writing with L A T EX Document structure anders.damsgaard@geo.au.dk Formatting Useful packages Bibliography April 28, 2010 management External resources Conclusions
Outline Short introduction to L T EX A 1 Introduction A. D. Differences to WYSIWYG editors Christensen Required software Outline Introduction 2 Writing with L A T EX Differences to WYSIWYG editors Document structure Required software Formatting Writing with L A T EX Document 3 Useful packages structure Formatting Useful 4 Bibliography management packages Bibliography management 5 External resources External resources Conclusions
Introduction Short introduction to L T EX A A. D. Christensen T EX is a low-level markup and programming language, Outline created to typeset documents attractively and consistently Introduction Differences to WYSIWYG editors Required L A T EX is a package based on T EX, its purpose is to simplify software TeX typesetting Writing with L A T EX Document structure Today widely used for publications Formatting Useful packages Bibliography management External resources Conclusions
Differences to WYSIWYG editors Short introduction to L T EX A You can’t see the final result straight away. A. D. Christensen Everything is controlled with written commands. Outline Introduction The document is written in a self-chosen text editor Differences to WYSIWYG editors and saved in a .tex -file. Required software L A T EX converts .tex -file into a .pdf -file. Writing with L A T EX Document Advantages: structure Formatting The layout, fonts, tables etc. are consistent throughout. Useful packages Mathematical formulae can be easily typeset. Bibliography management Indexes, footnotes and references are generated easily. External resources Conclusions
Software examples Short introduction to L T EX A Requirements: A. D. 1 Text Editor Christensen 2 L A T EX-binaries Outline Introduction 3 Output viewer for DVI/PDF files Differences to WYSIWYG editors Windows: 1 (Notepad), TeXnicCenter Required software 2 MiKTeX Writing with L A T EX 3 Sumatra PDF Document structure OS X: 1 TeXShop Formatting 2 MacTeX or TeX-live Useful packages Linux: 1 Emacsen, gvim, Texmaker, Kile Bibliography management 2 TeX-live External resources Conclusions
Document structure The document environment Short introduction to L T EX A A. D. The structure of a .tex -file: Christensen \ documentclass [11 pt , a 4 paper , oneside ] { report } Outline Introduction % Preamble : A c t i v a t i o n of e x t r a packages , etc . Differences to WYSIWYG editors % Top matter : T i t l e , author , etc . Required software Writing with \ begin { document } L A T EX . . . Document % Document t e x t structure Formatting . . . Useful \ end { document } packages Bibliography management External resources Conclusions
Document structure Page layout Short introduction to L T EX A The document class command: A. D. Christensen \ documentclass [ options ] { class } Outline Introduction Example: Differences to WYSIWYG editors \ documentclass [11 pt , a 4 paper , oneside ] { report } Required software Writing with L A T EX or Document structure Formatting . . . [ a 4 paper , twoside , twocolumns ] { article } Useful packages Bibliography Some document classes: management article , report , letter , beamer , book External resources Conclusions
Document structure Title Title ( inserted right after \begin{document} ): Short introduction to L T EX A \ title { A LaTeX Document } A. D. \ author { Anders Christensen \\ Damsgaard Christensen University } Aarhus \ date {\ today } Outline Introduction \ maketitle Differences to WYSIWYG editors Required software Writing with L A T EX A LaTeX Document Document structure Formatting Anders Damsgaard Christensen Useful Aarhus University packages April 25, 2010 Bibliography management External Figure: Example of title resources Conclusions
Document structure Sections and hierarchy Short introduction to L T EX A Sectioning commands: A. D. Christensen \ part { title } Outline \ chapter { title } % Only used i n books and r e p o r t s Introduction Differences to WYSIWYG \ section { title } editors Required software \ subsection { title } Writing with L A T EX \ subsubsection { title } Document structure Formatting \ paragraph { title } Useful packages \ subparagraph { title } Bibliography management External resources Conclusions
Document structure Table of contents Table of contents 1 : Short introduction to L T EX A \ tableofcontents A. D. \ listoffigures Christensen \ listoftables Outline Introduction Contents Differences to WYSIWYG editors Required software 1 About the course 3 Writing with 2 Framework of climate science 4 2.1 Climate systems – forcing and response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 L A T EX 2.1.1 Feedbacks in the climate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Climage archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Document 2.2.1 Dating climate records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 structure 2.3 Climatic data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Formatting 2.3.1 Biotic data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3.2 Geological and geochemical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Useful 2.4 Atmospheric circulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 packages 3 Tectonic-scale climate change 8 3.1 Carbon dioxide and long-term climate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Bibliography 3.1.1 The greenhouse effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 management 3.1.2 Faint young Sun paradox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.3 Carbon exchange between rocks and the atmosphere . . . . . . . . . . . . . . . . . 8 3.1.4 The Gaia hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 External 3.1.5 Snowball Earth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 resources 3.2 Plate tectonics and long-term climate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Conclusions 1 Two compilations required
Formatting Paragraph spacing & -indenting Short introduction to L T EX A Document text placed between A. D. Christensen \begin{document} and \end{document} Outline Line break: \\ (2 × backslashes) Introduction Differences to WYSIWYG Paragraph separation: Two breakspaces (2 × enter) editors Required software Line of comment: Begins with % Writing with L A T EX Indent of first line vs. vertical paragraph spacing Document structure Formatting Modified in the preamble: Useful packages \setlength{\parskip}{1cm plus4mm minus3mm} Bibliography \setlength{\parindent}{0mm} management External resources Conclusions
Formatting Text styles and -size Short \emph{...} I want to emphasize introduction to L T EX A \textbf{...} Bold A. D. \texttt{...} Fixed width teletypefont Christensen \textsc{...} Small Capitals Outline Introduction \tiny{...} Differences to sample text WYSIWYG editors \scriptsize{...} sample text Required software \footnotesize{...} sample text Writing with \small{...} sample text L A T EX Document \normalsize{...} sample text structure Formatting sample text \large{...} Useful sample text packages \Large{...} Bibliography sample text \LARGE{...} management sample text External \huge{...} resources sample text Conclusions \Huge{...}
Footnotes Short introduction Footnotes are added to the text via the \footnote{...} to L T EX A command. A. D. Christensen Inserting a footnote: Outline Bla bla bla \ f o o t n o t e { Footnote text } bla Introduction blaaa \ f o o t n o t e { Second footnote } Differences to WYSIWYG editors Required software Writing with Footnote example L A T EX Document Bla bla bla a bla blaaa b structure Formatting Useful a Footnote text packages b Second footnote Bibliography management Margin text is added to the text via the \marginpar{...} External resources command. Conclusions
Document structure Mathematics Short introduction $ math $ : Math in text paragraph to L T EX A A. D. \ [ math \ ] : Math centered, separated from text Christensen \begin{equation} math \end{equation} : Outline Math centered, separated from text and labelled Introduction Differences to WYSIWYG Math typesetting example: editors Required software defines $ a 1 $ This example as the Writing with ratio $ \ frac { 2 \ cdot b }{ c } $ minus $ \ beta $ : L A T EX \ [ a 1 = \ frac { 2 \ cdot b }{ c } − \ beta \ ] Document structure Formatting Useful This example defines a 1 as the ratio 2 · b minus β : packages c Bibliography management a 1 = 2 · b − β External c resources Conclusions
Recommend
More recommend