SlideShare a Scribd company logo
. . . . . . 
LATEX Basics 
Kristen Sauby, Rosana Zenil-Lopez, Gabriela Blohm 
Department of Biology 
University of Florida 
April 1, 2011 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 1 / 29
. . . . . . 
What is LATEX? 
a programming language used to create attractive and 
consistently formatted documents 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 2 / 29
. . . . . . 
Why would you want to use LATEX? 
consistent formatting 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
. . . . . . 
Why would you want to use LATEX? 
consistent formatting 
fancy fonts 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
. . . . . . 
Why would you want to use LATEX? 
consistent formatting 
fancy fonts 
make posters, presentations, and other types of 
documents 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
. . . . . . 
Why would you want to use LATEX? 
consistent formatting 
fancy fonts 
make posters, presentations, and other types of 
documents 
automatic numbering of sections,
gures, tables, and 
formulas 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
. . . . . . 
Why would you want to use LATEX? 
consistent formatting 
fancy fonts 
make posters, presentations, and other types of 
documents 
automatic numbering of sections,
gures, tables, and 
formulas 
creation of a bibliography and index 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
. . . . . . 
Why would you want to use LATEX? 
!"##$ %"##& '"##( )"##g 
*"##+ ,"##- ."##g /"##g 
D. Taraborelli !2008", The Beauty of LATEX 
Some rights reserved. ##$%&$'( 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 4 / 29
. . . . . . 
Why would you want to use LATEX? 
include, align, and number attractive mathematical 
formulas 
n! 
k!(n  k)! 
= 
( 
n 
k 
) 
(1) 
lim 
x!1 
exp(x) = 0 (2) 
Am;n = 
 
 
a1;1 a1;2    a1;n 
a2;1 a2;2    a2;n 
... 
... 
. . . ... 
am;1 am;2    am;n 
 
 
(3) 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 5 / 29
. . . . . . 
Why would you want to use LATEX? 
Embed R code and objects 
 sample(100, 5) 
[1] 85 79 82 62 73 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 6 / 29
. . . . . . 
Why would you want to use LATEX? 
Embed R code and objects 
 library(xtable) 
 counts - c(18, 17, 15, 20, 10, 20, 25, 13, 12) 
 outcome - gl(3, 1, 9) 
 treatment - gl(3, 3) 
 print(xtable(data.frame(treatment, outcome, counts))) 
treatment outcome counts 
1 1 1 18.00 
2 1 2 17.00 
3 1 3 15.00 
4 2 1 20.00 
5 2 2 10.00 
6 2 3 20.00 
7 3 1 25.00 
8 3 2 13.00 
9 3 3 12.00 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 7 / 29
We'll Work Through an Example Together 
Go to latexlab.org or open the example .tex
le on your 
computer. 
. . . . . . 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
We'll Work Through an Example Together 
Go to latexlab.org or open the example .tex
le on your 
computer. 
We'll use this example document to understand better the 
structure of LATEX documents. 
. . . . . . 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
We'll Work Through an Example Together 
Go to latexlab.org or open the example .tex
le on your 
computer. 
We'll use this example document to understand better the 
structure of LATEX documents. 
In LATEX lab, select split (near the bottom left of the 
page) 
this lets us see the .tex document and the ouput 
document (the compiled document) in the same 
window. 
. . . . . . 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
What types of documents can you make in LATEX? 
. . . . . . 
Classes of LATEX documents include: 
article 
book 
beamer (for presentations) 
and more 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 9 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
the written document (abstract, sections, etc.) 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
the written document (abstract, sections, etc.) 
appendices 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
the written document (abstract, sections, etc.) 
appendices 
table of contents 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
the written document (abstract, sections, etc.) 
appendices 
table of contents 
bibliography 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
preamble (commands that aect the entire document) 
top matter (title, date, authors, etc.) 
the written document (abstract, sections, etc.) 
appendices 
table of contents 
bibliography 
comments (i.e., text that does not show up in the
nal document) 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
. . . . . . 
LATEX Document Structure 
Begin your document using the following command: 
ndocumentstyle[options]fclassg 
where options include such speci
cations as 
font size 
number of columns 
paper size 
and the class is the type of document that you want to 
make 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 11 / 29
. . . . . . 
LATEX Document Structure 
Next list the packages to be used: 
nusepackage[options]fpackageg 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 12 / 29
. . . . . . 
LATEX Document Structure 
The preamble can also include: 
title and author information 
date 
font speci
cation 
and more 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 13 / 29
. . . . . . 
LATEX Document Structure 
After completing the preamble begin the document: 
nbeginfdocumentg 
At the end of the document you must include the 
command: 
nendfdocumentg 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 14 / 29
. . . . . . 
Compiling Your LATEX 
Once you have the document set up, you can then add 
text,
gures, formulas, tables, etc. to the document. 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 15 / 29
. . . . . . 
Types of Functions in LATEX 
Ways to organize or include data: 
verbatim 
itemize 
enumerate
gure 
table 
tabular 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 16 / 29
. . . . . . 
Types of Functions in LATEX 
Ways to organize or include data: 
verbatim 
itemize 
enumerate
gure 
table 
tabular 
Try adding a bulleted list to the example .tex
le. 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 16 / 29
. . . . . . 
Types of Functions 
You can also include comments (that don't appear in the
nal, compiled document) by using the % symbol. 
Anything after the % symbol will not be evaluated by 
LATEX when compiling the document. 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 17 / 29
. . . . . . 
Including Math in LATEX 
Note that our example .tex
le includes 
nusepackagefamsmathg in the preamble. 
This package lets us include mathematical formulas in our 
LATEX document. 
Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 18 / 29
. . . . . . 
Including Math in LATEX 
The example .tex
le includes this formula: 
nbeginfaligng 
E = mc^2 nn 
m = nfracfm 0gfnsqrtf1-nfracfv^2gfc^2ggg 
nendfaligng 
The aligncommand is speci

