LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

Similar documents
Lecture 1: Short summary of LaTeX basics

Abstract A quick intro by examples to the document preparation language L A TEX.

An Interactive Introduction to L A TEX. Part 2: Structured Documents & More. Dr John D. Lees-Miller. writel A TEX.

The basics of LaTeX. Cédric Buron. April 25, 2016

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Latex Tutorial. CIS400 Senior Design 9/5/2013

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58

Learning L A TEX. Patrick Lam

Tools for Scientific Writing with LAT E X. Johan Carlson

(Yet Another) Introduction to L A TEX 2ε (V3)

Introduction to LATEX

Become a L A TEX Guru

Introduction to L A TEX

Math 235: Introduction to LaTeX

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

GENERAL INFORMATION INSTRUCTIONS FOR MANUSCRIPT SUBMISSION

Latex Manually Set Font Size For Tables

Mikkel Madsen

NCSU Linguistics Eric Wilbanks & Jeff Mielke. November 21, An open-source typesetting language used for document mark-up

L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

Formatting with LaTeX

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations

Research Method and Report Writing Lecture 4: An Introduction to L A TEX

LATEX. Leslie Lamport. Digital Equipment Corporation. Illustrations by Duane Bibby. v ADDISON-WESLEY

Very Short Introduction to LaTeX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduzione a LaTex. Fabrizio Messina

A L A TEX-Package for IEEE PES Transactions

How to get started in L A TEX

L A TEX incollaboration

A Demonstration of the L A TEX 2ε Class File for the Oxford University Press Ltd Journal. First Author 1 and Second Author 2.

Introduction to LATEX

A brief introduction to L A TEX

Guidelines for ETNA manuscripts 1

LYX with Beamer and Sweave

An Introduction to. Andrew G. West, Jian Chang CIS400 Senior Design Tutorial September 15, 2009

Tools for Scientific Writing with LAT E X. Johan Carlson

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

Manuscript Title. with Forced Linebreak. Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

Learning LaTeX: The Basics

Helen Cameron. A Brief Overview of LATEX

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

CS 189 L A TEX and Linux: Document Layout and Organization

Style template and guidelines for SPIE Proceedings

Lecture 2: Tables, Figures and Formulæ

An Introduction to LATEX

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

Assessments for CS students:

A Latex Template for Independent Work Reports Version 2016v3

LATEX Workshop. Yi Liu Chen SUNY Geneseo PRISM Math Club. February 6, Wordmark Reversed Geneseo Wordmark Style Guide 4

LaTeX. Information Literacy II EN(IL2) Course

Using LaTex and BibTex to Write Academic Documents. Ligang He Department of Computer Science University of Warwick

L A TEX for Psychological Researchers

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

An Introduction to LATEX

L A TEX-cursus 5th e session: thesis in L A TEX

Introduction to L A TEX

Electronic Production Guidelines

THIS IS AN INTRODUCTION TO. LaTeX. Introduction to Latex. University of Minnesota, November 7, 2016

Paper guidelines for the 7 th International Congress on Transportation Research

Introduction to Latex. A workshop by Dr. Ala Eshmawi

Creating documents in L A TEX a basic tutorial

Introduction to L A TEX beamer

Introduction to L A T E X

COMS 6100 Class note

Excellent support for mathematical formatting. Automatically downloads/installs missing components as needed Updates somewhat frequently

TEX users habits versus publishers requirements

M. R. C. van Dongen. ucc. LaTEX and Friends. Including External Pictures. Marc van Dongen.

An introduction to L A TEX for students

L A TEX Class Holiday Inn Fisherman s Wharf San Francisco, CA July Cheryl Ponchin Sue DeMerritt

Researcher Development Unit: Introduction to Latex

My Full-Length Title

George Grätzer. Practical L A TEX

Learn how to [learn] LATEX

Key words: We would like to encourage you to list your keywords within the abstract section

An Introduction to L A T E X

A Document Preparation System. User's Guide and Reference Manual. Leslie Lamport

Introduction to LaTeX. Christoph Pickl

Outline. A Sneak Peek

An Introduction to L A TEX

Introduction to L A TEX

