SlideShare a Scribd company logo
STA312H5S Lecture
Matthew C. Scicluna
University of Toronto Mississauga
February 26, 2015
What We Are Going to Cover
A bit more information about this
Today we are going to cover:
The history of LATEX
Why Use LATEX
A digression on WYSIWYM versus WYSIWYG
How to write a document in LATEX
History Of LATEX
Why not cover some history?
Precursor TEXwas written by Donald Knuth in 1978
He made it to write his book ’The Art of Computer
Programming’
Main goal was to allow anybody to produce high-quality
books quickly
LATEXwritten in 1980s by Leslie Lamport
Goal is to provide a high-level language that accesses the
power of TeX
Why Use LATEX
Can make professional looking books, articles, posters and
presentation slides quickly and with ease.
Automates most aspects of typesetting such as numbering,
indexing, referencing, tables, bibliographies, etc...
Extensive support for writing mathematical expressions.
Lets you focus on the content without worrying about the
formatting. (more about this on next slide)
A digression on WYSIWYM versus WYSIWYG
An intro into the philosophy behind LATEX
2 Paradigms on how to build a document editor:
1. What You See is What You Get
Displays the document on screen as it will appear in final
form. e.g. Microsoft Word
2. What You See is What You Mean
You write the contents in a structured way, marking the
contents according to their meaning within the document,
leaving the program to work out the details. e.g. LATEX,
HTML
A digression on WYSIWYM versus WYSIWYG
lets explore the differences between these two paradigms
Here are two pieces of pseudocode that code for the same
document, written with each of the different paradigms in mind:
1. What You See is What You Get
Press enter 10 times and tab 5 times to get to
the centre of the screen and write ’Hello
World!’.
2. What You See is What You Mean
This document should look like a title screen
which has the text ’Hello World!’ displayed.
How to Write a Document in LATEX
What we are going to cover:
1. LATEXinstallation
2. Beginning a document
3. Your first document in LATEX
4. Some more LATEX
5. Lets make a more interesting document
How to Write a Document in LATEX
LATEX installation
Install a TeX compiler
TeX Live (linux), MiKTeX (windows) or MacTeX (just guess
the OS)
Install a GUI like TeXstudio or TeXworks
Go to http://miktex.org/download to get the latest
version of MiKTeX, which comes bundled with TeXworks!
Go to http://texstudio.sourceforge.net/ to get
TeXstudio if you want.
How to Write a Document in LATEX
beginning a document
You always must add a few things before you can begin writing
your LATEXdocument
documentclass{article} %Declares the document classes
usepackage{SOMEPACKAGE} %Analogous to library() in R
begin{document} %We declare where the document begins
... stuff
end{document} %Declares when the document ends
How to Write a Document in LATEX
beginning a document
What kinds of document classes are there?
article - For scientific articles and reports
book - In case you want to write an entire book
beamer - Makes powerpoint slides (like this one!)
many others, all tailored for their intended use...
How to Write a Document in LATEX
beginning a document
You can specify additional options using square brackets...
documentclass[11pt,twoside,a4paper]{article}
More information can be found at:
http://en.wikibooks.org/wiki/LaTeX/Document_Structure
How to Write a Document in LATEX
beginning a document
Lots of great packages are available which add even more
functionality to LATEX
graphicsx - Includes the includegraphics command
amsmath - For serious mathematical typesetting
hyperref - Fun with hyperlinks (clicking one takes you to a
specific figure)
many others, check them out online!
How to Write a document in LATEX
Your First document in LATEX
Okay everyone, lets make a document!
How to Write a document in LATEX
Your First document in LATEX
Okay everyone, lets make a document!
Notice how you have to compile before you can see what
you’ve done!
This takes some getting used to...
How to Write a document in LATEX
some more LATEX
An ”environment” is a region of your document that LaTeX
gives special consideration to.
Some commands may only be valid in certain enviornments,
and content may visually change depending on the
envirornment it is in.
An environment begins with the begin command, and ends
with the end command.
Environments can be nested within one another.
How to Write a document in LATEX
some more LATEX
Here are a few popular LATEX environments:
figure - for adding figures to the page
enumerate, itemize - for making lists
math - for making all those yucky math formulas
array - for making tables
flushleft, center, flushright - moves text left, center and right.
verbatim - makes ”typewriter” text
abstract - makes the abstract for the document.
How to Write a document in LATEX
Lets make a more interesting document
We will work with the document class article and make a ’report’
out of it.

More Related Content

Similar to STA312 Lec1

LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
Rajesh Patel
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
Sudhanshu Janwadkar
 
Latex workshop installing Latex editor in windows
Latex workshop installing Latex editor in windowsLatex workshop installing Latex editor in windows
Latex workshop installing Latex editor in windows
Zahra Marzook
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
Mohamed Alrshah
 
Software for paper formatting
Software for paper formatting Software for paper formatting
Software for paper formatting
salonibansal21
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
C-CORE
 
Theory of LaTeX
Theory of LaTeXTheory of LaTeX
Theory of LaTeX
Srikrishnan Suresh
 
Importanat
ImportanatImportanat
Importanat
Muluken Temesgen
 
Ltxprimer 1.0
Ltxprimer 1.0Ltxprimer 1.0
Ltxprimer 1.0
Denis Vet Can Clinican
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
Anusha Vajrapu
 
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
LadallaRajKumar
 
LaTeX로 문서 작성하자
LaTeX로 문서 작성하자LaTeX로 문서 작성하자
LaTeX로 문서 작성하자
Kangjun Heo
 
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
Sandhya Gandham
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
University of Technology
 
Words in Code
Words in CodeWords in Code
Words in Code
Pete Goodliffe
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
Mohamed Alrshah
 
