SlideShare a Scribd company logo
Introduction to Latex
A very quick look at typesetting
documents
Andrei Gurtov
(based on Troy D. Milner and Simon Cuce slides)
Introduction
 Essentially a Markup Language (like
HTML, XML and RTF)
 An extension to TeX system
 TeX written by Donald Knuth in 70´s
Latex vs. Word Processors
 High typeset quality
 Easy to include math formulas
 Source file format id not bounded to a
particular OS or platform
 Latex implementations exists for all
platforms (DOS, Windows, Unices,..)
 Latex is free
Latex vs. Word Processors
 De facto standard for scientific
publishing
 Very few bugs
 Good for large documents
 Can run even on 386 PC
 Not very easy to learn
Creating Latex Files
Your Latex File Your Bibtex File
Latex compile x3
Bibtex compile x2
Latex compile x3
Your Postscript File
Dvips compile x1
Latex File Structure
 Document Class
Predefined Formats (article, report, book,..).
 Packages used
Added Functionality (graphics, reference style,...).
 Main Body
Text and Bibliography References.
The Basics
 Document Class
documentclass[options]{class}
options = a4paper, 11pt, 12pt, 10pt, twocolumn,
landscape,...
class = article, report, book,...
 Packages
usepackage{package name}
epsfig = insert PS pictures into the
document
fancyhdr = easy definition of footer and
header
Body of Text
 Start with begin{document}
 End with end{document}
 Typesetting Text
–  or newline and newpage
– Quotations
– Bold textbf{……………} or bf
– Italics emph{…………} or textit{………} or it
– Underline underline{…………} or ul
Body of Text cont…
 Including Multiple Files
– input{filename.tex}
Format
 Sections
– section{…} = 1. Latex is Great
– subsection{…} = 1.1 Why Latex is Great
– subsubsection{…} = 1.1.1 Reason One
– appendix - changes numbering scheme
– chapter{…} - To be used with book and report
document classes
 Titles, Authors and others
– title{…} author{…}
– footnote{…}
Format Contd.
 maketitle - Display Title and Author
 tableofcontents - generates TOC
 listoftables - generates LOT
 listoffigures - generates LOF
 Labels
– label{marker} - Marker in document.
– pageref{marker} - Displays page no. of marker.
– ref{marker} - Displays section location of marker.
 Itemise
– Use either enumerate, itemize or description.
– see handout for example.
Lists
 Source
– begin{itemize}
– item Apple
– item Orange
– end{itemize}
 Result
– Apple
– Orange
Lists
 Enumerate instead of itemize gives
a numbered list
 Lists can be recursive
Environment
 Something between
– begin{name}
– end{name}
 Many command, for example bf affect
the text until the end of environment
 Can be recursive
 Examples:
– itemize, center, abstract
Group
 Text between { and }
 Many commands work until the end of
the group
 Code
– put {one word bf in bold} here
 Result
– put one word in bold here
Alignment
 Environments center, flushleft,
flushright
 Example
– begin{flushright}
– Right aligned
– end{flushright}
 Result
Right aligned
Font size
tiny scriptsize footnotesize
small normalsize
large Large
LARGE huge
Huge
Example of Latex document
documentclass{article}
title{Simple Example}
author{Andrei Gurtov}
date{March 2000}
begin{document}
maketitle
Hello world!
end{document}
Tabular
 Columns
– begin{tabular}{|…|…|}
– end{tabular}
 Rows
– & - Split text into columns
–  - End a row
– hline - Draw line under row
– e.g. 123123 & 34.00 hline
Two Columns
l = automatically adjust
size, left justify
r = automatically adjust
size, right justify
p = set size
e.g p{4.7cm}
c = centre text
Example of table
begin{tabular}{|l|r|c|} hline
Date & Price & Size  hline
Yesterday & 5 & big  hline
Today & 3 & small  hline
end{tabular}
Date Price Size
Yesterday 5 Big
Today 3 Small
Floating Bodies
 Floating bodies can stop splitting of tables