LAT E X week 2: Basics for Writing a Document

Written & Oral Presentation: Computer Tools

VERY VERY SHORT GUIDE TO LATEX

Guide to using L A TEX

Helen Cameron. A Brief Overview of LATEX

The Joys of L A T E X

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

LATEX Seminar Week 2 Jonathan Blair & Evan Ott. Document classes, basic math formatting, basic pictures, tables and matrices

Sample L A TEX Style Guide for European Journal of Pure and Applied Mathematics

Introduction to LAT E X

L A T E X Workshop. Bijulal D & Anu Thomas Industrial Engineering and Operations Research Indian Institute of Technology

عمادة البحث العلمي جامعة الملك سعود

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands.

Introduction to L A TEX

Transcription:

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3 1. Latex installation and text editors 1.1. Installation. Install Latex in your virtual machine with the following command. sudo apt get install texlive Note that if you are using a CAAM department s computer, this software is already installed. 1.2. Text editor and pdf generation. It is advised to use one of the following text editors when writing a Latex document: Kile. Texmaker. They both allow you to directly compile your document without using a terminal. You can download them with the command sudo apt-get install. It is possible to compile a latex document (.tex), which generates a pdf, with the following terminal command: If your document contains a bibliography, run the following commands: bibtex example It is important to run pdflatex at least two times after compiling the bibliography with bibtex (if not some references may not appear in your pdf). 2. Document Structure The structure of a Latex document can be divided into four sections: class of the document (article, book, letter). packages used that gives access to various features or customized command. If needed information on the document title, author, date, abstract. Body of the document (introduction, sections, equations, figures, tables and bibliography). The following sections describes how to set up a Latex document s class, packages and body. Remark: Two examples are provided in CAAM519 webpage. All required files to compile the examples are contained in.tar.gz files. To uncompress (untar) these files, use the command: 1

2 tar xvf CAAM519 LATEX EXAMPLE 1.tar.gz tar xvf CAAM519 LATEX EXAMPLE 2.tar.gz It will create two directories called CAAM519 LATEX EXAMPLE 1 and CAAM519 LATEX EXAMPLE 2. 3. Document class To start writing a document with Latex, the first step is to decide what kind of document you are writing (book, article, oral presentation). This is done by using the following command: \ documentclass { class } where class has to be substituted with the kind of class you want to use. The following subsections gives details on which class you can use and their characteristics. Note that this command should always be the first line of a Latex document. 3.1. Scientific paper. There is four main class of writing documents offered by Latex: book. article. amsart (class of article). letter. In addition to the type of class, extra arguments can be given to documentclass command as follows: \ documentclass [11 pt ]{ article } where we set the font size of the article to 11. When writing a book or an article, the body of the document is divided into: chapter (only for book class). section. subsection. subsubsection. paragraph. For example to start a new section type the following command: \ section { name of my section } 3.2. Oral presentation. Latex also allows to write oral presentation. Such documents use the class beamer and can be generated as follows. \ documentclass [10 pt ]{ beamer } The body of the document is divided into frames (slides). \ begin { frame } content \ end { frame }

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3 3 4. Loading packages Latex allow us to load package at the begining of a document. These package give access to various commands that allow to: change the pdf output format (document s margin, etc.). use mathematical formulae (integral, fraction, equation, etc.). include figures with caption. manage the bibliography. Here is a list of packages I recommend to use in any scientific article. \ usepackage { amsthm, amsmath, amssymb } % math packages ( always include ) \ usepackage { geometry } % can be used to modify page dimensions, etc. \ usepackage { graphicx } % figure \ usepackage { float } % figure position in pdf \ usepackage { multirow } % table with multirow \ usepackage [ labelfont = rm ]{ subcaption } % subcaption of figure \ usepackage [ numbers ]{ natbib } % management of bibliography \ usepackage { listings } % use to display a block of code Note that text following the symbols % are comments. We refer to the course and the example of CAAM 519 webpage for more details on Latex s packages. 5. Document body and command The body of the document is written between the following command: \ begin { document } document body ( sections, figures, equations, etc.). \ end { document } The following subsections provide information on how to insert text/mathematics formulae, figures, table and references. 5.1. Text and math modes. There is three ways of inserting content or instruction in a Latex document: use a Latex command. They all start with a backshlash: \. For example, we previously describe how to set up the class of the document or load packages. write plain text. This can only be done in the body of the document. Note that you can write comment anywhere in your file. To do so, use the symbol % then write your comments (on the same line after the symbol %). write mathematical formula. It can be done in three ways: Write a formula between two symbols $ to insert the mathematical content in a sentence. It gives: x 2 1 = x 2. Use one of the following commands to center formula: $$ x _1^2= x_2.$$ \[ x _1^2= x_2.\] It gives: x 2 1 = x 2. It is also possible to use Latex command to write equation or other mathematics content.