Latex slides
Latex slidesLatex slides
Latex slides
Dr. Vijay Ukani
 
Olf2016
Olf2016Olf2016
Olf2016
Dru Lavigne
 
Lshort
LshortLshort
Tlf2016
Tlf2016Tlf2016
Tlf2016
Dru Lavigne
 

Similar to STA312 Lec1 (20)

LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
 
Latex workshop installing Latex editor in windows
Latex workshop installing Latex editor in windowsLatex workshop installing Latex editor in windows
Latex workshop installing Latex editor in windows
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
Software for paper formatting
Software for paper formatting Software for paper formatting
Software for paper formatting
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
Theory of LaTeX
Theory of LaTeXTheory of LaTeX
Theory of LaTeX
 
Importanat
ImportanatImportanat
Importanat
 
Ltxprimer 1.0
Ltxprimer 1.0Ltxprimer 1.0
Ltxprimer 1.0
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
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로 문서 작성하자
LaTeX로 문서 작성하자LaTeX로 문서 작성하자
LaTeX로 문서 작성하자
 
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
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
 
Words in Code
Words in CodeWords in Code
Words in Code
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
 
Latex slides
Latex slidesLatex slides
Latex slides
 
Olf2016
Olf2016Olf2016
Olf2016
 
Lshort
LshortLshort
Lshort
 
Tlf2016
Tlf2016Tlf2016
Tlf2016
 

STA312 Lec1

  • 1. STA312H5S Lecture Matthew C. Scicluna University of Toronto Mississauga February 26, 2015
  • 2.
  • 3. What We Are Going to Cover A bit more information about this Today we are going to cover: The history of LATEX Why Use LATEX A digression on WYSIWYM versus WYSIWYG How to write a document in LATEX
  • 4. History Of LATEX Why not cover some history? Precursor TEXwas written by Donald Knuth in 1978 He made it to write his book ’The Art of Computer Programming’ Main goal was to allow anybody to produce high-quality books quickly LATEXwritten in 1980s by Leslie Lamport Goal is to provide a high-level language that accesses the power of TeX
  • 5. Why Use LATEX Can make professional looking books, articles, posters and presentation slides quickly and with ease. Automates most aspects of typesetting such as numbering, indexing, referencing, tables, bibliographies, etc... Extensive support for writing mathematical expressions. Lets you focus on the content without worrying about the formatting. (more about this on next slide)
  • 6. A digression on WYSIWYM versus WYSIWYG An intro into the philosophy behind LATEX 2 Paradigms on how to build a document editor: 1. What You See is What You Get Displays the document on screen as it will appear in final form. e.g. Microsoft Word 2. What You See is What You Mean You write the contents in a structured way, marking the contents according to their meaning within the document, leaving the program to work out the details. e.g. LATEX, HTML
  • 7. A digression on WYSIWYM versus WYSIWYG lets explore the differences between these two paradigms Here are two pieces of pseudocode that code for the same document, written with each of the different paradigms in mind: 1. What You See is What You Get Press enter 10 times and tab 5 times to get to the centre of the screen and write ’Hello World!’. 2. What You See is What You Mean This document should look like a title screen which has the text ’Hello World!’ displayed.
  • 8. How to Write a Document in LATEX What we are going to cover: 1. LATEXinstallation 2. Beginning a document 3. Your first document in LATEX 4. Some more LATEX 5. Lets make a more interesting document
  • 9. How to Write a Document in LATEX LATEX installation Install a TeX compiler TeX Live (linux), MiKTeX (windows) or MacTeX (just guess the OS) Install a GUI like TeXstudio or TeXworks Go to http://miktex.org/download to get the latest version of MiKTeX, which comes bundled with TeXworks! Go to http://texstudio.sourceforge.net/ to get TeXstudio if you want.
  • 10. How to Write a Document in LATEX beginning a document You always must add a few things before you can begin writing your LATEXdocument documentclass{article} %Declares the document classes usepackage{SOMEPACKAGE} %Analogous to library() in R begin{document} %We declare where the document begins ... stuff end{document} %Declares when the document ends
  • 11. How to Write a Document in LATEX beginning a document What kinds of document classes are there? article - For scientific articles and reports book - In case you want to write an entire book beamer - Makes powerpoint slides (like this one!) many others, all tailored for their intended use...
  • 12. How to Write a Document in LATEX beginning a document You can specify additional options using square brackets... documentclass[11pt,twoside,a4paper]{article} More information can be found at: http://en.wikibooks.org/wiki/LaTeX/Document_Structure
  • 13. How to Write a Document in LATEX beginning a document Lots of great packages are available which add even more functionality to LATEX graphicsx - Includes the includegraphics command amsmath - For serious mathematical typesetting hyperref - Fun with hyperlinks (clicking one takes you to a specific figure) many others, check them out online!
  • 14. How to Write a document in LATEX Your First document in LATEX Okay everyone, lets make a document!
  • 15. How to Write a document in LATEX Your First document in LATEX Okay everyone, lets make a document! Notice how you have to compile before you can see what you’ve done! This takes some getting used to...
  • 16. How to Write a document in LATEX some more LATEX An ”environment” is a region of your document that LaTeX gives special consideration to. Some commands may only be valid in certain enviornments, and content may visually change depending on the envirornment it is in. An environment begins with the begin command, and ends with the end command. Environments can be nested within one another.
  • 17. How to Write a document in LATEX some more LATEX Here are a few popular LATEX environments: figure - for adding figures to the page enumerate, itemize - for making lists math - for making all those yucky math formulas array - for making tables flushleft, center, flushright - moves text left, center and right. verbatim - makes ”typewriter” text abstract - makes the abstract for the document.
  • 18. How to Write a document in LATEX Lets make a more interesting document We will work with the document class article and make a ’report’ out of it.