LaTeX A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. Alphanumeric source files are.

Slides:



Advertisements
Similar presentations
Lecture 8 Introduction to Latex. Introduction TeX is essentially a Markup Language (like HTML, XML and RTF) TeX written by Donald Knuth in 70´s –A revolution.
Advertisements

LaTeX tutorial Eileen Kraemer CSCI 6950 September 30 th, 2011.
Introduction to LaTeX CPS470 Software Engineering Fall 1998.
LaTeX 2e Basics CSE470 Fall 2000 Software Engineering B.J. Czerny Updated by J. Brown, A. Subramanian.
Document Preparation LaTeX and other vital tools for computing scientists. CMPUT 603: Teaching and Research Methods Paul Berube Sept. 19, 2005.
LaTeX 2e Basics CSE470 Spring 2000 Software Engineering B.J. Czerny Updated by Prasad.
CS 173 Fall Introduction to LaTeX David and Lucas CS 173 Fall 2009 Written with significant references to Oetiker et al. “The Not So Short Introduction.
Chapter 12: Network Programming Desktop Publishing Translator models Latex Documentation Preparation Postscript programming language WYSIWIG Editors.
LaTeX Tutorial. What is LaTeX? TeX is a typesetting system designed in 1978 to automate the production of high quality print using any type of computer.
Latex A document preparation system All academic staff in Computer Science publish their work using Latex – NOT Microsoft Word. Why? Note to self – press.
For AMS 200, 2009 Dept. of Applied Math & Statistics School of Engineering University of California Santa Cruz, CA A Very Short Introduction to LaTeX.
Welcome to the 3-day Workshop on > Presented by Saeid Abolfazli Faculty of Computer Science and IT University Malaya 23,24, and.
Adopted from: PRISM Brownbag Series June 9 th, 2009 Byungwon Woo.
LaTeX tutorial Syed Shazli. Most of the material taken from Monash University Online material available from Googling…
Research Tools: LaTex A high quality document preparation system by Karthikeyan Umapathy.
Introduction to LaTeX PRISM Brownbag Series June 9 th, 2009 Byungwon Woo.
An Introduction to the LaTex typesetting system LaTeX is a free system for document typesetting. Documents are stored in ASCII text files with markup,
Introduction to… About Tex & LaTeX What is TeX? What is LaTeX? Advantages - Disadvantages.
Introduction to Latex A very quick look at typesetting documents Andrei Gurtov (based on Troy D. Milner and Simon Cuce slides)
logic design vs. visual design
Introduction to Unix – CS 21 Lecture 16. Lecture Overview LaTeX History Running and creating LaTeX documents Documents and Articles Tables Lists Fonts.
Introduction to LaTeX Thomas Gorry. What is Latex?  A typesetting system used to produce professional looking documents.  Particularly good at handling.
LaTeX Tutorial Fiona Shearer May 11th, 2004 Disclaimer added
LaTeX A Short Intro to Marco D. Santambrogio Politecnico di Milano Sala DEIB 2 Sept 2015 Ver. 2/9/15.
CC510 - LaTeX 1 Lecturer - 김한규 (Hangyu Kim) 1CC510 – 2011.
CMSC 601 LaTeX Spring 2011 Tim Finin
LaTeX (+ BibTeX) Tutorial
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 5 Working with References and Mailings.
1 Lecture 4 A Brief Introduction to LaTeX Introduction to Information Technology Dr. Ken Tsang 曾镜涛
June LaTeX " A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. " Alphanumeric.
1 LaTeX For Dummies Mulugeta Gebregziabher Division of Biostatistics and Epidemiology MUSC April 4, 2011.
BRIEF A BRIEF Introduction to L A T E X For Physics Graduate Students Prof. L. S. Pinsky Physics Department University of Houston.
Academic Writing Using LaTeX
Creating documents 09/18/13 Introduction to Latex.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
Sukree Sinthupinyo Department of Computer Engineering Chulalongkorn University 13 June 2008.
SIGNewGrad: Intro to LaTeX
UoS Libraries 2011 EndNote X5 - basic graduate session.
An introduction to LaTeX a document preparation language Richard Bower (from an original lecture by Shaun Cole and Cedric Lacey)
C151 Multiuser Operating Systems Introduction to LaTeX.
CSE470 Software Engineering Fall Tools - Overview LaTeX – Tool to create documents RCS – Revision Control System, to maintain multiple versions.
Introduction to LaTeX and Bibtex
Chapter 5 More About LaTex. Packages A package, which takes the form of a file with a sty extension, can be used to alter formatting parameters, create.
R 賴威昇 Introduction 2. Why using LaTeX ? 3. LaTeX usage: ◦ Backbone ◦ Equation ◦ Figure ◦ Table ◦ BibTex 4. Compile 5. Conclusion.
Sébastien Le Roux. not What I am not going to talk about The explanations are in my HowTo ! Check my web IPCMS Basic tutorial to programming.
Vereniging voor Technische Physica workshop 2016.
Department of Mathematics, Jazan University, Jazan.
LaTex -Computer scientist named Donald Knuth developed the program called Tex, in 1978.(mainly focused on formulae) -Later a mathematician and computer.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 23 Footnotes and.
LaTeX Tutorial. What is LaTeX? TeX is a typesetting system designed in 1978 to automate the production of high quality print using any type of computer.
LATEX By GerardoVela 3/27/2015.
Lecture 1 Introduction to Latex
Formatting a Research Paper
Sébastien Le Roux.
Vereniging voor Technische Physica workshop 2016.
Computer Fundamentals
By Rajyalakshmi Divi IIT Bombay
Introduction to LaTeX David and Lucas CS 173 Fall 2009
LaTeX Tutorial.
LaTeX is not... rubber a Bill Gates product WYSIWYG (see) VooDoo
Benchmark Series Microsoft Word 2016 Level 2
Benchmark Series Microsoft Word 2016 Level 2
An Introduction to the LaTex typesetting system
A Very Short Introduction to LaTeX
Engineering Librarian
Outline Basic English Information Inquiry Reading Technical Materials
A high quality document preparation system
Making Math Look Pretty – or How to Use LaTeX
Presentation transcript:

