SlideShare a Scribd company logo
1 of 27
Download to read offline
Learn LaTeX in 30 Minutes

              A. LOTFI
 School of Science and Technology
   Nottingham Trent University
Use the right tool for the job
Latex vs. MS Word
If you need to write a short letter,
a cover page, you are best of
writing in Word. For simple
documents, you don't need fancy
layout. So, you can save time by
writing with a WYSIWYG editor like
Word.
If you are writing a long
document like a PhD thesis, an
article, or a review, you are better
of with LaTeX.


http://openwetware.org/wiki/Word_vs._LaTeX
Why LaTeX
Very powerful control of document generation,
particularly large technical documents
Very easy for formatting, numbering, and referencing
You can learn all about it in a couple of hours.
What is Needed
Use MikTex for Microsoft windows platform. MikTex is
free.
  http://www.miktex.org/
Use TEXnicCentre as your editor.
  http://www.texniccenter.org/
The LaTeX Process
 1.   Create a text file with your favorite text editor (TEXnicCenter
      Editor).
 2.   “Compile” or “Build” your document using the LaTeX program
 3.   Display resulting Document in either PDF or DVI
 4.   Continue writing and go to 1 until finished.


                          latex           .div file     Yap viewer
      .tex file           bibtex
                                           .pdf file     PDF reader
                          pdflate
.bib file   .jpg & .eps   xhlatex        .html file     IE/Chrome
My First LaTeX Document
documentclass{article}
begin{document}
I do not like Microsoft word.
end{document}




                                Ex_1
Add Sections
documentclass{article}
begin{document}
section{Word} label{sec:word}
  I do not like Microsoft word.

section{Latex}label{sec:tex}
  I like Latex. As meantioned in
  Section ref{sec:word} I do not like
  MS Word.
end{document}


                                         Ex_2
Equation Example
documentclass{article}
begin{document}

begin{equation} label{eq:sum}
s = sum_{i=1}^{n}x_{i}
end{equation}

end{document}




                                  Ex_3
Equation Example (2)
documentclass{article}
begin{document}

begin{equation} label{eq:mean}
bar{x} = frac{sum_{i=1}^{n}x_{i}} {n}
end{equation}

In Equation ref{eq:mean} …
end{document}



                                           Ex_4
Equation Example (3)
documentclass{report}
begin{document}

begin{equation} label{eq:sd}
sigma =
  sqrt{frac{sumlimits_{i=1}^{n}
  left(x_{i} - bar{x}right)^{2}}
  {n-1}}
end{equation}
end{document}


                                      Ex_5
Document Class
Use different class for your document.

documentclass{article}
documentclass{book}
documentclass{letter}
documentclass{report}
Report Document
documentclass{report}
title{Learn Latex}
author{A. Lotfi}

begin{document}
maketitle
tableofcontents

end{document}
Report Document – Include Chapters

documentclass{report}
title{Learn Latex}
author{A. Lotfi}
begin{document}
maketitle
tableofcontents
  include{chapter_1}
  include{chapter_2}
  include{chapter_3}
end{document}
Including Images
Need to convert your image graphics into JPG
and/or EPS.
Need to include an extension package to
LaTeX called “graphics” using command
usepackage{graphics}
Image Graphics Example
documentclass{article}
usepackage{graphics}                  .jpg or .eps
begin{document}                       Do not specify
  begin{figure}
                                       The extension.
  includegraphics{MyCat}
  caption{This is My Cat} label{fig:cat}
  end{figure}
In Figure ref{fig:cat} …
end{document}



                                                Ex_6
Comments in LaTeX
    To comment a line or a paragraph use:
%
      Ignores the rest of the line


    Any text after end{document} also will be discarded.
Special Characters
Use the  character
   e.g.
    My_Name.vsd
    More than 10%
Use `` and ‘’ for quotation marks. This is different
from “ “. In Latex ``cat’’ should be used to have
double quote.
Making References
documentclass{article}
begin{document}
  Because we are using symbolic references,
  e.g., cite{AL} a second pass is necessary.

