SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
An Intro to LTEXPart I
                        A

   An introduction to creating a LTEXdocument
                                 A




                    Aubry W. Verret

Brown Science and Engineering Library Research Computing Lab


                  November 10, 2008
Outline I
   Introduction to LTEX
                   A
       What is LTEX?
               A
       Why use LTEX?
                A
       How to Get LTEX
                   A

   Basic LTEXDocument
         A
       Example Document
       Markup fo Example Document
       Basic LTEXCommands
             A

   Special LTEXcharacters
           A

   Compiling
     How LTEXWorks
           A
     How to Compile
   Files
       CLS files
       Output files
   Index and Table of Contents Generation
      The ToC
Outline II
      The Index



   Bibliographies
      .bib files
      Bibliography Styles
      Compiling
      Bibliography Assistance



   Resources



   Preview
What is LTEX?
        A




  Definition
  LTEXis a powerful document markup system that uses the TeX
   A
  typesetting program.
  It is pronounced as ’Lah Tek’ or ’Lay Tek’
Why use LTEX?
        A




     LTEXproduces superior quality documents compared to word
     A
     processor such as Microsoft Word.

     It offers separation of content and formatting

     Makes it easy to collaborate with others on a document

     Many conferences prefer submissions done in LTEX
                                                 A
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A

      Windows - MikTeX is a common package to use. It is free
      and easy to install.
      Common editors to use are TeXnicCenter, WinShell, and Led.
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A

      Windows - MikTeX is a common package to use. It is free
      and easy to install.
      Common editors to use are TeXnicCenter, WinShell, and Led.
      Mac - MacTex is the current distribution for Mac users.
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A

      Windows - MikTeX is a common package to use. It is free
      and easy to install.
      Common editors to use are TeXnicCenter, WinShell, and Led.
      Mac - MacTex is the current distribution for Mac users.
      Linux - It is likely that LTEXis already a part of your operating
                                A
      system, but if not you can install Tex live.
      You can use whatever text editor you would normally prefer to
      use, Emacs, Vi, etc.
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A

      Windows - MikTeX is a common package to use. It is free
      and easy to install.
      Common editors to use are TeXnicCenter, WinShell, and Led.
      Mac - MacTex is the current distribution for Mac users.
      Linux - It is likely that LTEXis already a part of your operating
                                A
      system, but if not you can install Tex live.
      You can use whatever text editor you would normally prefer to
      use, Emacs, Vi, etc.
      LTEXis also on all of the Lab computers
      A
How to Get LTEX
           A



  There are several distributions of LTEXthat are free to obtain.
                                     A

      Windows - MikTeX is a common package to use. It is free
      and easy to install.
      Common editors to use are TeXnicCenter, WinShell, and Led.
      Mac - MacTex is the current distribution for Mac users.
      Linux - It is likely that LTEXis already a part of your operating
                                A
      system, but if not you can install Tex live.
      You can use whatever text editor you would normally prefer to
      use, Emacs, Vi, etc.
      LTEXis also on all of the Lab computers
      A

  Go here for more information
  http://www.latex-project.org/ftp.html
Basic LTEXDocument
      A




  The basic LTEXdocument consists of a preamble, a body, and an
            A
  ending.
A Basic LTEXDocument
        A




                Example Document
                  Aubry W. Verret
                  November 7, 2008


 Hello World!
Markup for a Basic LTEXDocument
                   A




      documentclass { a r t i c l e }
      t i t l e {A B a s i c LaTeX Document }
      a u t h o r { Aubry W. V e r r e t }
      d a t e { November 2008}
      b e g i n { document }
      maketitle

     H e l l o World !

     end{ document }
Basic LTEXcommands: Preamble
      A




  LTEXdocuments begin with a preamble:
  A
Basic LTEXcommands: Preamble
      A




  LTEXdocuments begin with a preamble:
  A

      documentclass{}
Basic LTEXcommands: Preamble
      A




  LTEXdocuments begin with a preamble:
  A

      documentclass{}
      title{}
Basic LTEXcommands: Preamble
      A




  LTEXdocuments begin with a preamble:
  A

      documentclass{}
      title{}
      author{}
Basic LTEXcommands: Preamble
      A




  LTEXdocuments begin with a preamble:
  A

      documentclass{}
      title{}
      author{}
      date{}
Basic LTEXCommands: Body
      A




  The Body of the document:
Basic LTEXCommands: Body
      A




  The Body of the document:
      begin{document}
