Introduction to L A TEX

Similar documents
L A TEX for Psychological Researchers

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

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

A Very Brief Introduction to L A T E X MAT 3535

Learning LaTeX: The Basics

An Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

Dec. 27 th, 2010 University of Isfahan

David Helmbold, October 2005, Revised October 2007

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

An Interactive Introduction to L A TEX

Introduction to LATEX

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

1 Obtaining LyX and L A TEX

Assessments for CS students:

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX

Getting started with Latex

Math 235: Introduction to LaTeX

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

Introduction to LaTeX. Paul Fodor Stony Brook University

An introduction to L A TEX for students

VERY VERY SHORT GUIDE TO LATEX

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

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

Helen Cameron. A Brief Overview of LATEX

COMS 6100 Class note

LaTeX A Tutorial. Mohsen Alimomeni, 2010

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

An introduction to LaTeX

Effective Programming Practices for Economists

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

An Introduction to LATEX

Introduction to LATEX

Introduzione a LaTex. Fabrizio Messina

Become a L A TEX Guru

Introduction to L A T E X

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

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

Introduction to Scientific Typesetting Lesson 1: Getting Started

L A TEX for Psychological Researchers

A Short Introduction to L A TEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

Introduction to MCS 220 and L A TEX

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

Guide to using L A TEX

Student Learning Service: Introduction to Latex

Typesetting in wxmaxima

Introduction to L A TEX

A Brief Introduction to L A TEX

Formatting with LaTeX

Outline. A Sneak Peek

An Introduction to L A TEX

MATLAB for the Sciences

Lecture 3-Introduction to Latex (II)

An introduction to LaTeX

Introduction to Math in LaTeX

A Grasshopper s Approach to L A TEX

Typing Mathematics. Darrin Doud

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

An 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

Introduction to L A TEX

Introduction to LAT E X

Using L A TEX Tom Edgar

Introduction to L A TEX

LaTeX. Information Literacy II EN(IL2) Course

Basics. Options. Commands

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

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

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

Learning L A TEX. Patrick Lam

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

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

CSCM10 Research Methodology A Taster of L A TEX

Introduction to L A TEX

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

Introduction to L A TEX

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

A Short L A TEX Introduction

LaTeX: Scientific Document Writing

Introduction to Latex. A workshop by Dr. Ala Eshmawi

A brief introduction to L A TEX

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

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

Introduction to L A TEX

A Guide to L A TEX. Contents. Drs. A.L. Stevens. 7 November Downloading L A TEX Mac Windows Linux...

Document Preparation Using L A TEX

Introduction to L A TEX beamer

Typesetting with TEX

Basic L A TEX. what is LaTeX?

Introduction to LAT E X

L A TEX: Online module 2

LAT E X week 2: Basics for Writing a Document


Introduction to L A T E X

LAT E X Math Mode. RSI 2007 Staff

LaTeX Workshop. While you re waiting, please make an account at

L A T E X Tutorial. Wanmin Liu August. Department of Mathematics The Hong Kong University of Science and Technology

An Introduction to LATEX

Transcription:

Introduction to L A TEX Mark Baltovic MA498 - Dissertation in Mathematics

Objectives of this session What is L A TEX? The L A TEX source file Inside the body of the text Typesetting mathematics Internal references

Objectives of this session By the end of this session you will hopefully Understand what L A TEX is. Understand the process of document creation using L A TEX. Be able to locate and open LaTeX editor on the lab PCs. Create a new document from scratch or template. Compile and view output documents. Understand basic structure of a L A TEX source file. Use sectioning commands to structure a document. Know how to use some standard environments. Be able to typeset general mathematical formula.

If time permits... If time permits, we may also see the following: Referencing document elements: label, ref and pageref. How to create a basic bibliography. Understanding LaTeX compiler errors. Where to go for help.

TEX and L A TEX TEX is software created by Donald Knuth for the typesetting of mathematics. L A TEX is a later variant of this, created by Leslie Lamport, and is the subject of these two seminars. Both of them provide: document markup language, and document preparation system.

What is a markup language? A markup language is a system for annotating text. These annotations are instructions detailing the logical structure of the document, and the presentational aspects of the document. The content of a document is therefore mixed with instructions to format the document. L A TEX source files need to be compiled to see the final form. As such, it is not a WYSIWYG approach to document formatting.