More Related Content

What's hot

What's hot (20)

LaTex Tutorial
LaTex TutorialLaTex Tutorial
LaTex Tutorial
 
Advanced latex
Advanced latexAdvanced latex
Advanced latex
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
 
Introduction to Latex
Introduction to Latex Introduction to Latex
Introduction to Latex
 
Latex for beginner
Latex for beginnerLatex for beginner
Latex for beginner
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
 
Scientific writing
Scientific writingScientific writing
Scientific writing
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
 
Latex for beginners
Latex for beginnersLatex for beginners
Latex for beginners
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
 
Introduction to Overleaf Workshop
Introduction to Overleaf WorkshopIntroduction to Overleaf Workshop
Introduction to Overleaf Workshop
 
Latex slides
Latex slidesLatex slides
Latex slides
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
scientific writing 01 - latex
scientific writing   01 - latexscientific writing   01 - latex
scientific writing 01 - latex
 
Lex
LexLex
Lex
 
Using JSTOR: An Overview
Using JSTOR: An OverviewUsing JSTOR: An Overview
Using JSTOR: An Overview
 

Similar to LaTeX Basics

R Basics and Best Practices
R Basics and Best PracticesR Basics and Best Practices
R Basics and Best PracticesKristen Sauby
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.pptTapasPal34
 
An Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding SystemAn Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding Systeminscit2006
 
Using microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedUsing microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedjcjo05
 
Intern Presentation
Intern PresentationIntern Presentation
Intern PresentationApurva Singh
 
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE ijscmcjournal
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late xC-CORE
 
Zotero: collecting, managing, sharing and citing references made easy
Zotero: collecting, managing, sharing and citing references made easyZotero: collecting, managing, sharing and citing references made easy
Zotero: collecting, managing, sharing and citing references made easyRaphael Grolimund
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data StructureProf Ansari
 
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTA SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTijpla
 
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTA SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTijpla
 

Similar to LaTeX Basics (20)

R Basics and Best Practices
R Basics and Best PracticesR Basics and Best Practices
R Basics and Best Practices
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
 
An Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding SystemAn Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding System
 
Using microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstartedUsing microsoftaccess1 gettingstarted
Using microsoftaccess1 gettingstarted
 
CALICO 2010 Workshop
CALICO 2010  Workshop CALICO 2010  Workshop
CALICO 2010 Workshop
 
Intern Presentation
Intern PresentationIntern Presentation
Intern Presentation
 
IR with lucene
IR with luceneIR with lucene
IR with lucene
 
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE
SL5 OBJECT: SIMPLER LEVEL 5 OBJECT EXPERT SYSTEM LANGUAGE
 
G0361034038
G0361034038G0361034038
G0361034038
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
Zotero: collecting, managing, sharing and citing references made easy
Zotero: collecting, managing, sharing and citing references made easyZotero: collecting, managing, sharing and citing references made easy
Zotero: collecting, managing, sharing and citing references made easy
 
LaTeX 3 Paper
LaTeX 3 PaperLaTeX 3 Paper
LaTeX 3 Paper
 
Files
FilesFiles
Files
 
Files
FilesFiles
Files
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
 
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTA SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
 
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENTA SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
A SUCCINCT PROGRAMMING LANGUAGE WITH A NATIVE DATABASE COMPONENT
 

