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

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

Latex Tutorial. CIS400 Senior Design 9/5/2013

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

Introduction to L A TEX

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

Formatting with LaTeX

How to get started in L A TEX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

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.

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

Introduction to LaTeX. Paul Fodor Stony Brook University

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.

Lecture 1: Short summary of LaTeX basics

Typesetting with TEX

Basic L A TEX. what is LaTeX?

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

L A TEX for psychological researchers

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

Introduction to Scientific Typesetting Lesson 1: Getting Started

An Introduction to LATEX

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

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

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

LaTeX. Information Literacy II EN(IL2) Course

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

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

Mikkel Madsen

Introduction to LATEX

Electronic Production Guidelines

Guide to using L A TEX

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

LYX with Beamer and Sweave

Latex Manually Set Font Size For Tables

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

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

Why learning L A TEX is worth the effort

Absolute L A TEX Beginner

CSCM10 Research Methodology A Taster of L A TEX

Written & Oral Presentation: Computer Tools

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

Introduction to L A TEX

VERY VERY SHORT GUIDE TO LATEX

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

L A TEX for Psychological Researchers

An introduction to TeX. And other options for producing documents containing mathematics

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

Very Short Introduction to LaTeX

The KBibTeX Handbook. Yuri Chornoivan

Learning L A TEX. Patrick Lam

Introduzione a LaTex. Fabrizio Messina

Meeting One. Aaron Ecay. February 2, 2011

A brief introduction to L A TEX

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

An Introduction to LATEX

Typesetting in wxmaxima

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

Creating Your Paper or Thesis With LYX

OpenOffice.org Writer

T E X and L A T E X Document preparation tools

COMPUTER APPLICATIONS TECHNOLOGY

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

LATEX, BibTEX, and Friends. Robert Buels. Outline. What is LATEX. Using BibTEX LYX the graphical LATEX Managing your BibTEX references Further reading

COMS 6100 Class note

Mathematical Notations in Web Pages

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

Aalborg October 2014

1 Obtaining LyX and L A TEX

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

Citation guide. Carleton College L A TEX workshop. You don t have to keep track of what sources you cite in your document.

Introduction to L A T E X

An Introduction to L A T E X

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

A Short L A TEX Introduction

Introduction to MCS 220 and L A TEX

Introduction to LATEX

Square cells: an array cooking lesson

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

Version List of tables Tbl. 5.1 Additional fonts... 5 Tbl Types of index entries... 10

Outline. A Sneak Peek

Student Learning Service: Introduction to Latex

L A TEX for Psychological Researchers

Document Preparation Word Processors

GNU Emacs as a Front End to L A TEX

Line Spacing and Double Spacing...24 Finding and Replacing Text...24 Inserting or Linking Graphics...25 Wrapping Text Around Graphics...

Assessments for CS students:

Word-to-L A TEX specification

Getting Started in L A TEX

Introduction to Microsoft 2007 Office Table of Contents

An Introduction to LATEX

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

WinTeX Documentation

David Helmbold, October 2005, Revised October 2007

Hypertext Markup Language, or HTML, is a markup

LaTeX is essentially a markup language

Rich Text Editor Quick Reference

Transcription:

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

Today's 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 2

What is LaTeX? TeX: A markup language for typesetting Hasn't changed since 1982 (Donald Knuth) LaTeX: Makes TeX somewhat user-friendly Pronunciation: 'lay-tech', or 'lah-tech' But never, ever, 'latex' (like the rubber gloves) A standard in computer science write-ups Is the opposite of WYSIWYG editors like MS-Word Documents must be compiled in order to see the results 3

LaTeX Advantages Typeset mathematics with ease Try typesetting in MS Word Separates formatting from authoring Global changes can be made from one location Style files: Instant conformity to journal standards Consistency: LaTeX is a standard! Dynamic referencing and labeling 4

LaTeX Disadvantages It is not a WYSIWYG editor You can't see the 'result' as you are typing May be syntax errors in your 'code' Installation can be tricky (is it still?) Has a bit of a learning curve Lack of GUI will frustrate some No convenient help button (or paperclip) if you get stuck 5