begin{thebibliography}{99}
bibitem{AL}
A Lotfi, emph{Learn Latex in 30 Minutes}
end{thebibliography}
end{document}




                                                Ex_7
Problem with this method
User is burdened with deciding how to format article
titles, journal names, proceeding references
Difficult to reuse references in other documents
Making References - BibTex

documentclass{article}
begin{document}
  Because we are using symbolic
  references, e.g., cite{AL} a second
  pass is necessary.

bibliographystyle{plain}
bibliography{mybib}
end{document}



                                         Ex_8
The BibTex Process
1.   Create a BibTex file with Rerefence entries
2.   Get a *.bst file (bibliographic style file. IEEE.bst or
     Springer.bst)
       •    You can use plain, abbrv, unstr or alpha
3.   “Compile” or “Build” your LaTeX.
4.   Only references that you actually cited will appear on the list.
Types of Documents BibTex can handle
ARTICLE             MISC
BOOK                PHDTHESIS
BOOKLET             PROCEEDINGS
INBOOK              TECHREPORT
INCOLLECTION        UNPUBLISHED
INPROCEEDINGS
MANUAL
Sample BibTex Book Entry
@BOOK{Press,
author=“A. Lotfi",
title="Applications and Science in Soft
  Comuting, Series.",
publisher=“Springer",
year=2004,
}
Create BibTex File
From RefWorks, export your references in BibTex
format. This is the easiest way of generating your
BIB file.
For Harvard system, use Natbib package.
Harvard System
 Use natbib package for Harvard citation style.
documentclass{article}
usepackage{natbib}
bibpunct{(}{)}{;}{a}{,}{,}

begin{document}
In citet{AL} more details about this item is
explained citep{AL}.

bibliographystyle{plainnat}
bibliography{mybib}
end{document}

                                                  Ex_9
Examples
Download a copy of this note and all example files
from:


         http://lotfi.net/latex/
Also available:
   Writing a Scientific Paper in Latex
   Writing a PhD Thesis in Latex

More Related Content

What's hot

Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXJia-Bin Huang
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesMohamed Alrshah
 
Cs6503 theory of computation book notes
Cs6503 theory of computation book notesCs6503 theory of computation book notes
Cs6503 theory of computation book notesappasami
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginnersssuser9e8fa4
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with TexstudioHossein Babashah
 
TOC 1 | Introduction to Theory of Computation
TOC 1 | Introduction to Theory of ComputationTOC 1 | Introduction to Theory of Computation
TOC 1 | Introduction to Theory of ComputationMohammad Imam Hossain
 
Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Kiel Granada
 
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
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical AnalysisMunni28
 
Finite automata intro
Finite automata introFinite automata intro
Finite automata introlavishka_anuj
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical AnalyzerArchana Gopinath
 
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...researchcenterm
 
Advanced latex
Advanced latexAdvanced latex
Advanced latexawverret
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE) SeanPereira2
 

What's hot (20)

Introduction to Latex
Introduction to Latex Introduction to Latex
Introduction to Latex
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
 
Latex workshop: Essentials and Practices
Latex workshop: Essentials and PracticesLatex workshop: Essentials and Practices
Latex workshop: Essentials and Practices
 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
 
Cs6503 theory of computation book notes
Cs6503 theory of computation book notesCs6503 theory of computation book notes
Cs6503 theory of computation book notes
 
Syntax
SyntaxSyntax
Syntax
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginners
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Chapter 5 Syntax Directed Translation
Chapter 5   Syntax Directed TranslationChapter 5   Syntax Directed Translation
Chapter 5 Syntax Directed Translation
 
TOC 1 | Introduction to Theory of Computation
TOC 1 | Introduction to Theory of ComputationTOC 1 | Introduction to Theory of Computation
TOC 1 | Introduction to Theory of Computation
 
Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1Basic Latex Typesetting - Session 1
Basic Latex Typesetting - Session 1
 