Special characters L A TEX is a compiled programming language, and therefore has special characters reserved for the compiler s use. # $ % & { } ˆ \ Symbol Reserved function \ Indicates a L A TEX command { } Contains arguments (parameters) for commands % Indicates a comment $ Starts/ends a maths environment ˆ Superscript and subscript operators Table: A table of special characters and their function.

Whitespace The following are all treated as a single blank space by L A TEX: 1. a single blank space 2. several consecutive blank spaces 3. tabs 4. single line breaks One or more empty lines between two lines of text defines a change of paragraph.

A basic L A TEXdocument % hello.tex - A very basic source file \documentclass{book} \begin{document} Hello, world! \end{document}

Document preparation with L A TEX A L A TEX source file can be compiled to produce output files of various formats. L A TEX latex pdflatex dvipdfm DVI PDF pdf2ps ps2pdf dvi2ps PostScript The format you choose, and the process you follow to produce this, will depend on variety of reasons.

Working with L A TEX L A TEX source files can be created using any basic text editor. The network PCs provide two solutions: TEXnicCenter WinShell

Starting with TEXnicCenter 1. Star the application from its shortcut folder: Start Programs Editors TeXnicCenter 2. Create a new file File New... 3. Enter the following basic latex file and save it (as hello.tex). % hello.tex - A very basic source file \documentclass{book} \begin{document} Hello, world! I m using \LaTeX. \end{document} 4. Compile (or Build) using the menu option or the Ctrl + F7. 5. View the document you have created (F5).

A more useful example Go to the Moodle course page to download a basic template file to work with. 1. Save it to a folder in your home directory. 2. Open it up in TeXnicCenter via File Open.

The structure of a L A TEX source file The first (non-commented) line must declare the document type. \documentclass{...} Next are customisation lines. Lines with \usepackage{...} call upon optional packages that bring additional features to L A TEX. Further lines may define your own specialisations. This section is known as the pre-amble. The body of the text starts with \begin{document} The document is then ended with \end{document} Anything after this is ignored.

Document classes The documentclass command declares the type of document. Each type of document has associated to it some basic formatting features and default values. Of the standard ones that come with L A TEX, the ones of most relevant to you will be: book for real books (i.e. multiple chapter affairs) article for articles in scientific journals, presentations, abstract reports, program documentation,... report for longer reports, small books, thesis,... letter for writing letters beamer for writing presentations For your dissertation you should use the book document class.

Sectioning commands L A TEX provides various section commands to break up a document. Command \part{part} \chapter{chapter} \section{section} \subsection{subsection} \subsubsection{subsubsection} None of these are available in the letter class, and only the book and report class support chapters.

Additional document content elements L A TEX provides a variety of environments to help you typeset your document. Some standard environments that L A TEX provides includes: list table figure equation quote verbatim (e.g. to quote program code) Environments are declared using \begin{environment_name}... \end{environment_name}

List environments L A TEX provides 3 very simple list environments. The itemize environment \begin{itemize} \item Item 1 \item Item 2 \end{itemize} which produces Item 1 Item 2

List environments L A TEX provides 3 very simple list environments. The enumerate environment \begin{enumerate} \item Item 1 \item Item 2 \end{enumerate} which produces 1. Item 1 2. Item 2

List environments L A TEX provides 3 very simple list environments. The description environment \begin{description} \item[name 1] Item 1 \item[name 2] Item 2 \end{description} which produces Name 1 Item 1 Name 2 Item 2

Text formatting commands \underline{this underlines text.} This underlines text. \textbf{this bolds text.} This bolds text. \textit{this italicises text.} This italicises text. \texttt{this sets text in typewrite mode.} This sets text in typewrite mode.

Mathematical symbols Arithmetical operators Symbol Code + + - \times / / x y x n x n x n x \frac{x}{y} x^n x n \sqrt{x} \sqrt[n]{x}

Mathematical functions L A TEX operators are functions written as a word. Basic ones include: Operator sin, cos, tan arcsin, arccos, arctan ln, exp lim Code \sin{}, \cos{}, \tan{} \arcsin{}, \arccos{}, \arctan{} \ln{}, \exp{} \lim{} \int{} \int{} \prod{} \bigcup \bigcap

Mathematical symbols There are also basic logical symbols Logical symbol Code \forall \exists \neg \wedge \vee

Brackets, braces and delimiters Finally, L A TEX offers a whole host of brackets, braces and delimiters. () [] \{\} \ \ \langle \rangle \lfloor \rfloor \lceil \rceil The latter three produce: Their sizes can be adjusted using the following automatic modifiers \left( \right) \bigl( \bigr) \Bigl( \Bigr) \biggl( \biggr) \Biggl( \Biggr) () () () () ()