LaTeX A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. Alphanumeric source files are compiled into formatted documents Formatting happens at compile time using style files and manual formatting commands Manual formating commands are added as keywords (similar to HTML) Provides good support for mathematical formulas LaTeX is generally not WYSIWYG

Writing a Document Most of the formatting and final layout in LaTeX is done automatically using information contained in style files. Generic styles come with the system and many conferences or journals provide style files that ensure compliance with their formatting requirements. Concentrate on the content of your document and leave the formating and placement of figures and tables to LaTeX

Creating the Document The latex command compiles the document into a dvi format document file. You can look at this file using xdvi dvips creates a Postscript document from the dvi file. ps2pdf can convert Postscript to PDF Alternatively pdflatex can create PDF in one step. But: Postscript is usually better for printing

File Types A number of file types are used to create a LaTeX document LaTeX source document document_filename.tex DVI document (created by latex document_filename ) document_filename.dvi PostScript document (from dvips document_filename -o ) document_filename.ps PDF document (created by pdflatex document_filename ) document_filename.pdf BibTeX reference data file reference_filename.bib

Special Characters All formatting keywords in LaTeX are preceded by a \ character. Text after a % character is interpreted as comments The & character is used for formatting The ~ character is used to introduce additional whitespace between words The $ character delineates in-lined mathematics \\ produces a line break An empty line precedes a new paragraph Other reserved characters include # _ { }

A Basic Document Document classes define the type and style of the document. \documentclass[style definitions]{document type} Additional style definitions and macros can be included as packages \usepackage{package name} The actual content is put inside a document environment \begin{document} ... \end{document}