Introduction to LaTeX (For Word users)
 Introduction to LaTeX (For Word users) Introduction to LaTeX (For Word users)
Introduction to LaTeX (For Word users)
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical Analysis
 
Finite automata intro
Finite automata introFinite automata intro
Finite automata intro
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical Analyzer
 
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
 
Advanced latex
Advanced latexAdvanced latex
Advanced latex
 
Theory of Computation Unit 1
Theory of Computation Unit 1Theory of Computation Unit 1
Theory of Computation Unit 1
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE)
 

Viewers also liked

Research Methodologies - Lecture 02
Research Methodologies - Lecture 02Research Methodologies - Lecture 02
Research Methodologies - Lecture 02Haitham El-Ghareeb
 
Sample chapters [data structure and algorithmic thinking with python]
Sample chapters [data structure and algorithmic thinking with python]Sample chapters [data structure and algorithmic thinking with python]
Sample chapters [data structure and algorithmic thinking with python]CareerMonk Publications
 
Python data structures(University of michigan)
Python data structures(University of michigan)Python data structures(University of michigan)
Python data structures(University of michigan)Abdullah Al Mamun
 
Lecture 9 - DSA - Python Data Structures
Lecture 9 - DSA - Python Data StructuresLecture 9 - DSA - Python Data Structures
Lecture 9 - DSA - Python Data StructuresHaitham El-Ghareeb
 

Viewers also liked (7)

DSA-Lecture-05
DSA-Lecture-05DSA-Lecture-05
DSA-Lecture-05
 
Research Methodologies - Lecture 02
Research Methodologies - Lecture 02Research Methodologies - Lecture 02
Research Methodologies - Lecture 02
 
Sample chapters [data structure and algorithmic thinking with python]
Sample chapters [data structure and algorithmic thinking with python]Sample chapters [data structure and algorithmic thinking with python]
Sample chapters [data structure and algorithmic thinking with python]
 
Lecture-05-DSA
Lecture-05-DSALecture-05-DSA
Lecture-05-DSA
 
Python data structures(University of michigan)
Python data structures(University of michigan)Python data structures(University of michigan)
Python data structures(University of michigan)
 
Lecture 9 - DSA - Python Data Structures
Lecture 9 - DSA - Python Data StructuresLecture 9 - DSA - Python Data Structures
Lecture 9 - DSA - Python Data Structures
 
DSA - Lecture 04
DSA - Lecture 04DSA - Lecture 04
DSA - Lecture 04
 

Similar to Learn Latex

Similar to Learn Latex (20)

Latex Notes
Latex NotesLatex Notes
Latex Notes
 
LaTeX Survival Guide
LaTeX Survival Guide LaTeX Survival Guide
LaTeX Survival Guide
 
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
 
Latex intro s_dutta_v2
Latex intro s_dutta_v2Latex intro s_dutta_v2
Latex intro s_dutta_v2
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
 
latex.pptx
latex.pptxlatex.pptx
latex.pptx
 
LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.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 Tuitorial
Latex TuitorialLatex Tuitorial
Latex Tuitorial
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
Chap03 scr
Chap03 scrChap03 scr
Chap03 scr
 
latex cource.pptx
latex cource.pptxlatex cource.pptx
latex cource.pptx
 
La tex basics
La tex basicsLa tex basics
La tex basics
 
Latex Tutorial
Latex TutorialLatex Tutorial
Latex Tutorial
 
LaTeX-Presentation
LaTeX-PresentationLaTeX-Presentation
LaTeX-Presentation
 
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
 
LaTeX로 문서 작성하자
LaTeX로 문서 작성하자LaTeX로 문서 작성하자
LaTeX로 문서 작성하자
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
Latex ppt copy
Latex ppt   copyLatex ppt   copy
Latex ppt copy
 

More from Haitham El-Ghareeb (20)

مختصر وحدة التعلم الذاتي 2015
مختصر وحدة التعلم الذاتي 2015مختصر وحدة التعلم الذاتي 2015
مختصر وحدة التعلم الذاتي 2015
 