and images over pages.
begin{figure}[options]
begin{table}[options]
 They will now appear in the LOF and LOT.
Options (recommendations)
h = place table here
t = place at top of page
b = place at bottom of page
Example of floating figure
 begin{figure}[ht]
 centeringepsfig{file=uni.ps,
width=5cm}
 caption{University of Helsinki}
 label{uni}
 end{figure}
Figure~ref{uni}
shows...
Images
 Use epsfig package
 usepackage{epsfig}
 Including images in main body
 epsfig{file=filename.eps, width=10cm,
height=9cm, angle=90}
 Creating EPS - Use xv and/or xfig.
 MS Power Point, save as GIF and convert to
EPS.
Bibliography by hand
begin{thebibliography}{}
bibitem[Come95]{Come95} Comer,
D. E., {it Internetworking with TCP/IP:
Principles, Protocols and Architecture},
volume 1, 3rd edition. Prentice-Hall,
1995.
end{thebibliography}
Bibliography using Bibtex
 Bibliography information is stored in a
*.bib file, in Bibtex format.
 Include chicago package
– usepackage{chicago}
 Set referencing style
– bibliographystyle{chicago}
 Create reference section by
– bibliography{bibfile with no extension}
Bibliography using Bibtex
@book{Come95,
author=“D. E. Comer”,
title={Internetworking with TCP/IP:
Principles, Protocols and Architecture},
publisher=“Prentice-Hall”,
year=1995,
volume=1,
edition=“Third”}
Bibliography contd.
 Citing references in text
– cite{cuc98} = (Cuce 1998)
– citeN{cru98} = Crud (1998)
– shortcite{tom98} = (Tom, et. al. 1998)
 Creating Bibtex Files
– Use Emacs with extensions.
– or copy Bibtex entries from bibliography
database.
Some Math
begin{center}
{large
$$ y=frac{a^3+2c_{x}}{1+sqrt{b_{x}}} $$

vspace{0.2in}
$$
Q=sum_{i=1}^{j}int_{mu}^{infty}f(x_
{j})dx $$ 
vspace{0.2in}
$$ Psi = oint_{-
infty}^{infty}f_{xy}({frac{partial
Qx}{partial Qy}})^{Im_{pi}^ prime} $$ 
}
Tools
UNIX based systems
– xdvi, ghostview, fixps, emacs with
latex/bibtex support.
Windows 98/NT
– Ghostview, Acrobat Distiller, Acrobat
Reader, Scientific Workplace (not the best),
the Bibtex viewer is good. Paint Shop Pro,
Latex and Emacs
Conclusions
 Mathematical Formulae are easy.
 Avoid GUI latex creators. (Lyx, Klyx,
Scientific Word).
 Use the bibtex search engine:
http://www.cs.monsh.edu.au/mirrors/bibliography
 Consider converting Postscript files to
PDF to conserve space.

More Related Content

Similar to latex_intro.ppt

Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLE
abigail4894
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
Haitham El-Ghareeb
 
Erlang session1
Erlang session1Erlang session1
Erlang session1
mohamedsamyali
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
Aisha Abdullahi
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
Mohamed Alrshah
 
Chap02 scr
Chap02 scrChap02 scr
Chap02 scr
Hirwanto Iwan
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
Hossein Babashah
 
Functional programming seminar (haskell)
Functional programming seminar (haskell)Functional programming seminar (haskell)
Functional programming seminar (haskell)
Bikram Thapa
 
help with Linux/Unix starting
help with Linux/Unix startinghelp with Linux/Unix starting
help with Linux/Unix starting
dummy
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
Nimrita Koul
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
BITS
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
Haitham Raik
 
Linux
LinuxLinux
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
sahirbhatnagar
 
Presentation new
Presentation newPresentation new
Presentation new
Diwakar raja
 
Latex for beginners
Latex for beginnersLatex for beginners
Latex for beginners
Kaushik Naik
 