Recently uploaded

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownloadvrstrong314
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfmbmh111980
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 

Recently uploaded (20)

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 

LaTeX Basics

  • 1. . . . . . . LATEX Basics Kristen Sauby, Rosana Zenil-Lopez, Gabriela Blohm Department of Biology University of Florida April 1, 2011 Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 1 / 29
  • 2. . . . . . . What is LATEX? a programming language used to create attractive and consistently formatted documents Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 2 / 29
  • 3. . . . . . . Why would you want to use LATEX? consistent formatting Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
  • 4. . . . . . . Why would you want to use LATEX? consistent formatting fancy fonts Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
  • 5. . . . . . . Why would you want to use LATEX? consistent formatting fancy fonts make posters, presentations, and other types of documents Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
  • 6. . . . . . . Why would you want to use LATEX? consistent formatting fancy fonts make posters, presentations, and other types of documents automatic numbering of sections,
  • 7. gures, tables, and formulas Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
  • 8. . . . . . . Why would you want to use LATEX? consistent formatting fancy fonts make posters, presentations, and other types of documents automatic numbering of sections,
  • 9. gures, tables, and formulas creation of a bibliography and index Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 3 / 29
  • 10. . . . . . . Why would you want to use LATEX? !"##$ %"##& '"##( )"##g *"##+ ,"##- ."##g /"##g D. Taraborelli !2008", The Beauty of LATEX Some rights reserved. ##$%&$'( Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 4 / 29
  • 11. . . . . . . Why would you want to use LATEX? include, align, and number attractive mathematical formulas n! k!(n k)! = ( n k ) (1) lim x!1 exp(x) = 0 (2) Am;n =   a1;1 a1;2 a1;n a2;1 a2;2 a2;n ... ... . . . ... am;1 am;2 am;n   (3) Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 5 / 29
  • 12. . . . . . . Why would you want to use LATEX? Embed R code and objects sample(100, 5) [1] 85 79 82 62 73 Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 6 / 29
  • 13. . . . . . . Why would you want to use LATEX? Embed R code and objects library(xtable) counts - c(18, 17, 15, 20, 10, 20, 25, 13, 12) outcome - gl(3, 1, 9) treatment - gl(3, 3) print(xtable(data.frame(treatment, outcome, counts))) treatment outcome counts 1 1 1 18.00 2 1 2 17.00 3 1 3 15.00 4 2 1 20.00 5 2 2 10.00 6 2 3 20.00 7 3 1 25.00 8 3 2 13.00 9 3 3 12.00 Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 7 / 29
  • 14. We'll Work Through an Example Together Go to latexlab.org or open the example .tex
  • 15. le on your computer. . . . . . . Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
  • 16. We'll Work Through an Example Together Go to latexlab.org or open the example .tex
  • 17. le on your computer. We'll use this example document to understand better the structure of LATEX documents. . . . . . . Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
  • 18. We'll Work Through an Example Together Go to latexlab.org or open the example .tex
  • 19. le on your computer. We'll use this example document to understand better the structure of LATEX documents. In LATEX lab, select split (near the bottom left of the page) this lets us see the .tex document and the ouput document (the compiled document) in the same window. . . . . . . Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 8 / 29
  • 20. What types of documents can you make in LATEX? . . . . . . Classes of LATEX documents include: article book beamer (for presentations) and more Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 9 / 29
  • 21. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 22. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 23. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) the written document (abstract, sections, etc.) Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 24. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) the written document (abstract, sections, etc.) appendices Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 25. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) the written document (abstract, sections, etc.) appendices table of contents Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 26. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) the written document (abstract, sections, etc.) appendices table of contents bibliography Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 27. . . . . . . LATEX Document Structure preamble (commands that aect the entire document) top matter (title, date, authors, etc.) the written document (abstract, sections, etc.) appendices table of contents bibliography comments (i.e., text that does not show up in the
  • 28. nal document) Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 10 / 29
  • 29. . . . . . . LATEX Document Structure Begin your document using the following command: ndocumentstyle[options]fclassg where options include such speci
  • 30. cations as font size number of columns paper size and the class is the type of document that you want to make Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 11 / 29
  • 31. . . . . . . LATEX Document Structure Next list the packages to be used: nusepackage[options]fpackageg Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 12 / 29
  • 32. . . . . . . LATEX Document Structure The preamble can also include: title and author information date font speci
  • 33. cation and more Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 13 / 29
  • 34. . . . . . . LATEX Document Structure After completing the preamble begin the document: nbeginfdocumentg At the end of the document you must include the command: nendfdocumentg Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 14 / 29
  • 35. . . . . . . Compiling Your LATEX Once you have the document set up, you can then add text,
  • 36. gures, formulas, tables, etc. to the document. Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 15 / 29
  • 37. . . . . . . Types of Functions in LATEX Ways to organize or include data: verbatim itemize enumerate
  • 38. gure table tabular Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 16 / 29
  • 39. . . . . . . Types of Functions in LATEX Ways to organize or include data: verbatim itemize enumerate
  • 40. gure table tabular Try adding a bulleted list to the example .tex
  • 41. le. Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 16 / 29
  • 42. . . . . . . Types of Functions You can also include comments (that don't appear in the
  • 43. nal, compiled document) by using the % symbol. Anything after the % symbol will not be evaluated by LATEX when compiling the document. Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 17 / 29
  • 44. . . . . . . Including Math in LATEX Note that our example .tex
  • 45. le includes nusepackagefamsmathg in the preamble. This package lets us include mathematical formulas in our LATEX document. Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 18 / 29
  • 46. . . . . . . Including Math in LATEX The example .tex
  • 47. le includes this formula: nbeginfaligng E = mc^2 nn m = nfracfm 0gfnsqrtf1-nfracfv^2gfc^2ggg nendfaligng The aligncommand is speci
  • 48. c to mathematical formulas and allows you to align the=symbol of multiple formulas. Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 19 / 29
  • 49. . . . . . . Using R and LATEX Unfortunately, LATEX lab doesn't support Sweave... Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 20 / 29
  • 50. Using R and LATEX To include R objects/code in a LATEX document: . . . . . . In the preamble include: nusepackagefSweaveg Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 21 / 29
  • 51. Using R and LATEX To include R objects/code in a LATEX document: . . . . . . In the preamble include: nusepackagefSweaveg After nbeginfdocumentg include: include Sweave options here= include R data here @ Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 21 / 29
  • 52. Using R and LATEX To include R objects/code in a LATEX document: . . . . . . In the preamble include: nusepackagefSweaveg After nbeginfdocumentg include: include Sweave options here= include R data here @ Save your
  • 53. le with the .Rnwextension instead of .tex Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 21 / 29
  • 54. . . . . . . Using R and LATEX To include R objects/code in a LATEX document: Execute the .Rnw
  • 55. le I using your text editor I using R This produces a .tex
  • 56. le which you can then compile Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 22 / 29
  • 57. . . . . . . Using R and LATEX Example: = sample(100,5) @ Will produce: sample(100, 5) [1] 72 67 41 24 83 Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 23 / 29
  • 58. . . . . . . Using R and LATEX Use the function xtable from library xtable to include tables: Results=TEX= library(xtable) counts - c(18,17,15,20,10,20,25,13,12) outcome - gl(3,1,9) treatment - gl(3,3) print(xtable(data.frame(treatment, outcome, counts))) @ Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 24 / 29
  • 59. . . . . . . Using R and LATEX Use the function xtable from library xtable to include tables Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 25 / 29
  • 60. Using R and LATEX print(xtable(data.frame(treatment, outcome, counts))) produces this table: treatment outcome counts 1 1 1 18.00 2 1 2 17.00 3 1 3 15.00 4 2 1 20.00 5 2 2 10.00 6 2 3 20.00 7 3 1 25.00 8 3 2 13.00 9 3 3 12.00 . . . . . . Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 26 / 29
  • 61. . . . . . . Use as a Reference Manager make a .bib
  • 62. le containing reference information Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 27 / 29
  • 63. . . . . . . Use as a Reference Manager make a .bib
  • 64. le containing reference information include nusepackagefciteg in your preamble Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 27 / 29
  • 65. . . . . . . Use as a Reference Manager make a .bib
  • 66. le containing reference information include nusepackagefciteg in your preamble use commands such as ncitepfyour-ref-nameg in the body of your document where you want to include a citation Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 27 / 29
  • 67. . . . . . . Use as a Reference Manager make a .bib
  • 68. le containing reference information include nusepackagefciteg in your preamble use commands such as ncitepfyour-ref-nameg in the body of your document where you want to include a citation include the following commands at the end of the document to compile the reference list: I nbibliographyfname-of-your-bib-
  • 69. leg I nbibliographystylefname-of-ref-styleg Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 27 / 29
  • 70. . . . . . . Good Resources for LATEX LATEX Wikibook Online LATEX Equation Editor Sweave User Manual A Beamer Quickstart Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 28 / 29
  • 71. This is a very brief overview of LATEX but we hope that you have learned something useful! . . . . . . Questions? Sauby, Zenil, Blohm (U of Fl) LATEXBasics April 1, 2011 29 / 29