SlideShare a Scribd company logo
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

PPT
Introduction to latex by Rouhollah Nabati
PDF
Training basic latex
PDF
Introduction to LaTeX
PDF
Latex workshop: Essentials and Practices
PDF
Introduction to LaTeX
PPTX
Latex workshop
PDF
Latex slides
PDF
LaTeX-Presentation
Introduction to latex by Rouhollah Nabati
Training basic latex
Introduction to LaTeX
Latex workshop: Essentials and Practices
Introduction to LaTeX
Latex workshop
Latex slides
LaTeX-Presentation

What's hot (20)

PPTX
Latex for beginner
PDF
Introduction to Latex
PPTX
Data Structures in Python
PDF
Editing documents with LaTeX
PDF
LaTeX Introduction for Word Users
PDF
Introduction to LaTeX - Workshop Day 1
PDF
Introduction to LaTeX (For Word users)
PDF
Latex Introduction for Beginners
PDF
LaTeX Basics
PPT
documents writing with LATEX
PPT
LATEX.ppt
PPTX
Introduction Latex
PDF
Latex Notes
PDF
basic of desicion control statement in python
PPTX
Queue in Data Structure
PPTX
RECURSIVE DESCENT PARSING
PPT
Introduction to Python
PPTX
Linux commands
PDF
Introduction to IPython & Jupyter Notebooks
PDF
Python list
Latex for beginner
Introduction to Latex
Data Structures in Python
Editing documents with LaTeX
LaTeX Introduction for Word Users
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX (For Word users)
Latex Introduction for Beginners
LaTeX Basics
documents writing with LATEX
LATEX.ppt
Introduction Latex
Latex Notes
basic of desicion control statement in python
Queue in Data Structure
RECURSIVE DESCENT PARSING
Introduction to Python
Linux commands
Introduction to IPython & Jupyter Notebooks
Python list
Ad

Viewers also liked (7)

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

Similar to Learn Latex (20)

PPTX
Latex intro s_dutta_v2
PPTX
latex.pptx
PPTX
TECHNICAL WRITING USING LATEX POWER POIN
PPTX
استخدام LATEX في كتابة البحوث والكتب.pptx
PDF
Latex hafida-benhidour-19-12-2016
PPTX
LaTex tutorial with Texstudio
PPT
Latex - Companion for a Researcher - A Review.ppt
PPTX
Latex ppt copy
PPT
latex document how it is preapred, guide
PDF
Write effectlively in late x
PPT
latex power point presentation to learn latex
PPT
LaTeX_tutorial_Syed_Jan09.ppt
PPT
latex_intro.ppt
PPT
latex_intro.ppt
PPT
latex_intro.ppt
PPT
latex_intro.ppt
PPTX
Latex g.pradeep reddy
PPT
SJCIT-Workshop-Latex-Introduction-7-5-2024-6am.ppt
PPTX
Installation guide for Latex and MOODLE
Latex intro s_dutta_v2
latex.pptx
TECHNICAL WRITING USING LATEX POWER POIN
استخدام LATEX في كتابة البحوث والكتب.pptx
Latex hafida-benhidour-19-12-2016
LaTex tutorial with Texstudio
Latex - Companion for a Researcher - A Review.ppt
Latex ppt copy
latex document how it is preapred, guide
Write effectlively in late x
latex power point presentation to learn latex
LaTeX_tutorial_Syed_Jan09.ppt
latex_intro.ppt
latex_intro.ppt
latex_intro.ppt
latex_intro.ppt
Latex g.pradeep reddy
SJCIT-Workshop-Latex-Introduction-7-5-2024-6am.ppt
Installation guide for Latex and MOODLE

More from Haitham El-Ghareeb (20)

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

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Cell Types and Its function , kingdom of life
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Microbial disease of the cardiovascular and lymphatic systems
human mycosis Human fungal infections are called human mycosis..pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Insiders guide to clinical Medicine.pdf
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
Computing-Curriculum for Schools in Ghana
Cell Types and Its function , kingdom of life
TR - Agricultural Crops Production NC III.pdf
Basic Mud Logging Guide for educational purpose
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
VCE English Exam - Section C Student Revision Booklet
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF

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