Latex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. HanumantharajuLatex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. Hanumantharaju
BMS Institute of Technology and Management
 
abc12
abc12abc12
abc12
kshraddha9
 
popopo
popopopopopo
popopo
kshraddha9
 

Similar to latex_intro.ppt (19)

Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLE
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
 
Erlang session1
Erlang session1Erlang session1
Erlang session1
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
Chap02 scr
Chap02 scrChap02 scr
Chap02 scr
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Functional programming seminar (haskell)
Functional programming seminar (haskell)Functional programming seminar (haskell)
Functional programming seminar (haskell)
 
help with Linux/Unix starting
help with Linux/Unix startinghelp with Linux/Unix starting
help with Linux/Unix starting
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
 
Linux
LinuxLinux
Linux
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
Presentation new
Presentation newPresentation new
Presentation new
 
Latex for beginners
Latex for beginnersLatex for beginners
Latex for beginners
 
Latex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. HanumantharajuLatex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. Hanumantharaju
 
abc12
abc12abc12
abc12
 
popopo
popopopopopo
popopo
 

Recently uploaded

ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 

Recently uploaded (20)

ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 

latex_intro.ppt

  • 1. Introduction to Latex A very quick look at typesetting documents Andrei Gurtov (based on Troy D. Milner and Simon Cuce slides)
  • 2. Introduction  Essentially a Markup Language (like HTML, XML and RTF)  An extension to TeX system  TeX written by Donald Knuth in 70´s
  • 3. Latex vs. Word Processors  High typeset quality  Easy to include math formulas  Source file format id not bounded to a particular OS or platform  Latex implementations exists for all platforms (DOS, Windows, Unices,..)  Latex is free
  • 4. Latex vs. Word Processors  De facto standard for scientific publishing  Very few bugs  Good for large documents  Can run even on 386 PC  Not very easy to learn
  • 5. Creating Latex Files Your Latex File Your Bibtex File Latex compile x3 Bibtex compile x2 Latex compile x3 Your Postscript File Dvips compile x1
  • 6. Latex File Structure  Document Class Predefined Formats (article, report, book,..).  Packages used Added Functionality (graphics, reference style,...).  Main Body Text and Bibliography References.
  • 7. The Basics  Document Class documentclass[options]{class} options = a4paper, 11pt, 12pt, 10pt, twocolumn, landscape,... class = article, report, book,...  Packages usepackage{package name} epsfig = insert PS pictures into the document fancyhdr = easy definition of footer and header
  • 8. Body of Text  Start with begin{document}  End with end{document}  Typesetting Text – or newline and newpage – Quotations – Bold textbf{……………} or bf – Italics emph{…………} or textit{………} or it – Underline underline{…………} or ul
  • 9. Body of Text cont…  Including Multiple Files – input{filename.tex}
  • 10. Format  Sections – section{…} = 1. Latex is Great – subsection{…} = 1.1 Why Latex is Great – subsubsection{…} = 1.1.1 Reason One – appendix - changes numbering scheme – chapter{…} - To be used with book and report document classes  Titles, Authors and others – title{…} author{…} – footnote{…}
  • 11. Format Contd.  maketitle - Display Title and Author  tableofcontents - generates TOC  listoftables - generates LOT  listoffigures - generates LOF  Labels – label{marker} - Marker in document. – pageref{marker} - Displays page no. of marker. – ref{marker} - Displays section location of marker.  Itemise – Use either enumerate, itemize or description. – see handout for example.
  • 12. Lists  Source – begin{itemize} – item Apple – item Orange – end{itemize}  Result – Apple – Orange
  • 13. Lists  Enumerate instead of itemize gives a numbered list  Lists can be recursive
  • 14. Environment  Something between – begin{name} – end{name}  Many command, for example bf affect the text until the end of environment  Can be recursive  Examples: – itemize, center, abstract
  • 15. Group  Text between { and }  Many commands work until the end of the group  Code – put {one word bf in bold} here  Result – put one word in bold here
  • 16. Alignment  Environments center, flushleft, flushright  Example – begin{flushright} – Right aligned – end{flushright}  Result Right aligned
  • 17. Font size tiny scriptsize footnotesize small normalsize large Large LARGE huge Huge
  • 18. Example of Latex document documentclass{article} title{Simple Example} author{Andrei Gurtov} date{March 2000} begin{document} maketitle Hello world! end{document}
  • 19. Tabular  Columns – begin{tabular}{|…|…|} – end{tabular}  Rows – & - Split text into columns – - End a row – hline - Draw line under row – e.g. 123123 & 34.00 hline Two Columns l = automatically adjust size, left justify r = automatically adjust size, right justify p = set size e.g p{4.7cm} c = centre text
  • 20. Example of table begin{tabular}{|l|r|c|} hline Date & Price & Size hline Yesterday & 5 & big hline Today & 3 & small hline end{tabular} Date Price Size Yesterday 5 Big Today 3 Small
  • 21. Floating Bodies  Floating bodies can stop splitting of tables and images over pages. begin{figure}[options] begin{table}[options]  They will now appear in the LOF and LOT. Options (recommendations) h = place table here t = place at top of page b = place at bottom of page
  • 22. Example of floating figure  begin{figure}[ht]  centeringepsfig{file=uni.ps, width=5cm}  caption{University of Helsinki}  label{uni}  end{figure} Figure~ref{uni} shows...
  • 23. Images  Use epsfig package  usepackage{epsfig}  Including images in main body  epsfig{file=filename.eps, width=10cm, height=9cm, angle=90}  Creating EPS - Use xv and/or xfig.  MS Power Point, save as GIF and convert to EPS.
  • 24. Bibliography by hand begin{thebibliography}{} bibitem[Come95]{Come95} Comer, D. E., {it Internetworking with TCP/IP: Principles, Protocols and Architecture}, volume 1, 3rd edition. Prentice-Hall, 1995. end{thebibliography}
  • 25. Bibliography using Bibtex  Bibliography information is stored in a *.bib file, in Bibtex format.  Include chicago package – usepackage{chicago}  Set referencing style – bibliographystyle{chicago}  Create reference section by – bibliography{bibfile with no extension}
  • 26. Bibliography using Bibtex @book{Come95, author=“D. E. Comer”, title={Internetworking with TCP/IP: Principles, Protocols and Architecture}, publisher=“Prentice-Hall”, year=1995, volume=1, edition=“Third”}
  • 27. Bibliography contd.  Citing references in text – cite{cuc98} = (Cuce 1998) – citeN{cru98} = Crud (1998) – shortcite{tom98} = (Tom, et. al. 1998)  Creating Bibtex Files – Use Emacs with extensions. – or copy Bibtex entries from bibliography database.
  • 28. Some Math begin{center} {large $$ y=frac{a^3+2c_{x}}{1+sqrt{b_{x}}} $$ vspace{0.2in} $$ Q=sum_{i=1}^{j}int_{mu}^{infty}f(x_ {j})dx $$ vspace{0.2in} $$ Psi = oint_{- infty}^{infty}f_{xy}({frac{partial Qx}{partial Qy}})^{Im_{pi}^ prime} $$ }
  • 29. Tools UNIX based systems – xdvi, ghostview, fixps, emacs with latex/bibtex support. Windows 98/NT – Ghostview, Acrobat Distiller, Acrobat Reader, Scientific Workplace (not the best), the Bibtex viewer is good. Paint Shop Pro, Latex and Emacs
  • 30. Conclusions  Mathematical Formulae are easy.  Avoid GUI latex creators. (Lyx, Klyx, Scientific Word).  Use the bibtex search engine: http://www.cs.monsh.edu.au/mirrors/bibliography  Consider converting Postscript files to PDF to conserve space.

Editor's Notes

  1. 1
  2. 6
  3. 21
  4. 23
  5. 25
  6. 27
  7. 29
  8. 30