Basic LTEXCommands: Body
      A




  The Body of the document:
      begin{document}
      maketitle
Basic LTEXCommands: Body
      A




  The Body of the document:
      begin{document}
      maketitle
      You can then type the body of your document.
      No need to indent-this happens automatically.
      Separate paragraphs by a blank line.
Basic LTEXCommands: Body
      A




  The Body of the document:
      begin{document}
      maketitle
      You can then type the body of your document.
      No need to indent-this happens automatically.
      Separate paragraphs by a blank line.
      The document must end with
      end{document}
Other Common Commands


  Here are some other commands that you will use often:
      section
      subsection
      chapter
      {bf text}
      {it text}
      smallskip medskip bigskip
      begin{enumerate}...end{enumerate}
      begin{itemize}...end{itemize}
Special Characters


   LTEXreserves some characters for special purposes:
   A




       #   $   %   &   ~   _   ^   {   }

   These characters cannot be used by themselves in your document.
Special Characters


   LTEXreserves some characters for special purposes:
   A




       #   $   %   &   ~   _   ^   {       }

   These characters cannot be used by themselves in your document.

   You can include these characters in your text by using the Escape
   Character
Understanding How LTEXWorks
                  A




  LTEXtakes in a number of different input files and outputs a
  A
  number of different files.

  The main input file is the .tex file.

  Along with the .tex file, LTEXreads in .cls files and .sty files which
                           A
  provide all of the needed formatting information.
  LTEXoutputs a .dvi file and a .log file
  A
Compiling LTEX
          A




  In order to compile your LTEXdocument use the latex command on
                           A
  the .tex file.
Compiling LTEX
          A




  In order to compile your LTEXdocument use the latex command on
                           A
  the .tex file.

  For example, if you
  are using a unix environment then the command would look like this:



                        latex name of file.tex
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
        report - This is good for longer works like dissertations,
        theses, short books
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
        report - This is good for longer works like dissertations,
        theses, short books
        article - This is good for conference presentations, short
        reports, shorter documents
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
        report - This is good for longer works like dissertations,
        theses, short books
        article - This is good for conference presentations, short
        reports, shorter documents
        letter - This is a simple way of writing a well-formatted letter.
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
        report - This is good for longer works like dissertations,
        theses, short books
        article - This is good for conference presentations, short
        reports, shorter documents
        letter - This is a simple way of writing a well-formatted letter.
   These are mostly similar with some small differences. For instance,
   the book class allows for chapters and the article class allows for
   abstracts.
.cls files

   .cls files specify the format of a specific type of document
   document. LTEXcomes with four different document classes:
                A

        book - This is good for writing longer books with many
        chapters
        report - This is good for longer works like dissertations,
        theses, short books
        article - This is good for conference presentations, short
        reports, shorter documents
        letter - This is a simple way of writing a well-formatted letter.
   These are mostly similar with some small differences. For instance,
   the book class allows for chapters and the article class allows for
   abstracts.
   There are also many .sty files that allow for more specific
   formatting control.
Output Files




   DVIs (device independent) are files that contain a preview of your
   document once it is compiled. It can be converted to a number of
   different formats, such as PDF for printing.

   LOG files contain a transcript of the compilation process. They
   mostly contain the same information that is printed to the screen
   during the process.
How to Generate a Table of Contents

   Table of Contents in LTEXcan be generated automatically using the
                        A


   tableofcontents command.

   Place the command wherever you want the table of contents to
   appear. This is usually right after the

    maketitle command.

   The way

   tableofcontents

   works is by taking entries from the sectioning commands. You
   must run the latex command twice to generate the ToC whenever
   you add new entries to it. The first time the entries are recorded
   on a .toc file. The second time they are actually typeset.
How To Generate Indexes
   LTEXcan automatically generate indexes
   A


   Include

   usepackage{makeidx}
   makeindex

   in the preamble.
   When you encounter a term in your document that you would like
   to be indexed, use the

    index{term}term command

   You will need to run LTEXtwice in order for the index to appear.
                          A
   Once for the entries to be recorded in a .idx file and twice for the
   entries to be typeset.

   It is possible to create various levels of entries.
Bib files

   It is relatively simple to generate bibliographies in LTEXusing
                                                         A
   bibtex and many different bibliographic formats are available.

   Bibliographic entries must be kept in a separate file, the .bib file

   This is the basic format for bib file entries:


   @BOOK{make up an abbreviation,
       AUTHOR = quot;authorquot;,
       TITLE = quot;book titlequot;,
       PUBLISHER = {who published it},
       ADDRESS = {where it was published},
       YEAR = year it was published}