What You Need The TeX/LaTeX back end files (engine) Mac/Linux: TeX-Live (http://www.rna.nl/tex.html) Windows: MiKTeX (http://www.miktex.org/) Always completely free and open-source A simple text editor i.e. Notepad, Emacs, JEdit, etc. A terminal in which to run programs Windows calls this 'command prompt' Or the terminal/shell included with your Unix distro 6

Development Cycle example.tex latex example.tex example.pdf COMPILE ERRORS? FIX FORMAT ERRORS? or CONTINUE AUTHORING example.dvi EXAMINE SAMPLE OUTPUT dvi2pdf example.dvi CREATE FINAL COPY 7

Required Tags 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 8

Required Tags 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 9

Basic Text Formatting Example 3 10

Basic Text Formatting Commands begin with '\' (forward-slash) Here we highlight 'single character' and macro commands. They print some specific characters/word Example 3 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 Example 3 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} Example 3 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 Example 3 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 Example 3 15

Basic Text Formatting There are thousands upon thousands of special characters like those in example. For example: Four different lengths of hyphen No one just 'knows' LaTeX even experienced users keep a reference handy for look up Anything your standard word processor can do, LaTeX can do, and whole lot more... 16

Basic Mathematics Example 4 17

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 Example 4 18

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}$ Example 4 19

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! Example 4 20

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. Example 4 21

Tables Example 5 22

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 Example 5 23

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 Example 5 24

Importing Graphics Including graphics is EASY, getting the graphics in the right format is HARD. Include the GraphicX package: i.e. put \usepackage{graphicx} in preamble Then: \includegraphics{graph.eps} But what the heck is an EPS file? Vector vs. bitmap graphics Scalability Difficulty in interpreting 25

Creating Vector Graphics Graphic tools: Adobe, GIMP, Paint Shop Pro Three ways to create vector-graphics 1. Convert bitmap -> vector based, just save as Not a true conversion, scalability destroyed HUGE file sizes, and possibly a messy end result But necessary for something like JPG pictures 2. Draw by hand using one of above tools Best option for simple graphics 3. Graphs -> EPS files = A lot of programs Create graph in OO-Calc (Excel), copy into OO-Draw (Paint), export as PDF. Open in GIMP, crop image, and save as EPS file. Whew! Tools like GnuPlot/MATLAB can export directly to EPS. 26

Floats & References Example 6 27

Floats & References 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} Example 6 28

Floats & References We've seen this before, this is just a simple table! Example 6 29

Floats & References 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 Example 6 30

Floats & References 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! Example 6 31

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 32

Document Preamble Example 7 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 33

Document Preamble Example 7 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 34

Document Preamble Example 7 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 35

Introducing BibTex What is it? 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 36

BibTex files example8.bib 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. 37

BibTex files example8.bib First provide a general descriptor of what will be cited: Article, book, conference, inproceedings, misc, techreport, unpublished... 38

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

BibTex files example8.bib 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 40

BibTex In Action example8.bib example8.tex bibtex example8.bib latex example8.tex latex example8.tex dvipdf example8.dvi 41

BibTex In Action example8.bib example8.tex bibtex example8.bib latex example8.tex latex example8.tex dvipdf example8.dvi We use the \cite{} command just like \ref{} previously, using the label/keyword to identify the cited source 42

BibTex In Action example8.bib example8.tex bibtex example8.bib latex example8.tex latex example8.tex dvipdf example8.dvi This line determines the bibliography style. More on this coming in just a moment 43

BibTex In Action example8.bib example8.tex bibtex example8.bib latex example8.tex latex example8.tex dvipdf example8.dvi And this one actually prints the bibliography or 'references' Note that 'example8' means example8.bib is the BibTex file that should be used 44

Bib Styles example8.tex Top Left: Abbrv Top Right: Alpha Bottom Left: APA like 45

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. 46

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/ 47