وحدة التعلم الذاتي 2015
وحدة التعلم الذاتي 2015وحدة التعلم الذاتي 2015
وحدة التعلم الذاتي 2015
 
NoSQL Databases, Not just a Buzzword
NoSQL Databases, Not just a Buzzword NoSQL Databases, Not just a Buzzword
NoSQL Databases, Not just a Buzzword
 
EMC Academic Alliance Presentation
EMC Academic Alliance PresentationEMC Academic Alliance Presentation
EMC Academic Alliance Presentation
 
DSA - 2012 - Conclusion
DSA - 2012 - ConclusionDSA - 2012 - Conclusion
DSA - 2012 - Conclusion
 
Data Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study NotesData Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study Notes
 
Lect07
Lect07Lect07
Lect07
 
Lecture 07 Data Structures - Basic Sorting
Lecture 07 Data Structures - Basic SortingLecture 07 Data Structures - Basic Sorting
Lecture 07 Data Structures - Basic Sorting
 
LectureNotes-06-DSA
LectureNotes-06-DSALectureNotes-06-DSA
LectureNotes-06-DSA
 
LectureNotes-05-DSA
LectureNotes-05-DSALectureNotes-05-DSA
LectureNotes-05-DSA
 
LectureNotes-04-DSA
LectureNotes-04-DSALectureNotes-04-DSA
LectureNotes-04-DSA
 
LectureNotes-03-DSA
LectureNotes-03-DSALectureNotes-03-DSA
LectureNotes-03-DSA
 
LectureNotes-02-DSA
LectureNotes-02-DSALectureNotes-02-DSA
LectureNotes-02-DSA
 
LectureNotes-01-DSA
LectureNotes-01-DSALectureNotes-01-DSA
LectureNotes-01-DSA
 
DSA - Lecture 03
DSA - Lecture 03DSA - Lecture 03
DSA - Lecture 03
 
Ph.D. Registeration seminar
Ph.D. Registeration seminarPh.D. Registeration seminar
Ph.D. Registeration seminar
 
Lecture 01 - Research Methods
Lecture 01 - Research MethodsLecture 01 - Research Methods
Lecture 01 - Research Methods
 
Lecture 02 - DSA
Lecture 02 - DSALecture 02 - DSA
Lecture 02 - DSA
 
