SlideShare a Scribd company logo
Document Preparation using LATEX 
Document Processor not a Word Processor 
A.B. Raju and Satish Annigeri 
B.V.B. College of Engineering & Technology 
Hubli 580 031 
20 Sep, 2014 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 1 / 23
LATEXversus MS Word 
Microsoft Word is good for 
short documents, such as cover 
pages, letters, or documents 
with about 100 pages. Basic 
features are easy to learn and 
GUI is useful for normal users. 
If you are writing a long 
document like a Technical 
paper, Project report, an article, 
or a review, you are better o 
with LATEX. Initial learning curve 
is steep, but persist with it and 
you will be rewarded. 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 2 / 23
Document Preparation 
Document Preparation is concerned with creating documents for print or 
electronic distribution. 
Typical document structure for long documents 
Front matter 
Main matter 
Back matter 
Mathematical equation typesetting 
Lists 
Tables 
Reference citation 
Cross referencing within the document 
LATEX lets the author take care of logical structure while it takes 
care of visual structure 
Word processors require the author to take care of both logical and 
visual structure 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 3 / 23
LATEX History 
Donald Knuth 
Professor Emeritus, Stanford 
University 
Author of the multi-volume The 
Art of Computer Programming 
Creator of TEX computer 
typesetting system and 
METAFONT font de
nition 
language 
TEX was developed in late 1970s 
by Donald Knuth Donald Knuth 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 4 / 23
LATEX History contd 
Leslie Lamport 
Initially developed the LATEX 
system as a document 
preparation system 
Developed when Leslie Lamport 
was working at SRI International 
Currently works at Microsoft 
Research 
LATEX was
rst released in the 
year 1985 
Current version is LATEX2 
Leslie Lamport 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 5 / 23
Installing LATEX 
Microsoft Windows 
MiKTeX is a popular LATEX distribution for Microsoft Windows 
Has a package manager to install additional packages or remove 
installed packages 
Has an update manager to update installed packages 
Can be downloaded from http://miktex.org 
GNU/Linux 
TeXLive is a LATEX distribution for GNU/Linux 
Installation and package management is done through the system 
package manager - one of apt-get, yum, zypper depending on your 
GNU/Linux distribution 
LATEX editors 
TeXstudio - Windows and GNU/Linux 
http://texstudio.sourceforge.net/ 
TeXMaker - Windows and GNU/Linux 
http://www.xm1math.net/texmaker/ 
TeXnicCenter - Windows http://www.texniccenter.org/ 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 6 / 23
LATEX Document Preparation Work
ow 
1 Write the LATEX source document in a text editor 
2 Compile the LATEX source document to your preferred output format 
3 View the document 
4 Repeat this loop to modify the document 
Popular output formats 
DVI { DVI viewer (xdvi on GNU/Linux, YAP in MiKTeX) 
PDF { Acrobat reader or other PDF viewers (xpdf or evince on 
GNU/Linux, Sumatra on Windows) 
Postscript (PS) { Ghostview viewer (Ghostscript) 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 7 / 23
Minimal LATEX document 
documentclass{article} 
begin{document} 
Hello, World 
end{document} 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 8 / 23
Structure of a Document 
A document can be structured into the following 
Part part Book 
Chapter chapter Book, Report 
Section section Book, Report, Article 
Sub Section section Book, Report, Article 
Sub Sub Section section Book, Report, Article 
Paragraph subsection Book, Report, Article 
Sub Paragraph subsubsection Book, Report, Article 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 9 / 23
Choosing the Right Document Class 
Book 
Title page on a separate page by itself 
Can contain parts, chapters, sections, subsections, subsubsections and 
paragraphs 
New chapters begin on a new page, on the right side by default 
Document is two sided by default, can be changed to one sided 
Can optionally have appendices. 
Report 
Title page on a separate page by itself 
Can contain chapters, sections, subsections, subsubsections, paragraphs 
New chapters begin on a new page 
Document is one sided by default. Two sided is optional 
Article 
No separate page for title page 
Can contain sections, subsections, subsubsections, paragraphs 
Document is one sided by default. Two sided is optional 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 10 / 23
Adding Sections 
documentclass{article} 
begin{document} 
section{Word} label{sec:word} 
I prefer using LaTeX{} to using Microsoft Word or 
other word processors. 
section{Latex}label{sec:tex} 
I love LaTeX. As I mentioned in Section~ref{sec:word}, 
I do not like word processors. 
end{document} 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 11 / 23
Some Tips for Beginners 
Words are separated by spaces. Number of spaces doesn't matter, 
one is as good as 100. 
Paragraphs are separated by empty lines. Number of empty lines 
doesn't matter, one is as good as 100. 
LATEX is a markup language. To make something to be printed in 
bold in the document, you mark it in the source with 
textbf{this will be in bold}. 
Following characters are reserved for use by LATEX { 
# $ %  ~ _ ^  { }. To print these characters in your document, 
you will have to escape tem. For example  to print . 
The characters that can appear in your text are: 
Alphabets: a-z, A-Z 
Digits: 0-9 
Punctuation: . : ; , ? ! ` ' ( ) [ ] - / * @ 
Mathematical symbols: + =   
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 12 / 23
Some More Tips 
A soft return is introduced with two backslashes:  
A non-breaking space is: ~ as in Chapter~1 
LATEX automatically hyphenates words where necessary 
Beginners must look out for some common errors: 
A misspelled command or environment name 
Improperly matching braces 
Trying to use one of the ten special characters # $ %  _ { } ~ ^ , 
as an ordinary printing symbol without escaping them 
Improperly matching formula delimiters { for example, ( without a 
matching ) 
The use in ordinary text of a command like ^ that can appear only in a 
mathematical formula 
A missing end command 
A missing command argument 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 13 / 23
All the Fuss about Spaces 
Space after a sentence is longer than a normal space. Can you see it 
just before this sentence begins? 
Sometimes the period does not represent end of a sentence, such as, 
Prof. Donald Knuth. The period after Prof. does not end a sentence. 
You can tell this to LATEX.  prints a normal space. Compare the 
following in the printed document: 
Prof. Donald Knuth { Prof. Donal Knuth 
Prof. Donald Knuth { Prof. Donald Knuth 
Non-breaking space is introduced with ~ 
Prof. Donald Knuth { Prof. Donal Knuth 
Prof. Donald Knuth { Prof. Donald Knuth 
Prof. Donald Knuth { Prof.~Donald Knuth 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 14 / 23
Equation Example 
documentclass{article} 
begin{document} 
begin{equation} label{eq:sum} 
s = sum_{i=1}^{n}x_{i} 
end{equation} 
end{document} 
Mathematical equations can be displayed in displaymath or 
equation environment, with or without numbers. 
Displaymath mode without numbering: [ x' + y^2 = z_i ] or 
use the begin{equation*} x' + y^2 = z_i end{equation*} 
environment 
Inline math mode: Mathematical expressions within running 
sentences: radius of a circle is $r^2 = x^2 + y^2$ or 
radius of a circle is ( r^2 = x^2 + y^2 ), which will 
print as: radius of a circle is r 2 = x2 + y2 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 15 / 23
documentclass{article} 
begin{document} 
begin{equation} label{eq:mean} 
bar{x} = frac{sum_{i=1}^{n}x_{i}} {n} 
end{equation} 
The equation for mean is given in Equation ref{eq:mean}. 
end{document} 
x = 
Pn 
i=1 xi 
n 
(1) 
The equation for mean is given in Equation 1. 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 16 / 23
Document Class Examples 
documentclass{book} 
documentclass{report} 
documentclass{article} 
documentclass[a4paper]{article} 
documentclass[a4paper,11pt,twocolumn]{report} 
documentclass[12pt,letterpaper,oneside]{book} 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 17 / 23
documentclass{report} 
title{Learn LaTeX} 
author{A.B. Raju} 
begin{document} 
maketitle 
tableofcontents 
end{document} 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 18 / 23
documentclass{report} 
title{Learn LaTeX} 
author{A.B. Raju} 
begin{document} 
maketitle 
tableofcontents 
include{chapter_1} 
include{chapter_2} 
include{chapter_3} 
end{document} 
In the above example, each chapter is typed in a separate
le, and 
included into the main document in the right sequence. 
Filenames usually have the .tex extension, but it is not included in 
the include{filename} command 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 19 / 23
Including Graphics 
Convert images into .jpg/.eps or .pdf format 
Include package graphicx 
Use the includegraphics{filename} command 
Filename is case sensitive on some GNU/Linux and Mac OS X 
To specify options, use the 
includegraphics[options]{filename} command 
Options may include [width=2.5cm], [height=5cm] etc 
LATEX understand several standard length units such as: 
in for inch, cm for centimeter, pt for point. 1 inch is 72 points 
A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 20 / 23

More Related Content

What's hot

Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
sahirbhatnagar
 
LaTex Tutorial
LaTex TutorialLaTex Tutorial
LaTex Tutorial
Jhoirene Clemente
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
Mohamed Alrshah
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)
Guy K. Kloss
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
Anusha Vajrapu
 
Latex slides
Latex slidesLatex slides
Latex slides
Dr. Vijay Ukani
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
Aisha Abdullahi
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
Jia-Bin Huang
 
Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Kiel Granada
 
Advanced latex
Advanced latexAdvanced latex
Advanced latex
awverret
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
University of Technology
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
Suddhasheel GHOSH, PhD
 
Technical writing using LaTeX
Technical writing using LaTeXTechnical writing using LaTeX
Technical writing using LaTeX
Partha Sarathi Chakraborty
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
Stéphane Péchard
 
Introduction to Overleaf Workshop
Introduction to Overleaf WorkshopIntroduction to Overleaf Workshop
Introduction to Overleaf Workshop
Olga Scrivner
 
scientific writing 01 - latex
scientific writing   01 - latexscientific writing   01 - latex
scientific writing 01 - latex
Leo Chen
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeX
Laura M. Castro
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
Hossein Babashah
 

What's hot (20)

Learn Latex
Learn LatexLearn Latex
Learn Latex
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
LaTex Tutorial
LaTex TutorialLaTex Tutorial
LaTex Tutorial
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
Latex slides
Latex slidesLatex slides
Latex slides
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
 
Latex
LatexLatex
Latex
 
Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1
 
Advanced latex
Advanced latexAdvanced latex
Advanced latex
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
 
Technical writing using LaTeX
Technical writing using LaTeXTechnical writing using LaTeX
Technical writing using LaTeX
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
 
Introduction to Overleaf Workshop
Introduction to Overleaf WorkshopIntroduction to Overleaf Workshop
Introduction to Overleaf Workshop
 
scientific writing 01 - latex
scientific writing   01 - latexscientific writing   01 - latex
scientific writing 01 - latex
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeX
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 

Similar to Introduction to LaTeX

LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
Rajesh Patel
 
LaTex workshop
LaTex workshopLaTex workshop
LaTex workshop
Ashwan Abdulmunem
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
Sudhanshu Janwadkar
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
Abdulazim N.Elaati
 
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATIONMODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
ijcseit
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
C-CORE
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
Ashesh Timilsina
 
Latex Tuitorial
Latex TuitorialLatex Tuitorial
Latex Tuitorial
ankitsinghaniya
 
Beautiful Bash: Let's make reading and writing bash scripts fun again!
Beautiful Bash: Let's make reading and writing bash scripts fun again!Beautiful Bash: Let's make reading and writing bash scripts fun again!
Beautiful Bash: Let's make reading and writing bash scripts fun again!
Aaron Zauner
 
latex cource.pptx
latex cource.pptxlatex cource.pptx
latex cource.pptx
vasudeva873639
 
Documentation
DocumentationDocumentation
Documentation
Eman Rifaat
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
Andrew Lowe
 
Hello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdfHello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdf
namarta88
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
MohamedHeddar
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
TapasPal34
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
Amit Bairwa
 
latex_intro.ppt
latex_intro.pptlatex_intro.ppt
latex_intro.ppt
ProfAbdulQayyumKhan
 
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
 

Similar to Introduction to LaTeX (20)

LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
 
LaTex workshop
LaTex workshopLaTex workshop
LaTex workshop
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
 
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATIONMODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
MODULAR AND DIDACTIC COMPILER DESIGN WITH XML INTER-PHASES COMMUNICATION
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
Latex Tuitorial
Latex TuitorialLatex Tuitorial
Latex Tuitorial
 
Beautiful Bash: Let's make reading and writing bash scripts fun again!
Beautiful Bash: Let's make reading and writing bash scripts fun again!Beautiful Bash: Let's make reading and writing bash scripts fun again!
Beautiful Bash: Let's make reading and writing bash scripts fun again!
 
latex cource.pptx
latex cource.pptxlatex cource.pptx
latex cource.pptx
 
Chap15 scr
Chap15 scrChap15 scr
Chap15 scr
 
Documentation
DocumentationDocumentation
Documentation
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Hello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdfHello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdf
 
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
 
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
 
Latex crash course
Latex crash courseLatex crash course
Latex crash course
 

Recently uploaded

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 

Recently uploaded (20)

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 

Introduction to LaTeX

  • 1. Document Preparation using LATEX Document Processor not a Word Processor A.B. Raju and Satish Annigeri B.V.B. College of Engineering & Technology Hubli 580 031 20 Sep, 2014 A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 1 / 23
  • 2. LATEXversus MS Word Microsoft Word is good for short documents, such as cover pages, letters, or documents with about 100 pages. Basic features are easy to learn and GUI is useful for normal users. If you are writing a long document like a Technical paper, Project report, an article, or a review, you are better o with LATEX. Initial learning curve is steep, but persist with it and you will be rewarded. A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 2 / 23
  • 3. Document Preparation Document Preparation is concerned with creating documents for print or electronic distribution. Typical document structure for long documents Front matter Main matter Back matter Mathematical equation typesetting Lists Tables Reference citation Cross referencing within the document LATEX lets the author take care of logical structure while it takes care of visual structure Word processors require the author to take care of both logical and visual structure A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 3 / 23
  • 4. LATEX History Donald Knuth Professor Emeritus, Stanford University Author of the multi-volume The Art of Computer Programming Creator of TEX computer typesetting system and METAFONT font de
  • 5. nition language TEX was developed in late 1970s by Donald Knuth Donald Knuth A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 4 / 23
  • 6. LATEX History contd Leslie Lamport Initially developed the LATEX system as a document preparation system Developed when Leslie Lamport was working at SRI International Currently works at Microsoft Research LATEX was
  • 7. rst released in the year 1985 Current version is LATEX2 Leslie Lamport A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 5 / 23
  • 8. Installing LATEX Microsoft Windows MiKTeX is a popular LATEX distribution for Microsoft Windows Has a package manager to install additional packages or remove installed packages Has an update manager to update installed packages Can be downloaded from http://miktex.org GNU/Linux TeXLive is a LATEX distribution for GNU/Linux Installation and package management is done through the system package manager - one of apt-get, yum, zypper depending on your GNU/Linux distribution LATEX editors TeXstudio - Windows and GNU/Linux http://texstudio.sourceforge.net/ TeXMaker - Windows and GNU/Linux http://www.xm1math.net/texmaker/ TeXnicCenter - Windows http://www.texniccenter.org/ A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 6 / 23
  • 9. LATEX Document Preparation Work ow 1 Write the LATEX source document in a text editor 2 Compile the LATEX source document to your preferred output format 3 View the document 4 Repeat this loop to modify the document Popular output formats DVI { DVI viewer (xdvi on GNU/Linux, YAP in MiKTeX) PDF { Acrobat reader or other PDF viewers (xpdf or evince on GNU/Linux, Sumatra on Windows) Postscript (PS) { Ghostview viewer (Ghostscript) A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 7 / 23
  • 10. Minimal LATEX document documentclass{article} begin{document} Hello, World end{document} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 8 / 23
  • 11. Structure of a Document A document can be structured into the following Part part Book Chapter chapter Book, Report Section section Book, Report, Article Sub Section section Book, Report, Article Sub Sub Section section Book, Report, Article Paragraph subsection Book, Report, Article Sub Paragraph subsubsection Book, Report, Article A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 9 / 23
  • 12. Choosing the Right Document Class Book Title page on a separate page by itself Can contain parts, chapters, sections, subsections, subsubsections and paragraphs New chapters begin on a new page, on the right side by default Document is two sided by default, can be changed to one sided Can optionally have appendices. Report Title page on a separate page by itself Can contain chapters, sections, subsections, subsubsections, paragraphs New chapters begin on a new page Document is one sided by default. Two sided is optional Article No separate page for title page Can contain sections, subsections, subsubsections, paragraphs Document is one sided by default. Two sided is optional A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 10 / 23
  • 13. Adding Sections documentclass{article} begin{document} section{Word} label{sec:word} I prefer using LaTeX{} to using Microsoft Word or other word processors. section{Latex}label{sec:tex} I love LaTeX. As I mentioned in Section~ref{sec:word}, I do not like word processors. end{document} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 11 / 23
  • 14. Some Tips for Beginners Words are separated by spaces. Number of spaces doesn't matter, one is as good as 100. Paragraphs are separated by empty lines. Number of empty lines doesn't matter, one is as good as 100. LATEX is a markup language. To make something to be printed in bold in the document, you mark it in the source with textbf{this will be in bold}. Following characters are reserved for use by LATEX { # $ % ~ _ ^ { }. To print these characters in your document, you will have to escape tem. For example to print . The characters that can appear in your text are: Alphabets: a-z, A-Z Digits: 0-9 Punctuation: . : ; , ? ! ` ' ( ) [ ] - / * @ Mathematical symbols: + = A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 12 / 23
  • 15. Some More Tips A soft return is introduced with two backslashes: A non-breaking space is: ~ as in Chapter~1 LATEX automatically hyphenates words where necessary Beginners must look out for some common errors: A misspelled command or environment name Improperly matching braces Trying to use one of the ten special characters # $ % _ { } ~ ^ , as an ordinary printing symbol without escaping them Improperly matching formula delimiters { for example, ( without a matching ) The use in ordinary text of a command like ^ that can appear only in a mathematical formula A missing end command A missing command argument A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 13 / 23
  • 16. All the Fuss about Spaces Space after a sentence is longer than a normal space. Can you see it just before this sentence begins? Sometimes the period does not represent end of a sentence, such as, Prof. Donald Knuth. The period after Prof. does not end a sentence. You can tell this to LATEX. prints a normal space. Compare the following in the printed document: Prof. Donald Knuth { Prof. Donal Knuth Prof. Donald Knuth { Prof. Donald Knuth Non-breaking space is introduced with ~ Prof. Donald Knuth { Prof. Donal Knuth Prof. Donald Knuth { Prof. Donald Knuth Prof. Donald Knuth { Prof.~Donald Knuth A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 14 / 23
  • 17. Equation Example documentclass{article} begin{document} begin{equation} label{eq:sum} s = sum_{i=1}^{n}x_{i} end{equation} end{document} Mathematical equations can be displayed in displaymath or equation environment, with or without numbers. Displaymath mode without numbering: [ x' + y^2 = z_i ] or use the begin{equation*} x' + y^2 = z_i end{equation*} environment Inline math mode: Mathematical expressions within running sentences: radius of a circle is $r^2 = x^2 + y^2$ or radius of a circle is ( r^2 = x^2 + y^2 ), which will print as: radius of a circle is r 2 = x2 + y2 A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 15 / 23
  • 18. documentclass{article} begin{document} begin{equation} label{eq:mean} bar{x} = frac{sum_{i=1}^{n}x_{i}} {n} end{equation} The equation for mean is given in Equation ref{eq:mean}. end{document} x = Pn i=1 xi n (1) The equation for mean is given in Equation 1. A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 16 / 23
  • 19. Document Class Examples documentclass{book} documentclass{report} documentclass{article} documentclass[a4paper]{article} documentclass[a4paper,11pt,twocolumn]{report} documentclass[12pt,letterpaper,oneside]{book} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 17 / 23
  • 20. documentclass{report} title{Learn LaTeX} author{A.B. Raju} begin{document} maketitle tableofcontents end{document} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 18 / 23
  • 21. documentclass{report} title{Learn LaTeX} author{A.B. Raju} begin{document} maketitle tableofcontents include{chapter_1} include{chapter_2} include{chapter_3} end{document} In the above example, each chapter is typed in a separate
  • 22. le, and included into the main document in the right sequence. Filenames usually have the .tex extension, but it is not included in the include{filename} command A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 19 / 23
  • 23. Including Graphics Convert images into .jpg/.eps or .pdf format Include package graphicx Use the includegraphics{filename} command Filename is case sensitive on some GNU/Linux and Mac OS X To specify options, use the includegraphics[options]{filename} command Options may include [width=2.5cm], [height=5cm] etc LATEX understand several standard length units such as: in for inch, cm for centimeter, pt for point. 1 inch is 72 points A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 20 / 23
  • 24. An example documentclass{article} usepackage{graphicx} begin{document} begin{figure} includegraphics{MyBat} caption{This is My Bat} label{fig:bat} end{figure} In Figure ref{fig:bat} end{document} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 21 / 23
  • 25. TikZ Pictures begin{tikzpicture} draw[step=0.5,blue!20,very thin] (-1.5,-1.5) grid (1.5,1.5); draw[thick] (-1.5,0) -- (1.5,0); draw[thick] (0,-1.5) -- (0,1.5); draw[very thick] (-1,0) .. controls(-1,0.555) and (-0.555,1) .. (0,1) .. controls(0.555,1) and (1,0.555) .. (1,0); end{tikzpicture} A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 22 / 23
  • 26. Thank You A.B. Raju (BVBCET, Hubli) Document Preparation using LATEX 20 Sep, 2014 23 / 23