A brief introduction to L A TEX

Similar documents
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

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

Introduction to LaTeX. Paul Fodor Stony Brook University

VERY VERY SHORT GUIDE TO LATEX

Mikkel Madsen

An Introduction to LATEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

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

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.

An Introduction to L A TEX

An introduction to L A TEX for students

An Introduction to L A T E X

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

Math 235: Introduction to LaTeX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

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

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

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

Getting Started with L A TEX

Square cells: an array cooking lesson

Learning L A TEX. Patrick Lam

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

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

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

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

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

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

A Short L A TEX Introduction

A quick guide to L A TEX

CSCM10 Research Methodology A Taster of L A TEX

Introduction to LATEX

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

Become a L A TEX Guru

LaTeX. Information Literacy II EN(IL2) Course

Introduction to L A TEX

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

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

Basic L A TEX. what is LaTeX?

Document Preparation Word Processors

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

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

A L A TEX-Package for IEEE PES Transactions

How to get started in L A TEX

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

Document Preparation Using L A TEX

Introduction to LATEX

Dec. 27 th, 2010 University of Isfahan

Introduction to L A TEX

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.

Math 291: Lecture 5. Dr. Fagerstrom. Minnesota State University Moorhead web.mnstate.edu/fagerstrom

Latex Manually Set Font Size For Tables

Lecture 3-Introduction to Latex (II)

Introduction to Scientific Typesetting Lesson 1: Getting Started

Very Short Introduction to LaTeX

Getting started with Latex

L A TEX for psychological researchers

COMS 6100 Class note

Introduction to L A TEX beamer

Formatting with LaTeX

David Helmbold, October 2005, Revised October 2007

Introduzione a LaTex. Fabrizio Messina

Introduction to Latex. A workshop by Dr. Ala Eshmawi

An Introduction to L A T E X

The AES Convention Paper LATEX class Adam H. Lewenberg (October 18, 2008) 1

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

Introduction to L A TEX

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

Student Learning Service: Introduction to Latex

Electronic Production Guidelines

Introduction to Computer Science E15 Lab Week 37

Tools for Scientific Writing with LAT E X. Johan Carlson

Absolute L A TEX Beginner

Outline. A Sneak Peek

Lecture 2: Tables, Figures and Formulæ

Introduction to MCS 220 and L A TEX

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

Mikkel Madsen

Assessments for CS students:

TUTORIAL 10: ARRAYS AND MATRICES. 1. Welcome. Hello. My name is Dr. Christopher Raridan (Dr. R). I want to welcome you to the L A TEX Tutorial Series.

Typesetting with TEX

Getting Started with L A T E X for a Technical Document or Thesis

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

Creating Tables and Figures with L A T E X

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

Introduction to LAT E X

Introduction to L A TEX

Introduction to typesetting with L A TEX

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

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

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

Getting ready for L A TEX. Alexis Dimitriadis. Version: March 28, 2013

Introduction to LAT E X

Learn how to [learn] LATEX

The Honours Dissertation Class for L A TEX2e. Cara MacNish

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

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

Lecture 1: Short summary of LaTeX basics

Introduction to L A TEX

An introduction to LaTeX

Transcription:

A brief introduction to L A TEX Chris Bowers October 16, 2007

What is L A TEX? TEX developed late 70 s as typesetting language. L A TEX is a set of macro extensions to TEX It s a document preparation system. It was designed for large technical documents. Now used in a much wider context.

Advantages of L A TEX Seperates content from formatting. Good for technical documents. Can handle complex mathematical expressions. Very adaptive yet consistent. It s free on all platforms.

Disadvantages of L A TEX Not word processor like MS Word. Needs to be compiled. It s not WYSIWYG. Easy to use, but difficult to master.

Whitespace consecutive white spaces are treated as one, as are single line breaks. consecutive white spaces are treated as one, as are single line breaks.

Whitespace An empty line signifies a new paragraph. An empty line signifies a new paragraph.

L A TEX commands All L A TEX commands begin with a backslash, \. \textit{text} text \textbf{text} text Today is \today Today is October 15, 2007. Command arguments {} - parameters that are required. [] - parameters that are optional.

A simple example \documentclass[12pt]{article} \usepackage{times} \begin{document} \textbf{hello World!} \end{document} - defines document type - use times font package - start of document contents - the document contents - end of document contents Hello World!

Document Classes \documentclass[options]{class} Example: \documentclass[10pt, twocolumn]{article} The document is an article with a main font of 10pt and the text flowing in two columns.

Packages Packages are how the basic features of latex are enhanced. \usepackage[options]{package} Example: \usepackage[compact]{titlesec} The titlesec package provides new features for controlling the appearance of titles. The compact option reduces spacing around titles.