@BOOK{latex,
    AUTHOR = quot;Goossens, Michelquot;,
    TITLE = quot;The LaTeX Companionquot;,
    PUBLISHER = {Addison Wesley Longman, Inc.},
    ADDRESS = {Reading, MA},
    YEAR = 1994}
@BOOK{latex,
    AUTHOR = quot;Goossens, Michelquot;,
    TITLE = quot;The LaTeX Companionquot;,
    PUBLISHER = {Addison Wesley Longman, Inc.},
    ADDRESS = {Reading, MA},
    YEAR = 1994}

Your document should reference the source as follows:

cite[p. 24] {latex}
@BOOK{latex,
    AUTHOR = quot;Goossens, Michelquot;,
    TITLE = quot;The LaTeX Companionquot;,
    PUBLISHER = {Addison Wesley Longman, Inc.},
    ADDRESS = {Reading, MA},
    YEAR = 1994}

Your document should reference the source as follows:

cite[p. 24] {latex}

To make the bibliography appear in your document include these
commands at the end where you want the bibliography to go:

bibliography{filename}
bibliographystyle{plain}
Bibliography styles



   There are several different options for the bibliographystyle
   command. It is also possible to define the style of the bibliography
   using external custom style files.

   Go here for more info on bib styles:

   http://amath.colorado.edu/documentation/LaTeX/
   reference/faq/bibstyles.html#styles
Compiling the bibliography

   Compiling a document with a bibliography is a little more
   complicated.

       run latex on the .tex file
       run bibtex on the .tex file
       run latex twice more
   The first time you run latex, a .aux file is created which bibtex will
   subsequently read. The subsequent latex runs allow latex to
   resolve all of the references between the document and the bib file.

   Each time you add new references to your document you must
   repeat this process.
Bibliography Assistance



   You can use an external program to manage your bibliography.

   A good program for this is Jabref
       Free
       Detailed editing of entries
       Compatibility with various formats
       Automatic key generation
   You can get Jabref here: http://jabref.sourceforge.net/
Where to get Help



   There are several different resources for learning LTEX
                                                     A
   Books:
       LTEXConcisely by Adrian Johnstone
       A

       The LTEXCompanion by Michel Goossens
           A

       A Guide to LTEXby Melmut Kopka
                  A

       LTEXFor Scientists and Engineers by David J. Buerger
       A

       The LTEXGraphics Companion
           A

       The LTEXWeb Companion
           A
Online: There are numerous online tutorials and user guides for
LTEX, specific commands, packages, etc.
A


The Research Computing Lab: You can send questions to me
through our ticket system
http:
//www2.lib.virginia.edu/brown/rescomp/help/index.html
What’s Coming Next?



  Intro to LTEXPart 2 will cover:
           A



      Including Notes
      Typesetting Mathematics
      Tables
      Graphics
      Figures
      Presentations

Contenu connexe

Tendances

Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabatinabati
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesMohamed Alrshah
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEXAnusha Vajrapu
 
LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners Tilak Devaraj
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latextran dinh
 
How to use LaTeX and Beamer to prepare presentation for Slideshare
How to use LaTeX and Beamer to prepare presentation for SlideshareHow to use LaTeX and Beamer to prepare presentation for Slideshare
How to use LaTeX and Beamer to prepare presentation for SlideshareVesa Linja-aho
 
A gentle introduction to Latex
A gentle introduction to LatexA gentle introduction to Latex
A gentle introduction to LatexEmmanuel Abatih
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXJia-Bin Huang
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with TexstudioHossein Babashah
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Suddhasheel GHOSH, PhD
 
Tutorial on LATEX: A Computer Program for Typesetting Documents
Tutorial on LATEX: A Computer Program for Typesetting DocumentsTutorial on LATEX: A Computer Program for Typesetting Documents
Tutorial on LATEX: A Computer Program for Typesetting DocumentsDr. Mehar Chand
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeXLaura M. Castro
 

Tendances (20)

Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabati
 
Latex slides
Latex slidesLatex slides
Latex slides
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
LaTeX Survival Guide
LaTeX Survival Guide LaTeX Survival Guide
LaTeX Survival Guide
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
 
Latex
LatexLatex
Latex
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latex
 
