SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Introduction to LaTeX
       Christoph Pickl




Monday, February 23, 2009      1
Who knows (La-)TeX?




Monday, February 23, 2009                         2
Who has ever written a document with it?




Monday, February 23, 2009                                      3
Who has ever written a package?




Monday, February 23, 2009                                     4
Agenda

       1. Basics – First steps with LaTeX

            • Creating a LaTeX-Document with commands and environments


       2. Intermediate – Becoming a TeXpert

            • Structuring text, font styles, images, tables


       3. Advanced – Becoming a real Guru

            • Math, references, custom commands and environments




Monday, February 23, 2009                                                5
Basics   First steps with LaTeX


Monday, February 23, 2009                                     6
standard dokumentenklassen sind nicht so gut
                                   (USA spezifisch, unflexibel)


       Ingredients
                                   KOMA-skript bietet abhilfe!
                                   Oder besser: memoir klasse




       • Documentclass
            • book, article, ...

       • Packages


       • Commands

                foobar[optarg]{reqarg}

       • Environments

                begin{foo} ... end{foo}




Monday, February 23, 2009                                                         7
All you need is ...

        documentclass[myoptions]{mydocumentclass}

        usepackage[latin1]{inputenc}
        usepackage[ngerman]{babel}
        usepackage{mypackage}

        % layout definitions
        % etc ...

        begin{document}
          % actual content of the document
        end{document}


Monday, February 23, 2009                            8
Document Content

       • Linefeeds will seperate paragraphs from each other:

        My first paragraph. ↵
        Sentence two will be on same line. ↵
        ↵
        My second paragraph. ↵
         % enforce linebreak, or use newline command ↵
        My third paragraph.




Monday, February 23, 2009                                      9
Titlepage

       • First of all define some metadata ...

        title{{LaTeX} Introduction}
        author{Christoph Pickl}
        date{today}

       • ... then invoke proper command:

        begin{document}
          maketitle
         newpage
         % ...
        end{document}


Monday, February 23, 2009                       10
Intermediate   Becoming a TeXpert


Monday, February 23, 2009                                       11
Ingredients

       • Structuring Text


       • Font Styles


       • Lists


       • Images


       • Tables




Monday, February 23, 2009   12
Structuring Text

        documentclass[a4paper]{scrartcl}
        usepackage[latin1]{inputenc}
        usepackage[ngerman]{babel}
        title{{LaTeX} Introduction}
        author{Christoph Pickl}
        date{today}
        begin{document}
        % maketitle
        % newpage
                                      input{} erzeugt keinen seitenumbruch
        include{01_mychapter}
        end{document}



Monday, February 23, 2009                                                     13
Structuring Text ctd.

       • Make use of section, subsection, subsubsection, paragraph, ...

        section{Introduction}
        subsection{All you need is ldots}
        subsection{Titlepage}

        section{Intermediate}
        subsection{Structuring Text}
        subsubsection{Table of Contents}

       • Automatically print contents with tableofcontents




Monday, February 23, 2009                                                 14
Font Styles

                              Command          Output

                                               Foobar
                            textbf{Foobar}

                                               Foobar
                            textit{Foobar}

                                               Foobar
                            texttt{Foobar}
                                                    x
                    tiny{x}, scriptsize{x}    x

                                                xx
                      small{x}, large{x},
                                                xx
                    Large{x}, LARGE{x}
                                                xx
                       huge{x}, Huge{x}


Monday, February 23, 2009                               15
Lists

       • Define an unordered list (using a default circle as bullet icon):

        begin{itemize}
          item My first item
        end{itemize}

       • Define an ordered list (using default arabic digits with a trailing dot):

        begin{enumerate}
          item My first item
          item My second item
        end{enumerate}



Monday, February 23, 2009                                                           16
Images

       • First have to include a required package:

        usepackage{graphicx}

       • Then put the image via includegraphics in a figure environment:

        begin{figure}[!h] % enforce position here (top, page, bottom)
          centering
          includegraphics{Christoph_Pickl_himself.png}
          caption{Picture of Christoph Pickl}
          label{IMG:christoph_pickl}
        end{figure}



