SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Latex for beginner
Latex for beginnerLatex for beginner
Latex for beginner
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
LaTex Tutorial
LaTex TutorialLaTex Tutorial
LaTex Tutorial
 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
 
Latex Notes
Latex NotesLatex Notes
Latex Notes
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 
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...
 
Data Structures : hashing (1)
Data Structures : hashing (1)Data Structures : hashing (1)
Data Structures : hashing (1)
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
 
Introduction to Overleaf Workshop
Introduction to Overleaf WorkshopIntroduction to Overleaf Workshop
Introduction to Overleaf Workshop
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
Editing documents with LaTeX
Editing documents with LaTeXEditing documents with LaTeX
Editing documents with LaTeX
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginners
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
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
 
Latex slides
Latex slidesLatex slides
Latex slides
 

Andere mochten auch (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
 

Ähnlich wie Learn Latex

Latex intro s_dutta_v2
Latex intro s_dutta_v2Latex intro s_dutta_v2
Latex intro s_dutta_v2
SoumyoDutta
 

Ähnlich wie Learn Latex (20)

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 workshop
Latex workshopLatex workshop
Latex workshop
 
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로 문서 작성하자
 
Latex ppt copy
Latex ppt   copyLatex ppt   copy
Latex ppt copy
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 

Mehr von Haitham El-Ghareeb

Data Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study NotesData Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study Notes
Haitham El-Ghareeb
 
Lecture 07 Data Structures - Basic Sorting
Lecture 07 Data Structures - Basic SortingLecture 07 Data Structures - Basic Sorting
Lecture 07 Data Structures - Basic Sorting
Haitham El-Ghareeb
 

Mehr von 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
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Kürzlich hochgeladen (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
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
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
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
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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