Titles and Sections The title is generated using the following keywords \title{your title} \author{author name} \date{date to appear in title} \maketitle Sections in the document are generated using sectioning keywords \section{section heading} or \section*{...} \subsection{...} or \subsection*{...} \subsubsection{...} or \subsubsection*{...}

Example 1 \documentclass[12pt,twocolumn]{article} \usepackage{times} \begin{document} \title{My Title} \author{John Doe \\ This University} \date{} \maketitle \section{Sectioning a Document} The $\backslash$section commands create sections in the document. \subsection*{Unnumbered Sections} By adding a * to the section command, sections without numbers can be generated. \subsection{Formatting} Text is formatted automatically. Linebreaks in the source document do not have any effect on the formatting. Similarly, multiple whitespaces result in only one space. Empty lines, on the other hand, results in a paragraph. \subsubsection{Special Characters} Most special characters can be included by preceding them with a backslash: \$ \& \% \# \end{document}

Text Types and Special Text A number of text style and font changes can be initiated in the document \bf - bold face \it - italics \em - emphasize \tiny \small \footnotesize \normalsize \large \Large \huge \Huge - change of font size Footnotes can be added directly \footnote{footnote text}

Environments Environments are used to include special types of content that has special formatting requirements \begin{...} ... \end{...} Parts of the document can be centered \begin{center} \end{center} Lists can be itemized, enumerated, descriptions, etc. \begin{enumerate} \begin{itemize} \item{...} \item{...} \end{enumerate} \end{itemize}

Example 2 \documentclass[12pt,twocolumn]{article} \usepackage{times} \begin{document} \section{Font Types and Centering} {\bf This is bold.} {\it This is italics.} {\small This is small.} {\Huge This is Huge.} \begin{center} This text is centered on the page. \end{center} \section{Enumerated and Itemized Lists} \begin{enumerate} \item{First item} \item{Second item} \end{enumerate} \begin{itemize} \item{Item 1} \item{Subitem 1} \item{Subitem 2} \end{itemize} \item{Item 2} \end{dobcument}

Figures and tables are environments that can either be directly included or floating. Figures and tables are environments that can be included either directly or as floating objects. Figures can be included in encapsulated Postscript format. Using the epsf package makes this easier \include{epsf} (this goes before \begin{document}) \epsfxsize=width of figure \epsffile{filename} Floating figures get placed by LaTeX according to given preferences and should have captions \begin{figure}[location preferences] ... \caption{figure caption} \end{figure}

It is a good idea to make figures and tables floating Tables are created using the tabular environment \begin{tabular}{table layout} \end{tabular} Floating tables get placed by LaTeX and should have captions \begin{table}[location preferences] ... \caption{caption text} \end{table} It is a good idea to make figures and tables floating