How to use LaTeX and Beamer to prepare presentation for Slideshare
How to use LaTeX and Beamer to prepare presentation for SlideshareHow to use LaTeX and Beamer to prepare presentation for Slideshare
How to use LaTeX and Beamer to prepare presentation for Slideshare
 
Introduction to Latex
Introduction to Latex Introduction to Latex
Introduction to Latex
 
A gentle introduction to Latex
A gentle introduction to LatexA gentle introduction to Latex
A gentle introduction to Latex
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
 
Tutorial on LATEX: A Computer Program for Typesetting Documents
Tutorial on LATEX: A Computer Program for Typesetting DocumentsTutorial on LATEX: A Computer Program for Typesetting Documents
Tutorial on LATEX: A Computer Program for Typesetting Documents
 
LaTeX Basics
LaTeX BasicsLaTeX Basics
LaTeX Basics
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeX
 

Similaire à LaTeX Part 1 (20)

Inroduction to Latex
Inroduction to LatexInroduction to Latex
Inroduction to Latex
 
Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLE
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
 
STA312 Lec1
STA312 Lec1STA312 Lec1
STA312 Lec1
 
What is here
What is hereWhat is here
What is here
 
LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
 
abc12
abc12abc12
abc12
 
abc
abcabc
abc
 
popopo
popopopopopo
popopo
 
Theory of LaTeX
Theory of LaTeXTheory of LaTeX
Theory of LaTeX
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
 
Document typesetting using LateX
Document typesetting using LateXDocument typesetting using LateX
Document typesetting using LateX
 
Unified Documentation
Unified DocumentationUnified Documentation
Unified Documentation
 
14 Late X
14 Late X14 Late X
14 Late X
 
LaTeX for Undergraduate Linguists
LaTeX for Undergraduate LinguistsLaTeX for Undergraduate Linguists
LaTeX for Undergraduate Linguists
 
Keeping Up! with LaTeX
Keeping Up! with LaTeXKeeping Up! with LaTeX
Keeping Up! with LaTeX
 
Lshort
LshortLshort
Lshort
 
Latex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.pptLatex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.ppt
 
latex document for IT workshop Lab . B.Tech
latex document for IT workshop Lab . B.Techlatex document for IT workshop Lab . B.Tech
latex document for IT workshop Lab . B.Tech
 
help with Linux/Unix starting
help with Linux/Unix startinghelp with Linux/Unix starting
help with Linux/Unix starting
 

Dernier

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 

Dernier (20)

MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 

