340 likes | 388 Views
TeX, created by Donald Knuth in the 70s, revolutionized typesetting. LaTeX, an extension of TeX, offers high-quality typesetting, easy math formula inclusion, image and table formatting, ideal for large documents. Learn LaTeX basics and how to create bibliographies using BibTeX.
E N D
Introduction • TeX is essentially a Markup Language (like HTML, XML and RTF) • TeX written by Donald Knuth in 70´s • A revolution in typesetting • Latex is an extension of TeX • Macro packages to make TeX easier to use
Latex vs. Word Processors • High typeset quality • Easy to include math formulas • Easy to deal for formatting images and tables inside text paragraphs. • Good for large documents • Source file format is not bounded to a particular OS or platform • Latex implementations exists for all platforms (Windows, Mac,..) • Latex is free
Example of Latex document \documentclass{article} \title{Simple Example} \author{Ahmed Ali} \date{November 2015} \begin{document} \maketitle Hello world! \end{document}
Downloading Latex MiKTeX : a complete LaTeX system for Windows. http://www.miktex.org/ TeXnicCenter: an open-source editor and development environment for LaTeX files (Windows). http://www.texniccenter.org/
Latex File Structure • Document Class Predefined Formats (article, report, book,..). • Packages used Added Functionality (graphics, reference style,...). • Main Body Text and Bibliography References.
The Basics • Document Class \documentclass[options]{class} • options = a4paper, 11pt, 12pt, 10pt, twocolumn, landscape,... • class = article, report, book,... • Packages \usepackage{package name} • Package name : (examples) • epsfig = insert PS pictures into the document. • fancyhdr = easy definition of footer and header. • hyperref = manage links/URL within the document. • graphicx= insert graphic files within a document.
Body of Text • Start with \begin{document} • End with \end{document} • Typesetting Text • \\ or \newlineand \newpage • Quotations • Bold \textbf{……………} or\bf • Italics \emph{…………}or \textit{………} or \it • Underline \underline{…………} or\ul
Format Contd. • \maketitle- Display Title and Author • \tableofcontents- generates TOC • \listoftables- generates LOT • \listoffigures- generates LOF • Labels • \label{marker}- Marker in document. • \pageref{marker} - Displays page no. of marker. • \ref{marker}- Displays section location of marker. • Itemize • Use either enumerate, itemize or description.
Body of Text cont… The .tex extension is optional • Using Multiple Files • \input{filename.tex} • \include{filename.tex} This is a good idea to separate the formatting from the real writing and to split the large documents into small parts. Main differences between \input and \include :
Body of Text cont… \input \include
Format • Sections and subsection • \section{Latex is Great} 1. Latex is Great • \subsection{Why Latex is Great} 1.1 Why Latex is Great • \subsubsection{Reason one}1.1.1 Reason One • Titles, Authors and others • \title{…} • \author{…} • \date{…}
Lists • Two types of lists • itemize Bullets • enumerate Numbering Lists can be recursive (nested) • Formats • \begin{itemize} • \item …… • \item …… • \end{itemize} • \begin{enumerate} • \item …… • \item …… • \end{enumerate}
Bibliography using Bibtex • Bibliography information is stored in a *.bib file, in Bibtex format. • Include chicago package • \usepackage{chicago} • Set referencing style • \bibliographystyle{chicago} • Create reference section by • \bibliography{bibfile with no extension}
Bibliography using Bibtex • You need a file (e.g. myref.bib) where you have the Bibtex of your reference (e.g. a book, an article, website..etc.) • Put the file in the same folder of your Latex file. • Inside your text , cite a reference using : • \cite{……} • \citeN {……} • \shortcite{……}
Bibliography example. 1 myref.bib 2 Example.tex
How to use Latex 1 • Create new Latex document
How to use Latex 2 • a new Latex document
How to use Latex 4 • Save the file as (example.tex) 3 • Type your Latex text
How to use Latex • Build your file (example.tex) 5 • If your text has no errors then the PDF file for this Latex will be created and opened
How to use Latex 6 • The created PDF file for (example.tex) is then opened
How to create Bibtex files 1 • Create new document
How to create Bibtex files 2 • a new document
3 • Type your Bibtex
How to create Bibtex files 4 • (Save As ) your Bibtex file 3 • Type your Bibtex
How to create Bibtex files 5 • Type a name for the file and add extension (.bib) (e.g. myref.bib) and put in same folder where your Latex will be
How to create Bibtex files 6 • The file after saving as .bib
How to useBibtex files 8 • Now you can cite any refrence in that file • Specify your Bibtex file (myref) 7
Conclusions • Latex is optimal for master and phd thesis. • Latex is good for large documents, reports, papers. • Mathematical formulas are easy. • Formatting figures and tables inside a large document is easier. • Referencing is easier using Latex.