Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Rajyalakshmi Divi IIT Bombay

Similar presentations


Presentation on theme: "By Rajyalakshmi Divi IIT Bombay"— Presentation transcript:

1 By Rajyalakshmi Divi IIT Bombay 23-04-2013
LaTeX By Rajyalakshmi Divi IIT Bombay

2 Things to be covered... What is LaTeX Components of latex document
Principles File structure Text Formatting Page formatting Header and footer Sections Table of contents Lists Tables

3 What is LaTeX.. LaTeX is a scripting language used for writing documents. OR LaTeX is a language for creating structured documents. Focuses on document structure rather than such details. Open source

4 Components of a LaTeX Document
Every LaTeX document must contain the following three components. Everything else is optional (even text). 1. \documentclass{article} document class may be Article, Report, Book, IEEEtran, Letter 2. \begin{document} 3. \end{document} By using size \documentclass[11pt]{article}

5 Principles Commands are case sensitive LaTeX commands in braces {}
optional information is included in square brackets []. The \documentclass command must appear at the very beginning of your LaTeX document, before any other LaTeX commands, or you will get an error message. commands that affect the whole document, should be included in the preamble, space between the \documentclass and \begin{document} commands is called.

6 Example of LaTeX writing..
\documentclass{article} \begin{document} Hello world! \end{document}

7 File structure.. Document Class
Predefined Formats (article, report, book,..). Packages used Added Functionality (graphics, reference style,...). Main Body Text and Bibliography References.

8 Text formatting Start with \begin{document} End with \end{document}
\\ or \newline for a new line in page \newpage for new page Bold \textbf{....} or \bf for bold text \Textit{....} for italics \emph{...} for emphasis

9 Contnd.. Underline \underline{…………} or \ul Including Multiple Files
\input{filename.tex} Use “setspace” package to add spaces between the lines Text alignment can be right, left, or center use flushleft, flushright, center accordingly % % is used for comments

10 Page formatting \maketitle - Display Title and Author
\begin{titlepage} this is used to write other information like roll number,college name etc \end{titlepage} \documentclass[11pt,twoside,a4paper]{article} is used to specify page size \usepackage[cm]{fullpage} for margins ex:\usepackage[top=2in, bottom=1.5in, left=1in, right=1in]{geometry} \title{…} -Titles \author{…} -Authors

11 Header and footer \pagestyle{headings}:- used to display default header I.e Section Name, and footer I.e page number) \pagestyle{myheadings} for customized header \usepackage{fancyhdr} for fancy header \pagestyle{fancy} \<l|c|r>head{Text} \<l|c|r>foot{Text} \lhead[lh-even]{lh-odd} \lfoot[lf-even]{lf-odd} \chead[ch-even]{ch-odd} \cfoot[cf-even]{cf-odd} \rhead[rh-even]{rh-odd} \rfoot[rf-even]{rf-odd}

12 sections Sections \section{…} \subsection{…} \subsubsection{…}
\appendix - changes numbering scheme

13 Table of contents created automatically by LaTeX
\tableofcontents-creates table of contents Has to be written after Title page. Add \usepackage{hyperref} to make the Toc content clickable

14 lists Lists command in LaTeX \begin{itemize}...
\end{itemize} for bulleted lists \begin{enumerate}... \end{enumerate} for numbered lists

15 Tables Columns \begin{tabular}{|…|…|} \end{tabular} Rows
& - Split text into columns \\ - End a row \hline - Draw line under row l = automatically adjust size, left justify r = automatically adjust size, right justify p = set size e.g p{4.7cm} c = centre text

16 References http://en.wikibooks.org/wiki/LaTeX


Download ppt "By Rajyalakshmi Divi IIT Bombay"

Similar presentations


Ads by Google