Latex Tutorial. CIS400 Senior Design 9/5/2013

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

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

Formatting with LaTeX

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

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

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Basic L A TEX. what is LaTeX?

LaTeX. Information Literacy II EN(IL2) Course

Introduction. LaTeX (pronounced lay-tech ) is a professional document preparation system.

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduction to Latex. A workshop by Dr. Ala Eshmawi

Lecture 1: Short summary of LaTeX basics

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.

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

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

An Introduction to L A T E X

L A TEX for psychological researchers

Written & Oral Presentation: Computer Tools

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

Introduction to L A TEX

An Introduction to L A TEX

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

How to get started in L A TEX

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

An Introduction to LATEX

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

Introduction to LATEX

Typesetting in wxmaxima

Very Short Introduction to LaTeX

WYSIWYG Systems. CSCM10 Research Methodology Lecture 4 (11/2/16): A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems

Introduction to typesetting with L A TEX

Introduction to Scientific Typesetting Lesson 1: Getting Started

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

Typesetting with TEX

Latex Manually Set Font Size For Tables

A Brief Introduction to L A TEX

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

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

Learn LaTeX in 30 Minutes. A. LOTFI School of Science and Technology Nottingham Trent University

Introduction to L A T E X

CSCM10 Research Methodology A Taster of L A TEX

Guide to using L A TEX

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

Mikkel Madsen

Absolute L A TEX Beginner

How to Prepare Your Paper in L A T E X for IOE Graduate Conference 2017

Helen Cameron. A Brief Overview of LATEX

An Introduction to LATEX

The KBibTeX Handbook. Yuri Chornoivan

A Short L A TEX Introduction

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

A brief introduction to L A TEX

1 Obtaining LyX and L A TEX

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

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

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

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

Student Learning Service: Introduction to Latex

LYX with Beamer and Sweave

Document Preparation Word Processors

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

Introduction to L A TEX

Introduction to LaTeX. M&S Talk Series August 16 th, 2016 AH Sheikh

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Outline. A Sneak Peek

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

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

Electronic Production Guidelines

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

Assessments for CS students:

David Helmbold, October 2005, Revised October 2007

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

Learning L A TEX. Patrick Lam

Introduzione a LaTex. Fabrizio Messina

L A TEX: Eh? What is it, what isn t it, who cares? Andy Caird. LATEX: Eh? p.1/13

VERY VERY SHORT GUIDE TO LATEX

Introduction to LATEX

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

Aalborg October 2014

Researcher Development Unit: Introduction to Latex

L A TEX for Psychological Researchers

An introduction. C.D. Emmery & M.M. van Zaanen. October 22, Tilburg University

An introduction to LaTeX

Introduction to L A TEX

LaTeX and Turing Machines. CS254 Chris Pollett Aug. 30, 2006.

Square cells: an array cooking lesson

Effective Programming Practices for Economists

COMS 6100 Class note

An Introduction to LATEX

Introduction to L A TEX for MCS-236

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

Math 235: Introduction to LaTeX

An introduction to L A TEX for students

Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

L A TEX for Psychological Researchers

The L Y X Tutorial. by the L Y X Team 1. December 2, them to the LYX Documentation mailing list:

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

CSCE 222 Discrete Structures for Computing. LaTeX. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Transcription:

1 Latex Tutorial CIS400 Senior Design 9/5/2013

2 Outline Introducing TeX/LaTeX Benefits and potential difficulties Installation and use on Unix/Mac/Windows Compiling PDF documents from LaTeX Basic document formatting Typesetting mathematics and special characters Environments: tables, graphics, and references Setting document-wide parameters BibTeX citation system

What is LaTeX? Commonly pronounced: /ˈleɪtɛk/ TeX: A markup language for typesetting (by Donald Knuth in 1978) LaTeX: Makes TeX somewhat user-friendly (by Leslie Lamport in 1985) This example from http://en.wikipedia.org/wiki/latex 3

4 LaTeX Advantages LaTeX is a standard Typeset mathematics with ease Separates formatting from authoring Which makes you focus on writing content rather than concerning format Global changes can be made from one location Style files: Instant conformity to journal standards Dynamic referencing and labeling

5 LaTeX Disadvantages It is not a WYSIWYG editor You can't see the 'result' as you are typing You see the result after you compile it May be syntax errors in your 'code' Has a bit of a learning curve Lack of GUI will frustrate some

6 What you need Installing LaTeX system TeX Live for Windows/Linux: http://www.tug.org/texlive/ MacTex for Mac: http://www.tug.org/mactex/ Text editor TeXworks, TeXShop, emacs, vim, eclipse, Comparison of TeX editors: http://en.wikipedia.org/wiki/comparison_of_tex_editors

7 Development Cycle Compile(syntax) error Compile LaTex Compiler (pdflatex) Compilation success example.tex example.pdf Format error, or continue authoring

8 Required Tag COMMENTS: Lines beginning with a '%' are not compiled DOCUMENT_CLASS: Specify a broad formatting style PREAMBLE: Global formatting elements are set here BEGIN_DOCUMENT: Delimit start of document body The body of the document END_DOCUMENT: Delimit end of document body

Basic Text Formatting 9

10 Basic Text Formatting Commands begin with '\' (back-slash) Here we highlight 'single character' and macro commands. They print some specific characters/word

11 Basic Text Formatting Using quotations is a little non-traditional Opening quotes are denoted by 2 left quotes (by '1' on the keyboard), and ended with 2 right quotes (next to 'enter') Note to editors: A frequent error

12 Basic Text Formatting Bracketed commands add some effect to the text contained within the brackets according to the pattern: \style{text to be affected}

13 Basic Text Formatting In contrast, these text commands apply until another command of the same type 'overwrites' the previous How do you know what command is what type? Experience and documentation