DSA-2012-Lect00
DSA-2012-Lect00DSA-2012-Lect00
DSA-2012-Lect00
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Learn Latex

  • 1. Learn LaTeX in 30 Minutes A. LOTFI School of Science and Technology Nottingham Trent University
  • 2. Use the right tool for the job
  • 3. Latex vs. MS Word If you need to write a short letter, a cover page, you are best of writing in Word. For simple documents, you don't need fancy layout. So, you can save time by writing with a WYSIWYG editor like Word. If you are writing a long document like a PhD thesis, an article, or a review, you are better of with LaTeX. http://openwetware.org/wiki/Word_vs._LaTeX
  • 4. Why LaTeX Very powerful control of document generation, particularly large technical documents Very easy for formatting, numbering, and referencing You can learn all about it in a couple of hours.
  • 5. What is Needed Use MikTex for Microsoft windows platform. MikTex is free. http://www.miktex.org/ Use TEXnicCentre as your editor. http://www.texniccenter.org/
  • 6. The LaTeX Process 1. Create a text file with your favorite text editor (TEXnicCenter Editor). 2. “Compile” or “Build” your document using the LaTeX program 3. Display resulting Document in either PDF or DVI 4. Continue writing and go to 1 until finished. latex .div file Yap viewer .tex file bibtex .pdf file PDF reader pdflate .bib file .jpg & .eps xhlatex .html file IE/Chrome
  • 7. My First LaTeX Document documentclass{article} begin{document} I do not like Microsoft word. end{document} Ex_1
  • 8. Add Sections documentclass{article} begin{document} section{Word} label{sec:word} I do not like Microsoft word. section{Latex}label{sec:tex} I like Latex. As meantioned in Section ref{sec:word} I do not like MS Word. end{document} Ex_2
  • 10. Equation Example (2) documentclass{article} begin{document} begin{equation} label{eq:mean} bar{x} = frac{sum_{i=1}^{n}x_{i}} {n} end{equation} In Equation ref{eq:mean} … end{document} Ex_4
  • 11. Equation Example (3) documentclass{report} begin{document} begin{equation} label{eq:sd} sigma = sqrt{frac{sumlimits_{i=1}^{n} left(x_{i} - bar{x}right)^{2}} {n-1}} end{equation} end{document} Ex_5
  • 12. Document Class Use different class for your document. documentclass{article} documentclass{book} documentclass{letter} documentclass{report}
  • 13. Report Document documentclass{report} title{Learn Latex} author{A. Lotfi} begin{document} maketitle tableofcontents end{document}
  • 14. Report Document – Include Chapters documentclass{report} title{Learn Latex} author{A. Lotfi} begin{document} maketitle tableofcontents include{chapter_1} include{chapter_2} include{chapter_3} end{document}
  • 15. Including Images Need to convert your image graphics into JPG and/or EPS. Need to include an extension package to LaTeX called “graphics” using command usepackage{graphics}
  • 16. Image Graphics Example documentclass{article} usepackage{graphics} .jpg or .eps begin{document} Do not specify begin{figure} The extension. includegraphics{MyCat} caption{This is My Cat} label{fig:cat} end{figure} In Figure ref{fig:cat} … end{document} Ex_6
  • 17. Comments in LaTeX To comment a line or a paragraph use: % Ignores the rest of the line Any text after end{document} also will be discarded.
  • 18. Special Characters Use the character e.g. My_Name.vsd More than 10% Use `` and ‘’ for quotation marks. This is different from “ “. In Latex ``cat’’ should be used to have double quote.
  • 19. Making References documentclass{article} begin{document} Because we are using symbolic references, e.g., cite{AL} a second pass is necessary. begin{thebibliography}{99} bibitem{AL} A Lotfi, emph{Learn Latex in 30 Minutes} end{thebibliography} end{document} Ex_7
  • 20. Problem with this method User is burdened with deciding how to format article titles, journal names, proceeding references Difficult to reuse references in other documents
  • 21. Making References - BibTex documentclass{article} begin{document} Because we are using symbolic references, e.g., cite{AL} a second pass is necessary. bibliographystyle{plain} bibliography{mybib} end{document} Ex_8
  • 22. The BibTex Process 1. Create a BibTex file with Rerefence entries 2. Get a *.bst file (bibliographic style file. IEEE.bst or Springer.bst) • You can use plain, abbrv, unstr or alpha 3. “Compile” or “Build” your LaTeX. 4. Only references that you actually cited will appear on the list.
  • 23. Types of Documents BibTex can handle ARTICLE MISC BOOK PHDTHESIS BOOKLET PROCEEDINGS INBOOK TECHREPORT INCOLLECTION UNPUBLISHED INPROCEEDINGS MANUAL
  • 24. Sample BibTex Book Entry @BOOK{Press, author=“A. Lotfi", title="Applications and Science in Soft Comuting, Series.", publisher=“Springer", year=2004, }
  • 25. Create BibTex File From RefWorks, export your references in BibTex format. This is the easiest way of generating your BIB file. For Harvard system, use Natbib package.
  • 26. Harvard System Use natbib package for Harvard citation style. documentclass{article} usepackage{natbib} bibpunct{(}{)}{;}{a}{,}{,} begin{document} In citet{AL} more details about this item is explained citep{AL}. bibliographystyle{plainnat} bibliography{mybib} end{document} Ex_9
  • 27. Examples Download a copy of this note and all example files from: http://lotfi.net/latex/ Also available: Writing a Scientific Paper in Latex Writing a PhD Thesis in Latex