Monday, February 23, 2009                                                  17
Tables

       • Tables are actually only tabulators with borders:

        begin{table}[htpb]
          begin{center}
            begin{tabular}{l|c|c} % alignment via: left, center, right
             & textbf{Heading 1}
 textbf{Heading 2}  hline hline
                                   &
              Row 1 & Cell 1/1 & Cell 2/1  hline
              Row 2 & Cell 1/2 & Cell 2/2 
            end{tabular}
          end{center}
          caption{This is my first table} label{TBL:first_table}
        end{table}



Monday, February 23, 2009                                                 18
Advanced   Becoming a real Guru


Monday, February 23, 2009                                     19
Ingredients

       • Math Formulas


       • Citations


       • References


       • Own Commands & Environments




Monday, February 23, 2009              20
Mathematical Formulas

       • Put all of your math stuff in dollar signs:

        The variable $x$ contains the value of $y$.


       • Typeset some more complicate formulas:

        neg (A rightarrow B ) hspace{0.4cm}Rightarrow
        hspace{0.4cm} neg ( neg A vee B ) hspace{0.4cm}
        Rightarrow hspace{0.4cm} neg neg A wedge neg B
        hspace{0.4cm}Rightarrow hspace{0.4cm} A wedge neg B




Monday, February 23, 2009                                          21
Citations

       • First have to define bibliography database:

        begin{thebibliography}{99}
          bibitem[PiPr09]{BIB:pickl_preining_book}
           Christoph Pickl and Norbert Preining:
           textit{Some non-existing book}. O'Reilly Inc., {bf 2009}
        end{thebibliography}

       • Anywhere in the text reference the book via the cite command:

        As mentioned in~cite{BIB:pickl_preining_book}.

       • For a more sophisticating approach have a look at bibtex



Monday, February 23, 2009                                                22
References

       • Put labels on images, tables, sections, ...

        begin{figure}
        
 includegraphics{Christoph_Pickl_himself.png}
        
 caption{Picture of Christoph Pickl}
        
 label{IMG:christoph_pickl}
        end{figure}

       • Then reference the section itself or the page it occurs:


        As you can see in Figure~ref{IMG:christoph_pickl} on page~
        pageref{IMG:christoph_pickl}.
                                                        Label auch auf section draufgeben