14 Basic Text Formatting Here we see our first 'environment'. Environments are delimited by \begin{environ} and \end{environ} They are used for structures that span 1+ lines of text. Here we see the itemize environment

Basic Mathematics 15

16 Basic Mathematics Typesetting math is similar to normal text One major difference is in-line math expressions are always enclosed by '$' signs Here we see some simple symbols used

17 Basic Mathematics Bracketed commands are also similar: $\frac{numerator}{denominator}$ Square brackets preceding regular brackets are a chance to provide OPTIONAL params $\sqrt[ ]{x}$ == $\sqrt{x}$

18 Basic Mathematics Superscripts and subscripts are a piece-ofcake. Brackets here are optional: $x^n$ == $x^{n}$ BUT $x^12$!= $x^{12}$ Editor's: Variables in italics!

19 Basic Mathematics Here we see the equation environment, which sets-off, centers, and numbers a mathematical expression. Note the power of nested commands, which can be extended infinitely.

Tables 20

21 Tables The tabular environment is used for tables Here we specify the alignment for each column (and therefore the # of columns), and whether vertical separators should be present l = left-justified column c = center-justified column r = right-justified column = vertical separator between columns

22 Tables \hline = Draws a horizontal separator & = Separates cells in a row \\ = Starts a new row Simple, right? Yep! But things can get a little intimidating to 'read'. Imagine a table of mathematical expressions

23 Pictures Include the GraphicX package: i.e. put \usepackage{graphicx} in preamble Then: \includegraphics{graph.jpg} Support: JPG, PNG, PDF, EPS Vector vs. bitmap graphics Scalability

Float and Reference 24

25 Float and Reference Large structures (i.e. those in environments) like tables and figures/graphics are usually wrapped in a large 'floating' environment. Here we see table, figure is the other popular choice Those items inside are 'floated' meaning they have no fixed position. Some control can be had via parameters like t {h,!,b,a}

26 Float and Reference We've seen this before, this is just a simple table!

27 Float and Reference We add two new commands inside our float: \caption{}: Which allows us to describe whatever we are floating \label{ }: Which is a descriptor no one will see, but is used for internal references

28 Float and Reference And all these gives us the ability to 'reference' these floats within the text body. Dynamic numbering! Applies to tables, equations, figures, graphics, sections, etc. Create a TOC in one command!

29 Document Preamble COMMENTS: Lines beginning with a '%' are not compiled DOCUMENT_CLASS: Specify a broad formatting style PREAMBLE: Global formatting elements are set here BEGIN_DOCUMENT: Delimit start of document body The body of the document END_DOCUMENT: Delimit end of document body

Document Preamble The \documentclass[]{} command provides 99% of the necessary setup Our doc-style is article. Book, report, or a style file are other common options Major parameters are given in square brackets. Here we will use a 10pt font, print to letter sized paper, and use a two-column layout 30

Document Preamble Also in the preamble; import necessary packages (extensions) for use Note: These packages are included in the LaTeX download. But, they aren't part of the default command set because they may overwrite some default commands and because full inclusion would slow down compilation 31

Document Preamble STOP! The people who wrote LaTeX and the article style are way better than you are at it. Change only what is absolutely necessary! LaTeX ethos: Worry about writing content, not format or layout Here we choose to use block style paragraphs, and double-line space text 32

33 BibTeX A bibliography and citation creation tool for LaTeX Advantages of BibTeX Bibliography files (libraries) are completely re-usable Write bibliographies in a universal format, but output them in a specific one (APA, MLA, Chicago, etc.) Ditto for (parenthetical) citations Disadvantages of BibTeX The slightest of learning curves But... No worse than learning punctuation of APA/MLA

34 BibTeX files BibTex files: * Should have a *.bib extension and same name as LaTeX file * Act as a library. Have a single massive BIB file for a project. If a paper doesn't cite a resource it won't appear.

35 BibTeX files First provide a general descriptor of what will be cited: Article, book, conference, inproceedings, misc, techreport, unpublished...

36 BibTeX files Then, similar to the idea of a label we saw with floats, give the resource an (invisible) name by which you can identify it.

37 BibTeX files Next, provide everything you know about the source in the most complete form possible. e.x. 'February' instead of 'Feb' -------------------------------------- A note on authors: List them all, using full names, and only place the word 'and' between them. ------------------------------------ REMEMBER: This is a universal format

38 BibTeX in Actions bibtex example8.bib pdflatex example8.tex pdflatex example8.tex

39 BibTeX in Actions bibtex example8.bib pdflatex example8.tex pdflatex example8.tex We use the \cite{} command just like \ref{} previously, using the label/keyword to identify the cited source

40 BibTeX Style Top Left: Abbrv Top Right: Alpha Bottom Left: APA-like

41 Other Applications The resultant PDF format isn't too flexible... Utilities exist to convert documents to HTML For example, Wikipedia has this functionality built in Equations -> images. Great for inclusion in presentations Also some crude plain text tools And to make up for what LaTeX is 'missing'... Spell check? Grammar check? Some text-editors have the capability to do former Copy-paste final document to word processor Editor's note: Look for these things! WYSIWG? Slow. Very bad form.

References The LaTeX Wikibook. (User friendly) http://en.wikibooks.org/wiki/latex Comprehensive LaTeX Symbol Guide. (4947 of 'em) http://www.ctan.org/tex-archive/info/symbols/comprehensive/ A Less Comprehensive List. (and perhaps more useful) http://omega.albany.edu:8008/symbols.html Official LaTeX Site. (Often a bit on the technical side) http://www.latex-project.org/ The Not So Short Introduction to LaTeX http://tobi.oetiker.ch/lshort/lshort.pdf 42