4 5.2. Figures. Here is a generic command used to insert figure in a Latex dociment. \ begin { figure }[ ht] \ includegraphics [ width =0.5\ textwidth ]{ rice _ caam. jpg } \ caption { Logo of CAAM dpt, Rice University.} \ end { figure } It displays the following figure. Figure 1. Logo of CAAM dpt, Rice University. It is possible to set different position of the figure by modifying the option [ht] (ht means here or top of next page). The figure size is set with width=0.5\textwidth (here I set half the vertical-size of the page). 5.3. Tables. Here is a generic command used to insert table in a Latex dociment. \ begin { table }[ ht] \ begin { tabular }{ c c r } \ hline First row & $\ cos ( e^x)$ & $x _1+ x _2$ \\ \ hline Second Row & a & b \\ \ hline \ end { tabular } \ caption { My first table } \ end { table } It displays the following table. First row cos(e x ) x 1 + x 2 Second Row a b Table 1. My first table The command hline draws a horizontal line while option can be given to the tabular command to create vertical line and align the text of each column (either left, center or right with l, c or r). 5.4. Labels and references. Latex allows to associate labels to figures, tables, equations and sections of your document. It is done by using the command label as follows: \ section { Name section 1} \ label { label _ name } or

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3 5 \ begin { table } ( your tabular ) \ label { label _ name } \ end { table } You can refer to your label with the command ref. \ ref { label _ name } Remark: The text editors Kyle and Texmaker offer an auto completion feature when using the command ref. To gain time, I advise to use label names of the form sec:name for sections, fig:name for figures, eq:name for equations and tab:name for tables. 5.5. Display block of code. It is done with the package listings. First we define a style of code block. We need to choose the language, backgroundcolor, color of the keywords or commented words as follows: \ lstdefinestyle { TexStyle }{ language ={[ LaTeX ] TeX }, frame = single, backgroundcolor =\ color { white }, basicstyle =\ small \ ttfamily, morekeywords ={ maketitle, includegraphics }, keywordstyle =\ color { blue }, commentstyle =\ color { gray }, stringstyle =\ color { black } } The above definition has to be located before the beginning of document s body. After defining the above style, we can display a block of code with the following command: \ begin { lstlisting }[ style = TexStyle ] block of code to display. \ end { lstlisting } 5.6. Short list of Latex commands. Here is a short list of Latex commands. \\ to inser a line break. theorem. Write theorem. equation. Write an equation. multline. Write long equation (more than one line). align. Align multiple equation. minipage. Split the page in minipages (columns). We refer to the course and the example of CAAM 519 webpage for a description of these commands. 6. Bibliography The bibliography of your document should be saved in a file with the extension.bib, for example biblio.bib. You can add reference in this file using the website scholar.google.com as follows: Go to scholar.google.com Search for the article you want to cite (enter the article s name or author).

6 Once you see the article, click on cite then bibtex. Then just copy the bibtex quote in your file biblio.bib. Here is an example. @book { stroustrup 2013 c++, title ={ The C ++ programming language }, author ={ Stroustrup, Bjarne }, year ={2013}, publisher ={ Pearson Education } Then you can cite this book/article in your document using the command cite: \ cite { stroustrup 2013 c ++} The last step consists of telling Latex which bibliography style should be used and which bibliography file(s) should be read. It is done at the end of the body document with the following commands. \ bibliographystyle { abbrvnat } \ bibliography { biblio }