Monday, February 23, 2009                                                                   23
Custom Commands & Environments

       • For example, create a shortcut to include graphics:

        newcommand{mycmd}[1]{
          begin{figure}centeringincludegraphics{#1}end{figure}
        }
        mycmd{Christoph_Pickl_himself.png}

       • Or a shortcut to produce a centered math environment:

        newenvironment{myenv}[1]
         { textbf{#1} says: begin{center}begin{math} }
         { end{math}end{center} }
        begin{myenv} x Rightarrow y end{myenv}

                            http://en.wikibooks.org/wiki/LaTeX/Customizing_LaTeX
Monday, February 23, 2009                                                      24
Summary

            • Commands and environments form the basic concepts


            • More functionality is provided via packages


            • All common elements are supported out-of-the-box:


                  • Lists, tables, images, automatic indices, references, footnotes, ...


            • Have to know many commands, but very powerful underneath




Monday, February 23, 2009                                                                  25
Links

       • http://tobi.oetiker.ch/lshort/lshort.pdf


       • http://web.student.tuwien.ac.at/~e0525580/rsrc/Christoph_Pickl-
         Latex_Schnelleinstieg.pdf


       • http://www.dante.de/faq/de-tex-faq/html/de-tex-faq.html


       • http://www.haptonstahl.org/latex/index.php


       • http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideLay.php




Monday, February 23, 2009                                                  26

Contenu connexe

Similaire à JSUG - LaTeX Introduction by Christoph Pickl

Similaire à JSUG - LaTeX Introduction by Christoph Pickl (13)

Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabati
 
JSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph PicklJSUG - TeX Day by Christoph Pickl
JSUG - TeX Day by Christoph Pickl
 
Latex_Tutorial.pdf
Latex_Tutorial.pdfLatex_Tutorial.pdf
Latex_Tutorial.pdf
 
LaTeX Part 2
LaTeX Part 2LaTeX Part 2
LaTeX Part 2
 
Ruby sittin' on the Couch
Ruby sittin' on the CouchRuby sittin' on the Couch
Ruby sittin' on the Couch
 
Latex cheat sheet
Latex cheat sheetLatex cheat sheet
Latex cheat sheet
 
Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016
 
Electronic Grading of Paper Assessments
Electronic Grading of Paper AssessmentsElectronic Grading of Paper Assessments
Electronic Grading of Paper Assessments
 
Paexec -- distributed tasks over network or cpus
Paexec -- distributed tasks over network or cpusPaexec -- distributed tasks over network or cpus
Paexec -- distributed tasks over network or cpus
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
LaTeX-Module 3 & 4.pptx
LaTeX-Module 3 & 4.pptxLaTeX-Module 3 & 4.pptx
LaTeX-Module 3 & 4.pptx
 
ورشة العمل 7
ورشة العمل 7ورشة العمل 7
ورشة العمل 7
 
محاضرة 7
محاضرة 7محاضرة 7
محاضرة 7
 

Plus de Christoph Pickl

JSUG - AS3 vs Java by Christoph Pickl
JSUG - AS3 vs Java by Christoph PicklJSUG - AS3 vs Java by Christoph Pickl
JSUG - AS3 vs Java by Christoph PicklChristoph Pickl
 
JSUG - Layouting TeX documents with the Memoir class
JSUG - Layouting TeX documents with the Memoir classJSUG - Layouting TeX documents with the Memoir class
JSUG - Layouting TeX documents with the Memoir classChristoph Pickl
 
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven Dolg
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven DolgJSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven Dolg
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven DolgChristoph Pickl
 
JSUG - ActionScript 3 vs Java by Christoph Pickl
JSUG - ActionScript 3 vs Java by Christoph PicklJSUG - ActionScript 3 vs Java by Christoph Pickl
JSUG - ActionScript 3 vs Java by Christoph PicklChristoph Pickl
 
JSUG - TeX, LaTeX und der Rest by Norbert Preining
JSUG - TeX, LaTeX und der Rest by Norbert PreiningJSUG - TeX, LaTeX und der Rest by Norbert Preining
JSUG - TeX, LaTeX und der Rest by Norbert PreiningChristoph Pickl
 
JSUG - The Sound of Shopping by Christoph Pickl
JSUG - The Sound of Shopping by Christoph PicklJSUG - The Sound of Shopping by Christoph Pickl
JSUG - The Sound of Shopping by Christoph PicklChristoph Pickl
 
JSUG - Tim aka EPROG2 by Martin Schuerrer
JSUG - Tim aka EPROG2 by Martin SchuerrerJSUG - Tim aka EPROG2 by Martin Schuerrer
JSUG - Tim aka EPROG2 by Martin SchuerrerChristoph Pickl
 
JSUG - Java Service Enabler by Andreas Hubmer
JSUG - Java Service Enabler by Andreas HubmerJSUG - Java Service Enabler by Andreas Hubmer
JSUG - Java Service Enabler by Andreas HubmerChristoph Pickl
 
JSUG - Hoppla by Florian Motlik and Petar Petrov
JSUG - Hoppla by Florian Motlik and Petar PetrovJSUG - Hoppla by Florian Motlik and Petar Petrov
JSUG - Hoppla by Florian Motlik and Petar PetrovChristoph Pickl
 
JSUG - Google Web Toolkit by Hans Sowa
JSUG - Google Web Toolkit by Hans SowaJSUG - Google Web Toolkit by Hans Sowa
JSUG - Google Web Toolkit by Hans SowaChristoph Pickl
 
JSUG - TU Wien Cocoon Project by Andreas Pieber
JSUG - TU Wien Cocoon Project by Andreas PieberJSUG - TU Wien Cocoon Project by Andreas Pieber
JSUG - TU Wien Cocoon Project by Andreas PieberChristoph Pickl
 
JSUG - TU Wien Castor Project by Lukas Lang
JSUG - TU Wien Castor Project by Lukas LangJSUG - TU Wien Castor Project by Lukas Lang
JSUG - TU Wien Castor Project by Lukas LangChristoph Pickl
 
JSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederJSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederChristoph Pickl
 
JSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklJSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklChristoph Pickl
 
JSUG - Seam by Florian Motlik
JSUG - Seam by Florian MotlikJSUG - Seam by Florian Motlik
JSUG - Seam by Florian MotlikChristoph Pickl
 
JSUG - Google Guice by Jan Zarnikov
JSUG - Google Guice by Jan ZarnikovJSUG - Google Guice by Jan Zarnikov
JSUG - Google Guice by Jan ZarnikovChristoph Pickl
 
JSUG - Java FX by Christoph Pickl
JSUG - Java FX by Christoph PicklJSUG - Java FX by Christoph Pickl
JSUG - Java FX by Christoph PicklChristoph Pickl
 
JSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklJSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklChristoph Pickl
 
JSUG - Inversion Of Control by Florian Motlik
JSUG - Inversion Of Control by Florian MotlikJSUG - Inversion Of Control by Florian Motlik
JSUG - Inversion Of Control by Florian MotlikChristoph Pickl
 
JSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan ZarnikovJSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan ZarnikovChristoph Pickl
 

Plus de Christoph Pickl (20)

JSUG - AS3 vs Java by Christoph Pickl
JSUG - AS3 vs Java by Christoph PicklJSUG - AS3 vs Java by Christoph Pickl
JSUG - AS3 vs Java by Christoph Pickl
 
JSUG - Layouting TeX documents with the Memoir class
JSUG - Layouting TeX documents with the Memoir classJSUG - Layouting TeX documents with the Memoir class
JSUG - Layouting TeX documents with the Memoir class
 
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven Dolg
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven DolgJSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven Dolg
JSUG - Cocoon3 Student Project Idea by Reinhard Poetz and Steven Dolg
 
JSUG - ActionScript 3 vs Java by Christoph Pickl
JSUG - ActionScript 3 vs Java by Christoph PicklJSUG - ActionScript 3 vs Java by Christoph Pickl
JSUG - ActionScript 3 vs Java by Christoph Pickl
 
JSUG - TeX, LaTeX und der Rest by Norbert Preining
JSUG - TeX, LaTeX und der Rest by Norbert PreiningJSUG - TeX, LaTeX und der Rest by Norbert Preining
JSUG - TeX, LaTeX und der Rest by Norbert Preining
 
JSUG - The Sound of Shopping by Christoph Pickl
JSUG - The Sound of Shopping by Christoph PicklJSUG - The Sound of Shopping by Christoph Pickl
JSUG - The Sound of Shopping by Christoph Pickl
 
JSUG - Tim aka EPROG2 by Martin Schuerrer
JSUG - Tim aka EPROG2 by Martin SchuerrerJSUG - Tim aka EPROG2 by Martin Schuerrer
JSUG - Tim aka EPROG2 by Martin Schuerrer
 
JSUG - Java Service Enabler by Andreas Hubmer
JSUG - Java Service Enabler by Andreas HubmerJSUG - Java Service Enabler by Andreas Hubmer
JSUG - Java Service Enabler by Andreas Hubmer
 
JSUG - Hoppla by Florian Motlik and Petar Petrov
JSUG - Hoppla by Florian Motlik and Petar PetrovJSUG - Hoppla by Florian Motlik and Petar Petrov
JSUG - Hoppla by Florian Motlik and Petar Petrov
 
JSUG - Google Web Toolkit by Hans Sowa
JSUG - Google Web Toolkit by Hans SowaJSUG - Google Web Toolkit by Hans Sowa
JSUG - Google Web Toolkit by Hans Sowa
 
JSUG - TU Wien Cocoon Project by Andreas Pieber
JSUG - TU Wien Cocoon Project by Andreas PieberJSUG - TU Wien Cocoon Project by Andreas Pieber
JSUG - TU Wien Cocoon Project by Andreas Pieber
 
JSUG - TU Wien Castor Project by Lukas Lang
JSUG - TU Wien Castor Project by Lukas LangJSUG - TU Wien Castor Project by Lukas Lang
JSUG - TU Wien Castor Project by Lukas Lang
 
JSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederJSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael Greifeneder
 
JSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklJSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph Pickl
 
JSUG - Seam by Florian Motlik
JSUG - Seam by Florian MotlikJSUG - Seam by Florian Motlik
JSUG - Seam by Florian Motlik
 
JSUG - Google Guice by Jan Zarnikov
JSUG - Google Guice by Jan ZarnikovJSUG - Google Guice by Jan Zarnikov
JSUG - Google Guice by Jan Zarnikov
 
JSUG - Java FX by Christoph Pickl
JSUG - Java FX by Christoph PicklJSUG - Java FX by Christoph Pickl
JSUG - Java FX by Christoph Pickl
 
JSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph PicklJSUG - Tech Tips1 by Christoph Pickl
JSUG - Tech Tips1 by Christoph Pickl
 
JSUG - Inversion Of Control by Florian Motlik
JSUG - Inversion Of Control by Florian MotlikJSUG - Inversion Of Control by Florian Motlik
JSUG - Inversion Of Control by Florian Motlik
 
JSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan ZarnikovJSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan Zarnikov
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

JSUG - LaTeX Introduction by Christoph Pickl

  • 1. Introduction to LaTeX Christoph Pickl Monday, February 23, 2009 1
  • 2. Who knows (La-)TeX? Monday, February 23, 2009 2
  • 3. Who has ever written a document with it? Monday, February 23, 2009 3
  • 4. Who has ever written a package? Monday, February 23, 2009 4
  • 5. Agenda 1. Basics – First steps with LaTeX • Creating a LaTeX-Document with commands and environments 2. Intermediate – Becoming a TeXpert • Structuring text, font styles, images, tables 3. Advanced – Becoming a real Guru • Math, references, custom commands and environments Monday, February 23, 2009 5
  • 6. Basics First steps with LaTeX Monday, February 23, 2009 6
  • 7. standard dokumentenklassen sind nicht so gut (USA spezifisch, unflexibel) Ingredients KOMA-skript bietet abhilfe! Oder besser: memoir klasse • Documentclass • book, article, ... • Packages • Commands foobar[optarg]{reqarg} • Environments begin{foo} ... end{foo} Monday, February 23, 2009 7
  • 8. All you need is ... documentclass[myoptions]{mydocumentclass} usepackage[latin1]{inputenc} usepackage[ngerman]{babel} usepackage{mypackage} % layout definitions % etc ... begin{document} % actual content of the document end{document} Monday, February 23, 2009 8
  • 9. Document Content • Linefeeds will seperate paragraphs from each other: My first paragraph. ↵ Sentence two will be on same line. ↵ ↵ My second paragraph. ↵ % enforce linebreak, or use newline command ↵ My third paragraph. Monday, February 23, 2009 9
  • 10. Titlepage • First of all define some metadata ... title{{LaTeX} Introduction} author{Christoph Pickl} date{today} • ... then invoke proper command: begin{document} maketitle newpage % ... end{document} Monday, February 23, 2009 10
  • 11. Intermediate Becoming a TeXpert Monday, February 23, 2009 11
  • 12. Ingredients • Structuring Text • Font Styles • Lists • Images • Tables Monday, February 23, 2009 12
  • 13. Structuring Text documentclass[a4paper]{scrartcl} usepackage[latin1]{inputenc} usepackage[ngerman]{babel} title{{LaTeX} Introduction} author{Christoph Pickl} date{today} begin{document} % maketitle % newpage input{} erzeugt keinen seitenumbruch include{01_mychapter} end{document} Monday, February 23, 2009 13
  • 14. Structuring Text ctd. • Make use of section, subsection, subsubsection, paragraph, ... section{Introduction} subsection{All you need is ldots} subsection{Titlepage} section{Intermediate} subsection{Structuring Text} subsubsection{Table of Contents} • Automatically print contents with tableofcontents Monday, February 23, 2009 14
  • 15. Font Styles Command Output Foobar textbf{Foobar} Foobar textit{Foobar} Foobar texttt{Foobar} x tiny{x}, scriptsize{x} x xx small{x}, large{x}, xx Large{x}, LARGE{x} xx huge{x}, Huge{x} Monday, February 23, 2009 15
  • 16. Lists • Define an unordered list (using a default circle as bullet icon): begin{itemize} item My first item end{itemize} • Define an ordered list (using default arabic digits with a trailing dot): begin{enumerate} item My first item item My second item end{enumerate} Monday, February 23, 2009 16
  • 17. Images • First have to include a required package: usepackage{graphicx} • Then put the image via includegraphics in a figure environment: begin{figure}[!h] % enforce position here (top, page, bottom) centering includegraphics{Christoph_Pickl_himself.png} caption{Picture of Christoph Pickl} label{IMG:christoph_pickl} end{figure} Monday, February 23, 2009 17
  • 18. Tables • Tables are actually only tabulators with borders: begin{table}[htpb] begin{center} begin{tabular}{l|c|c} % alignment via: left, center, right & textbf{Heading 1} textbf{Heading 2} hline hline & Row 1 & Cell 1/1 & Cell 2/1 hline Row 2 & Cell 1/2 & Cell 2/2 end{tabular} end{center} caption{This is my first table} label{TBL:first_table} end{table} Monday, February 23, 2009 18
  • 19. Advanced Becoming a real Guru Monday, February 23, 2009 19
  • 20. Ingredients • Math Formulas • Citations • References • Own Commands & Environments Monday, February 23, 2009 20
  • 21. Mathematical Formulas • Put all of your math stuff in dollar signs: The variable $x$ contains the value of $y$. • Typeset some more complicate formulas: neg (A rightarrow B ) hspace{0.4cm}Rightarrow hspace{0.4cm} neg ( neg A vee B ) hspace{0.4cm} Rightarrow hspace{0.4cm} neg neg A wedge neg B hspace{0.4cm}Rightarrow hspace{0.4cm} A wedge neg B Monday, February 23, 2009 21
  • 22. Citations • First have to define bibliography database: begin{thebibliography}{99} bibitem[PiPr09]{BIB:pickl_preining_book} Christoph Pickl and Norbert Preining: textit{Some non-existing book}. O'Reilly Inc., {bf 2009} end{thebibliography} • Anywhere in the text reference the book via the cite command: As mentioned in~cite{BIB:pickl_preining_book}. • For a more sophisticating approach have a look at bibtex Monday, February 23, 2009 22
  • 23. References • Put labels on images, tables, sections, ... begin{figure} includegraphics{Christoph_Pickl_himself.png} caption{Picture of Christoph Pickl} label{IMG:christoph_pickl} end{figure} • Then reference the section itself or the page it occurs: As you can see in Figure~ref{IMG:christoph_pickl} on page~ pageref{IMG:christoph_pickl}. Label auch auf section draufgeben Monday, February 23, 2009 23
  • 24. Custom Commands & Environments • For example, create a shortcut to include graphics: newcommand{mycmd}[1]{ begin{figure}centeringincludegraphics{#1}end{figure} } mycmd{Christoph_Pickl_himself.png} • Or a shortcut to produce a centered math environment: newenvironment{myenv}[1] { textbf{#1} says: begin{center}begin{math} } { end{math}end{center} } begin{myenv} x Rightarrow y end{myenv} http://en.wikibooks.org/wiki/LaTeX/Customizing_LaTeX Monday, February 23, 2009 24
  • 25. Summary • Commands and environments form the basic concepts • More functionality is provided via packages • All common elements are supported out-of-the-box: • Lists, tables, images, automatic indices, references, footnotes, ... • Have to know many commands, but very powerful underneath Monday, February 23, 2009 25
  • 26. Links • http://tobi.oetiker.ch/lshort/lshort.pdf • http://web.student.tuwien.ac.at/~e0525580/rsrc/Christoph_Pickl- Latex_Schnelleinstieg.pdf • http://www.dante.de/faq/de-tex-faq/html/de-tex-faq.html • http://www.haptonstahl.org/latex/index.php • http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideLay.php Monday, February 23, 2009 26