Example 3 \documentclass[12pt,twocolumn]{article} \usepackage{times} \input{epsf} \newcommand{\cepsffig}[1] {\begin{center}{\mbox{\epsffile{#1}}}\end{center}} \begin{document} \section{Figures} \begin{figure}[htb] \epsfxsize=2.5in \cepsffig{thing_globe.ps} \caption{This is the figure caption} \end{figure} \section{Tables} \begin{table}[htb] \begin{tabular}{||l|c||} \hline First row & second column\\ \hline Second row & second column \\ \hline \end{tabular} \caption{This is a table} \end{table} \end{document}

Mathematics and Equations LaTeX includes a vast variety of mathematical symbols and formatting capabilities. Equations can be included either in-lined, as separate equation lines, or as numbered equations In-lined equations are delineated by $ signs. ... $ your equation $ ... Separate equations are created as \[ your equation \] Numbered equations are created using \begin{equation} ... \end{equation}

Mathematics Many symbols are already defined. Also, AMS has a package with additional mathematical symbols. Greek symbols: \alpha \Alpha \beta \gamma ... Subsctipts and superscripts: symbol_{subscript} symbol^{superscript} Fractions: \frac{numerator}{denumerator} Sums and products: \sum \prod And much much more ... Symbols in equations are automatically scaled to the appropriate size

Example 4 \documentclass[12pt,twocolumn]{article} \usepackage{times} \begin{document} \section{Mathematics} Formulas can be in-lined as $ | \vec{\alpha_{i}} | = 0.5$ and appear in the middle of the text. Alternatively formulas can be put as a separate line \[ \gamma = \frac{2.56}{34^{4}} \] The third option for equations is a numbered equation such as \begin{equation} x = \left\{ \begin{array}{l} \sum_{x=25}^{357} x \\ 243 \end{array} \right. \end{equation} \end{document}

Cross References References to sections, captioned environments, and numbered equations can be generated automatically To make them referenceable, a label is assigned directly after the section or caption command or inside the equation environment using \label{labelname} A reference is included using \ref{labelname} LaTeX permits forward and backward references To make references appear, the latex command might have to be run twice (once to assign the correct reference text to the label and a second time to include it into the document)

Example 5 \documentclass[12pt,twocolumn]{article} \usepackage{times} \begin{document} \section{Labels} \label{se:sec} Labels can be assigned to every numbered environment such as sections, figures, tables, and equations. \begin{figure}[htb] \centering ... \caption{This is the figure caption} \label{fi:fig} \end{figure} \begin{table}[htb] \caption{This is a table} \label{ta:table} \end{table} \begin{equation} x = \sum_{y=25}^{357} y \label{eq:equ} \end{equation} These can be referred to as Section~\ref{se:sec}, Figure~\ref{fi:fig}, Table~\ref{ta:table}, or Equation~(\ref{eq:equ}). \end{document}

Bibliography and Citations A bibliography can be included manually or be generated automatically from a flat file database using the bibtex command. Manually included bibliographical data uses the bibliography environemnt \begin{thebibliography}{longest label} \bibitem{label} reference ... \end{thebibliography} Citations in the text are made similar to references to sections \cite{label}

BibTeX BibTeX extracts references from one or more data files, formats them according to the given bibliography style and includes them into the document. Different records are used for different publications @InProceedings {...} @Article {...} @Book {...} @MastersThesis {...} @PhdThesis{...} @TechReport{...} Data is entered in a set of fields publication type {label, Key={key}, Author={author list}, Title={title}, ... }

BibTeX The reference section and individual references are created according to the given bibliography style. \bibliographystyle{citation style} defines the style \bibliography{data files} includes the references BibTeX automatically includes all cited references and includes them in the reference section. Citations are included in the text using \cite{label} Additional references can be included in the reference section using \nocite{label} To create references, run latex, bibtex, then latex again

Example 6 BibTeX file: LaTeX file: BibTeX-created .bbl file: @BOOK{Lam94, Author = {Leslie Lamport}, Title = {LaTeX : A Document Preparation System}, Edition = {Second}, Publisher = {Addison-Wesley}, Year = {1994} } LaTeX file: \documentclass[12pt,twocolumn]{article} \usepackage{times} \begin{document} Citations are included as \cite{Lam94} \bibliographystyle{plain} \bibliography{refs} \end{document} BibTeX-created .bbl file: \begin{thebibliography}{1} \bibitem{Lam94} Leslie Lamport. \newblock {\em LaTeX : A Document Preparation System}. \newblock Addison-Wesley, second edition, 1994. \end{thebibliography}

Resources On-line reference for LaTeX2e: LaTeX reference books: http://www.sci.usq.edu.au/staff/robertsa/LaTeX/latex2e.html http://www.math.harvard.edu/texman/ LaTeX reference books: Leslie Lamport, LaTeX: A Document Preparation System, 2nd Edition, Addison-Wesley, 1994. Helmut Kopka & Patrick W. Daly, A Guide to LaTeX, Addison-Wesley