Displaying mathematics inside text Any objects in bodies of text you wish to be formatted as mathematics, that is text mode maths, should be enclosed between single $ symbols. Find all $x$ which satisfy the quadratic equation $x^2 + 3x -1 = 7$. Find all x which satisfy the quadratic equation x 2 + 3x 1 = 7. We then compute the integral $\int_0^1 x dx = \frac{1}{2}$. We then compute the integral 1 0 xdx = 1 2.

Unnumbered mathematical environments When maths occurs outside of text blocks, it is referred to as display mode maths. L A TEX offers two ways of formatting display mode maths in unnumbered single lines. $$\cos^2 \theta + \sin^2 \theta = 1$$ cos 2 θ + sin 2 θ = 1 \[ y^x = \exp{x\ln{y}} \] y x = exp x ln y

Numbered mathematical environments The equation environment is the first of the numbered equation environments \begin{equation} \mathcal{c} = \left\{ (x,y) \in \mathbb{r}^2 \mid x^2 + y^2 = 1 \right\} \end{equation} C = { (x, y) R 2 x 2 + y 2 = 1 } (1)

Numbered mathematical environments The gather environment formats centres multiple lines of equations on the page. \begin{gather} \Gamma(z) = \int_0^\infty t^{z - 1} e^{-t} dt \\ \binom{n}{k} = \frac{n!}{(n - k)!k!}. \end{gather} Γ(z) = ( ) n = k 0 t z 1 e t dt (2) n! (n k)!k!. (3)

Numbered mathematical environments The align environment aligns multiple lines of equations along a single column at points identified by an &. \begin{align} \sum_{n=0}^k a_n x^n &= a_0 + a_1 x + \ldots + a_n x^n\\ \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 1 \\ 0 & -1 \end{pmatrix} &= I \end{align} k a n x n = a 0 + a 1 x +... + a n x n (4) n=0 ( ) ( ) 1 1 1 1 = I (5) 0 1 0 1

Additional mathematical environments The alignat environment aligns multiple lines of equations along multiple columns at points identified by an &. \begin{alignat}{6} f(x) &= a_0 &+ a_1 x &+ a_2 x^2 &+ a_3 x^3 &+ \ldots \\ x f(x) &= &+ a_0 x &+ a_1 x^2 &+ a_2 x^3 &+ \ldots \\ -x^2 f(x) &= & &- a_0 x^2 &- a_1 x^3 &- \ldots \end{alignat} f (x) = a 0 +a 1 x + a 2 x 2 +a 3 x 3 +... (6) xf (x) = +a 0 x + a 1 x 2 +a 2 x 3 +... (7) x 2 f (x) = a 0 x 2 a 1 x 3... (8)

Additional mathematical environments \begin{multline} \left\{ (x,y,z) \in \mathbb{r}^3 \mid x + y + z = 5 \right\} \\ \cap \left\{ (x,y,z) \in \mathbb{r}^3 \mid xy + yz + zx = 8 \right\} \\ \cap \left\{ (x,y,z) \in \mathbb{r}^3 \mid x^2 + y^2 + z^2 = 4 \right\} \end{multline} { (x, y, z) R 3 x + y + z = 5 } { (x, y, z) R 3 xy + yz + zx = 8 } { (x, y, z) R 3 x 2 + y 2 + z 2 = 4 } (9)

Typesetting tables There are two environments for tables. The table handles information external to the table - allowing you to add captions and number tables. The tabular handles the actual formatting of the table contents directly. \begin{table} \begin{tabular}{c c c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{tabular} \caption{an introductory table} \end{table} 1 2 3 4 5 6 Table: An introductory table

Including graphics files The includegraphics command can be used to embed pictures into L A TEX, but the figure environment provides helpful features. \begin{figure}[h] \includegraphics[width=0.5\linewidth]{quadratic} \caption{including a picture file.} \end{figure} Figure: Including a picture file.

Referencing other parts of the document Almost anything in your document can be labelled uniquely. \chapter{the First chapter} \label{chapter_1} \begin{equation} \label{unit_circle} x^2 + y^2 = 1 \end{equation} These labels can be referenced x 2 + y 2 = 1 (10) Look at equation (\ref{unit_circle}) on page \pageref{chapter_1} in Chapter \ref{chapter_1}