Reserved Characters L A TEX has several characters with special meanings. If they are required in the text then the following representations must be used: # \# $ \$ % \% & \& \_ \ $\backslash{}$

Getting yourself started L A TEX documents need to be compiled. In some cases several times to build auxillary files for indexes and references. Compilation can result in: Errors which are critical and may prevent the production of a legible typeset document. Warnings which are are not critical but may result in unexpected behaviour. Bad Boxes indicate items which don t fit as well as they could - not really serious.

Compiling L A TEX At the command line: latex document.tex Should result in something like: LaTeX-Result: 0 Error(s), 3 Warning(s), 2 Bad Box(es), 12 Pages(s) May need to repeat this process if using BibTeX or other indexes (more later).

Where to get L A TEX Windows MikTex(miktex.org) is probably the best and free under GNU license. Linux probably already installed or available as rpm or similar. Mac MacTeX (tug.org/mactex)

L A TEX development environments Several purpose built L A TEX IDE s now exists. Windows TeXnicCenter www.toolscenter.org LEd latexeditor.org Linux Kile kile.sourceforge.net Mac TeXShop uoregon.edu/ koch/texshop

The Various TEX macros tex compiles TEX into a.dvi format. latex compiles TEX with L A TEX2e extensions to.dvi format. pdftex as above but compiles straight to PDF. bibtex compiles Bibliography sources for use in L A TEX documents (more on this later).

Be prepared Have a look at some of the compiler and IDE options available. Try compiling your own simple L A TEX document. Find an IDE that suits you.

Building a structured document 1 The pre-amble should define the document type and what packages you wish to use. Generally anything that applies to the entire document. Common examples include: \title{title of document} \author{authors name} \date{some date}

Building a structured document 2 The main document contents are defined within the document environment: \begin{document}... \end{document}

Building a structured document 3 The document can be split into sections: \section{new section heading} or subsections: \subsection{new subsection heading}

Building a structured document 4 For example: \documentclass[12pt,a4paper]{article} \usepackage[compact]{titlesec} \title{yet Another Dull Story} \author{john Smith} \begin{document} \section{introduction} This is the introduction followed by a subsection. \subsection{first subsection} This is the first subsection \section{new Section} Here s a totally new section. \end{document}

L A TEX tables 1 Tables are created within the tabular environment. In the simplest case L A TEX automatically controls table spacing and widths. To use the tabular environment: \begin{tabular}[pos]{table_spec} where the table spec instructs L A TEX on how to structure the columns of the table and pos defines where to place the document.

L A TEX tables 2 \begin{tabular}{lcr} - would align the first column to the left, second would be centred whilst the third would be to the right. \begin{tabular}{ c c c } - would centre the contents of each column and place a verticle seperation line. \begin{tabular}{ c p{4.5cm} c } - same as above except middle column is justified at 4.5cm wide and surrounded by double verticle seperation lines.

L A TEX tables 3 Content is added in rows row1 & row2 & row3 \\ & \\ \hline - mark the column seperation - marks the end of a row. - used to draw horizontal lines across the table.

L A TEX tables 4 An example table: \begin{tabular}{ c c } \hline Constant & Value \\ \hline $\pi$ & 3.142 \\ c & 299792458 m/s \\ \hline \end{tabular} Constant Value π 3.142 c 299792458 m/s

Maths mode L A TEX has a special mode for writing mathematical text - $. Example: $ E = mc^2 $ E = mc 2 There are lots of mathematical symbols which can be represented in math mode: βψ There are also mathematical strcutures: $\frac{top}{bottom}$ $\sqrt{val}$ val top bottom

Including figures 1 A figure is most commonly in the form of an imbedded image. All L A TEX documents are ultimately used to generate either a postscript (.ps) file or pdf. For a postscript file all embedded images must be in the form of encapsulated postscript (.eps). Modern L A TEX graphics packages can handle on-the-fly conversion from a range of image formats.

Including figures 2 \includegraphics[width=5cm]{misty.jpg} You can include all kinds of files as long as there is a suitable conversion tool into postscript - dvips. You may need to include a suitable graphics package and converter- \usepackage[dvips]{graphicx} pdftex or other PDF orientated compilers tend to be easier but no.eps support.

Floating bodies 1 Allow L A TEX to position a section of content. Useful for figures, tables or equations in large documents. L A TEX is very good at adjusting layout to ensure consistant spacing and reduce gaps. The most common floating environments you will see are \begin{table}[pos] and \begin{figure}[pos]. pos gives some control over where L A TEX positions the float. h right here t top of a page b bottom of a page p at then end of this chapter/section/document! ignore L A TEXand just do as I say!

Floating bodies 2 Of course you may also need a caption for a figure or table. Example: \begin{figure}[htp] \includegraphics{file.eps} \caption{a simple figure} \end{figure}