LaTeX Part 1

  • 1. An Intro to LTEXPart I A An introduction to creating a LTEXdocument A Aubry W. Verret Brown Science and Engineering Library Research Computing Lab November 10, 2008
  • 2. Outline I Introduction to LTEX A What is LTEX? A Why use LTEX? A How to Get LTEX A Basic LTEXDocument A Example Document Markup fo Example Document Basic LTEXCommands A Special LTEXcharacters A Compiling How LTEXWorks A How to Compile Files CLS files Output files Index and Table of Contents Generation The ToC
  • 3. Outline II The Index Bibliographies .bib files Bibliography Styles Compiling Bibliography Assistance Resources Preview
  • 4. What is LTEX? A Definition LTEXis a powerful document markup system that uses the TeX A typesetting program. It is pronounced as ’Lah Tek’ or ’Lay Tek’
  • 5. Why use LTEX? A LTEXproduces superior quality documents compared to word A processor such as Microsoft Word. It offers separation of content and formatting Makes it easy to collaborate with others on a document Many conferences prefer submissions done in LTEX A
  • 6. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A
  • 7. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A Windows - MikTeX is a common package to use. It is free and easy to install. Common editors to use are TeXnicCenter, WinShell, and Led.
  • 8. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A Windows - MikTeX is a common package to use. It is free and easy to install. Common editors to use are TeXnicCenter, WinShell, and Led. Mac - MacTex is the current distribution for Mac users.
  • 9. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A Windows - MikTeX is a common package to use. It is free and easy to install. Common editors to use are TeXnicCenter, WinShell, and Led. Mac - MacTex is the current distribution for Mac users. Linux - It is likely that LTEXis already a part of your operating A system, but if not you can install Tex live. You can use whatever text editor you would normally prefer to use, Emacs, Vi, etc.
  • 10. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A Windows - MikTeX is a common package to use. It is free and easy to install. Common editors to use are TeXnicCenter, WinShell, and Led. Mac - MacTex is the current distribution for Mac users. Linux - It is likely that LTEXis already a part of your operating A system, but if not you can install Tex live. You can use whatever text editor you would normally prefer to use, Emacs, Vi, etc. LTEXis also on all of the Lab computers A
  • 11. How to Get LTEX A There are several distributions of LTEXthat are free to obtain. A Windows - MikTeX is a common package to use. It is free and easy to install. Common editors to use are TeXnicCenter, WinShell, and Led. Mac - MacTex is the current distribution for Mac users. Linux - It is likely that LTEXis already a part of your operating A system, but if not you can install Tex live. You can use whatever text editor you would normally prefer to use, Emacs, Vi, etc. LTEXis also on all of the Lab computers A Go here for more information http://www.latex-project.org/ftp.html
  • 12.
  • 13. Basic LTEXDocument A The basic LTEXdocument consists of a preamble, a body, and an A ending.
  • 14. A Basic LTEXDocument A Example Document Aubry W. Verret November 7, 2008 Hello World!
  • 15. Markup for a Basic LTEXDocument A documentclass { a r t i c l e } t i t l e {A B a s i c LaTeX Document } a u t h o r { Aubry W. V e r r e t } d a t e { November 2008} b e g i n { document } maketitle H e l l o World ! end{ document }
  • 16. Basic LTEXcommands: Preamble A LTEXdocuments begin with a preamble: A
  • 17. Basic LTEXcommands: Preamble A LTEXdocuments begin with a preamble: A documentclass{}
  • 18. Basic LTEXcommands: Preamble A LTEXdocuments begin with a preamble: A documentclass{} title{}
  • 19. Basic LTEXcommands: Preamble A LTEXdocuments begin with a preamble: A documentclass{} title{} author{}
  • 20. Basic LTEXcommands: Preamble A LTEXdocuments begin with a preamble: A documentclass{} title{} author{} date{}
  • 21. Basic LTEXCommands: Body A The Body of the document:
  • 22. Basic LTEXCommands: Body A The Body of the document: begin{document}
  • 23. Basic LTEXCommands: Body A The Body of the document: begin{document} maketitle
  • 24. Basic LTEXCommands: Body A The Body of the document: begin{document} maketitle You can then type the body of your document. No need to indent-this happens automatically. Separate paragraphs by a blank line.
  • 25. Basic LTEXCommands: Body A The Body of the document: begin{document} maketitle You can then type the body of your document. No need to indent-this happens automatically. Separate paragraphs by a blank line. The document must end with end{document}
  • 26. Other Common Commands Here are some other commands that you will use often: section subsection chapter {bf text} {it text} smallskip medskip bigskip begin{enumerate}...end{enumerate} begin{itemize}...end{itemize}
  • 27. Special Characters LTEXreserves some characters for special purposes: A # $ % & ~ _ ^ { } These characters cannot be used by themselves in your document.
  • 28. Special Characters LTEXreserves some characters for special purposes: A # $ % & ~ _ ^ { } These characters cannot be used by themselves in your document. You can include these characters in your text by using the Escape Character
  • 29. Understanding How LTEXWorks A LTEXtakes in a number of different input files and outputs a A number of different files. The main input file is the .tex file. Along with the .tex file, LTEXreads in .cls files and .sty files which A provide all of the needed formatting information. LTEXoutputs a .dvi file and a .log file A
  • 30. Compiling LTEX A In order to compile your LTEXdocument use the latex command on A the .tex file.
  • 31. Compiling LTEX A In order to compile your LTEXdocument use the latex command on A the .tex file. For example, if you are using a unix environment then the command would look like this: latex name of file.tex
  • 32. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A
  • 33. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters
  • 34. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters report - This is good for longer works like dissertations, theses, short books
  • 35. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters report - This is good for longer works like dissertations, theses, short books article - This is good for conference presentations, short reports, shorter documents
  • 36. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters report - This is good for longer works like dissertations, theses, short books article - This is good for conference presentations, short reports, shorter documents letter - This is a simple way of writing a well-formatted letter.
  • 37. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters report - This is good for longer works like dissertations, theses, short books article - This is good for conference presentations, short reports, shorter documents letter - This is a simple way of writing a well-formatted letter. These are mostly similar with some small differences. For instance, the book class allows for chapters and the article class allows for abstracts.
  • 38. .cls files .cls files specify the format of a specific type of document document. LTEXcomes with four different document classes: A book - This is good for writing longer books with many chapters report - This is good for longer works like dissertations, theses, short books article - This is good for conference presentations, short reports, shorter documents letter - This is a simple way of writing a well-formatted letter. These are mostly similar with some small differences. For instance, the book class allows for chapters and the article class allows for abstracts. There are also many .sty files that allow for more specific formatting control.
  • 39. Output Files DVIs (device independent) are files that contain a preview of your document once it is compiled. It can be converted to a number of different formats, such as PDF for printing. LOG files contain a transcript of the compilation process. They mostly contain the same information that is printed to the screen during the process.
  • 40. How to Generate a Table of Contents Table of Contents in LTEXcan be generated automatically using the A tableofcontents command. Place the command wherever you want the table of contents to appear. This is usually right after the maketitle command. The way tableofcontents works is by taking entries from the sectioning commands. You must run the latex command twice to generate the ToC whenever you add new entries to it. The first time the entries are recorded on a .toc file. The second time they are actually typeset.
  • 41. How To Generate Indexes LTEXcan automatically generate indexes A Include usepackage{makeidx} makeindex in the preamble. When you encounter a term in your document that you would like to be indexed, use the index{term}term command You will need to run LTEXtwice in order for the index to appear. A Once for the entries to be recorded in a .idx file and twice for the entries to be typeset. It is possible to create various levels of entries.
  • 42. Bib files It is relatively simple to generate bibliographies in LTEXusing A bibtex and many different bibliographic formats are available. Bibliographic entries must be kept in a separate file, the .bib file This is the basic format for bib file entries: @BOOK{make up an abbreviation, AUTHOR = quot;authorquot;, TITLE = quot;book titlequot;, PUBLISHER = {who published it}, ADDRESS = {where it was published}, YEAR = year it was published}
  • 43. @BOOK{latex, AUTHOR = quot;Goossens, Michelquot;, TITLE = quot;The LaTeX Companionquot;, PUBLISHER = {Addison Wesley Longman, Inc.}, ADDRESS = {Reading, MA}, YEAR = 1994}
  • 44. @BOOK{latex, AUTHOR = quot;Goossens, Michelquot;, TITLE = quot;The LaTeX Companionquot;, PUBLISHER = {Addison Wesley Longman, Inc.}, ADDRESS = {Reading, MA}, YEAR = 1994} Your document should reference the source as follows: cite[p. 24] {latex}
  • 45. @BOOK{latex, AUTHOR = quot;Goossens, Michelquot;, TITLE = quot;The LaTeX Companionquot;, PUBLISHER = {Addison Wesley Longman, Inc.}, ADDRESS = {Reading, MA}, YEAR = 1994} Your document should reference the source as follows: cite[p. 24] {latex} To make the bibliography appear in your document include these commands at the end where you want the bibliography to go: bibliography{filename} bibliographystyle{plain}
  • 46. Bibliography styles There are several different options for the bibliographystyle command. It is also possible to define the style of the bibliography using external custom style files. Go here for more info on bib styles: http://amath.colorado.edu/documentation/LaTeX/ reference/faq/bibstyles.html#styles
  • 47. Compiling the bibliography Compiling a document with a bibliography is a little more complicated. run latex on the .tex file run bibtex on the .tex file run latex twice more The first time you run latex, a .aux file is created which bibtex will subsequently read. The subsequent latex runs allow latex to resolve all of the references between the document and the bib file. Each time you add new references to your document you must repeat this process.
  • 48. Bibliography Assistance You can use an external program to manage your bibliography. A good program for this is Jabref Free Detailed editing of entries Compatibility with various formats Automatic key generation You can get Jabref here: http://jabref.sourceforge.net/
  • 49. Where to get Help There are several different resources for learning LTEX A Books: LTEXConcisely by Adrian Johnstone A The LTEXCompanion by Michel Goossens A A Guide to LTEXby Melmut Kopka A LTEXFor Scientists and Engineers by David J. Buerger A The LTEXGraphics Companion A The LTEXWeb Companion A
  • 50. Online: There are numerous online tutorials and user guides for LTEX, specific commands, packages, etc. A The Research Computing Lab: You can send questions to me through our ticket system http: //www2.lib.virginia.edu/brown/rescomp/help/index.html
  • 51. What’s Coming Next? Intro to LTEXPart 2 will cover: A Including Notes Typesetting Mathematics Tables Graphics Figures Presentations