An Introduction to L A TEX

Similar documents
LaTeX. Information Literacy II EN(IL2) Course

Introduction to L A TEX

Math 235: Introduction to LaTeX

An Interactive Introduction to L A TEX

An introduction to L A TEX for students

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

Getting started with Latex

Using L A TEX Tom Edgar

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

Introduction to LATEX

Introduction to L A TEX

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

1 Different Document Classes

Become a L A TEX Guru


An Introduction to LATEX

LAT E X Math Mode. RSI 2007 Staff

Introduction to MCS 220 and L A TEX

An Introduction to L A T E X

Introduction to L A T E X

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

A Brief Introduction to LaTeX

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

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

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

L A TEX and Basic Text Editing

Introduction to LaTeX. Paul Fodor Stony Brook University

Getting started General Tables Figures Math Wrap up. UCLA Department of Statistics Statistical Consulting Center. LaTeX Bootcamp

Assessments for CS students:

Introduction to LATEX

Paul Gartside. March 2, 2013

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

1. The Joy of TEX. Check out this example!

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Guide to using L A TEX

Introduction to Math in LaTeX

L A TEX for Psychological Researchers

Learning L A TEX. Patrick Lam

Introduction to L A TEX

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

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

David Helmbold, October 2005, Revised October 2007

Student Learning Service: Introduction to Latex

Pimp your thesis: a minimal introduction to L A T E X.

Typesetting Text. Spring 2013 TEX-Bit #1 Math 406

An Introduction to LATEX

INSTALLING AND USING L A TEX

Learn how to [learn] LATEX

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

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

Course A, Part 1 Basic Formatting in L A TEX

1. The Joy of TEX. Check out this example!

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

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

Introduction to L A TEX beamer

Epyt Theme for Beamer

Mikkel Madsen

Introduction to L A TEX for MCS-236

Math 395 Homework #1 Due Wednesday, April 12

Tools for Scientific Writing with LAT E X. Johan Carlson

Learning LaTeX: The Basics

Introduction to L A TEX

1 Obtaining LyX and L A TEX

LaTeX installation guide

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

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

Guide to L A TEX. Daniel M. Kane

Appendix B: Latex survival guide

LATEX Primer. 1 Introduction (Read Me)

Introduction to L A TEX

Math typesetting guide

Intro to LaTeX Workshop

Homework # You ll want to use some LaTeX editor to edit and compile your.tex files

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

Getting Started Guide Chapter 9 Getting Started with Math

Teacher Activity: page 1/9 Mathematical Expressions in Microsoft Word

LYX with Beamer and Sweave

A Brief Introduction to L A TEX

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.

Introduction to Beamer

An Introduction to L A TEX

L A TEX Primer. Randall R. Holmes. August 17, 2018

Intro to L A TEX. Kelly Choo. Sept. 21, Mathematics and Statistics, UVic

Tools for Scientific Writing with LAT E X. Johan Carlson

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

Lab1: Use of Word and Excel

Put the Graphs for Each Health Plan on the Same Graph

Helen Cameron. A Brief Overview of LATEX

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

Effective Programming Practices for Economists

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

A Short Introduction to L A TEX

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

My Full-Length Title

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

L A TEX: Making Math Accessible for the Blind or Visually Impaired

Simple Math. Adam Dishaw 2011 September 21. Suppose you want to include some math in your documents. Just follow these basics steps:

Transcription:

An Introduction to L A TEX Ryan C. Trinity University Math Majors Seminar September 12, 2017

What is L A TEX? L A TEX is a typesetting system/language used for the production of technical (mathematical) documentation. In mathematics, statistics, computer science, engineering, chemistry, physics, economics, quantitative psychology, philosophy, and political science, L A TEX is the standard for the preparation of presentations, publications, and other documents. Unlike WYSIWYG word processors like Microsoft Word, L A TEX uses source files (.tex files) written in specialized syntax that are then translated by a L A TEX compiler into output documents (e.g..pdf or.dvi files) suitable for publication. Complicated technical documents are much more easily produced using L A TEX than a traditional word processor.

Obtaining L A TEX L A TEX source files can be created using any text editor. MiKTeX and TeX Live are L A TEX compilers freely available online. There are also combined editor/compiler packages available: TeXShop and MacTeX for OS X, or protext for Windows can be downloaded for free. Latexian for OS X, or WinEdt for Windows can be purchased for a small fee. For the price of an email address, an online editor/compiler is available through www.overleaf.com.

A simple document After logging in to overleaf.com, click on choose the Blank Paper template. and You ll then see the following code in the left-hand pane of your window: \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} (Type your content here.) \end{document} A typeset version of this source code appears in the right-hand pane.

Entering mathematical expressions Inline mathematical expressions are enclosed by a pair of $. Let (G, ) be a group. Let $(G, \ast)$ be a group. Suppose that f (x) = e 3x x 2 + 3. Suppose that $f(x) = e^{3x} - x^2 + 3$. We claim that x n 0 as n. We claim that $x_n \to 0$ as $n \to \infty$. For any v R n, v, v 0. For any $\mathbf{v} \in \mathbb{r}^n$, $\langle \mathbf{v}, \mathbf{v} \rangle \ge 0$.

Remarks on math mode Macros and special characters have the form \symbolname. Whitespace is ignored. Curly braces {..} are used to group symbols, and are not typeset. The arguments to superscripts (^), subscripts (_) and other commands should be enclosed in curly braces: e^2x yields e 2 x e^{2x} yields e 2x

To display curly braces, use \{ and \}: $A = { (x,y) e^{xy} = 1 }$ yields A = (x, y) e xy = 1 $A = \{ (x,y) e^{xy} = 1 \}$ yields A = {(x, y) e xy = 1} To insert text in math mode, use \text or \mbox: $E = \{ n \in \mathbb{z} \, \, n \text{ is even} \}$ yields E = {n Z n is even}

Common symbols and functions The greek alphabet: $\alpha, \beta, \gamma, \Gamma, \delta, \Delta$ α, β, γ, Γ, δ, Special functions: $\sin x, \cos x, \log x, \sqrt{x}, \sqrt[n]{x}$ sin x, cos x, log x, x, n x Ellipsis: $a_1, a_2, \ldots, a_n$ a 1, a 2,..., a n

Large symbols Expressions including summations, fractions, integrals, etc. can look uncomfortable when typeset inline. $\sum_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6}$ yields n=1 1 n 2 = π2 6. And $\int_{-2}^{10} \frac{x^3}{5} dx$ yields 10 x 3 2 5 dx. There are two ways around this. Option 1: Use display mode by enclosing expressions between \[ and \]. Option 2: Use \displaystyle.

An equation in display mode: \[ \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}. \] An equation in display mode: n=1 1 n 2 = π2 6. A large inline expression: $\displaystyle \int_{-2}^{10} \frac{x^3}{5} dx$. 10 x 3 A large inline expression: 5 dx. 2

Templates There s no need to start a document from scratch every time: it s usually more efficient to modify an existing file. overleaf.com offers a number of document templates and examples of papers, presentations, etc. Your professors probably have templates or sample.tex files they may be willing to share... Today we will be using the file in-class.tex.

Uploading a project to overleaf.com Download the file in-class.zip from Dr. s website: http://gotu.us/drgq2 From the My Projects page on overleaf.com, click the upload button (next to ) and select Upload Zip from the drop down menu. Locate in-class.zip and drag it into the pop-up window (or click the Choose File button to do it the old fashioned way). After a few moments, the editing (left) and preview (right) panes should open automatically.

In-class exercises After changing the author s name to your own, scroll to the appropriate regions and code the following: (a) f (x) = 3 x 3 + 1 $f(x) = \sqrt[3]{x^3 + 1}$ (b) dy dx = tan x + x 4/3 $\displaystyle \frac{dy}{dx} = \tan x + x^{4/3}$

(c) Γ(s) = 0 e x x s 1 dx $\displaystyle \Gamma(s) = \int_0^{\infty} e^{-x} x^{s-1} \, dx$

Parentheses Consider the expression ( x 2 + y 3 ) 2. \[ \frac{x}{2} + \frac{y}{2} )^2 \] yields ( x 2 + y 2 )2, which is clearly unsatisfactory. Use \left and \right to scale parentheses (and other delimiters): \[ \left( \frac{x}{2} + \frac{y}{3} \right)^2 \]

Matrices A matrix can be built using the array environment. \[ \left( \begin{array}{cc} 0 & 1 \\ 1 & -q \end{array} \right) \] yields ( 0 1 1 q ) The & is an alignment tab, and \\ indicates the end of a row.

Another exercise Code the following [ 1 2 3 A = 0 0 a 23 ] \[ A = \left[ \begin{array}{ccc} 1 & 2 & -3 \\ 0 & 0 & a_{23} \end{array} \right] \]

Theorem environments Theorem (Bézout s Identity) Let m, n Z. There exist r, s Z so that gcd(m, n) = rm + sn. \begin{thm}[b\ ezout s Identity] Let $m, n \in \mathbb{z}$. There exist $r,s \in \mathbb{z}$ so that \[ \gcd(m,n) = rm+sn. \] \end{thm}

Another exercise Code the following. Theorem (Triangle Inequality) For any a, b C, we have a + b a + b. \begin{thm}[triangle Inequality] For any $a,b \in \mathbb{c}$, we have $ a+b \le a + b $. \end{thm}

Inserting figures Here s a figure: Figure: A surface in R 3 \begin{figure} \includegraphics[width=1.5in]{mountain_pass.eps} \caption{a surface in $\mathbb{r}^3$} \end{figure}

Final exercise Use the file dirichlet.eps to produce the following output. Δ 2u= 0 ux,y ( )=f( x,y) Figure: A generic Dirichlet problem in R 2 \begin{figure} \includegraphics[width=2in]{dirichlet.eps} \caption{a generic Dirichlet problem in $\mathbb{r}^2$} \end{figure}

Multiline equations The split environment is one way to align multiple display mode equations. x 3 1 x 1 = (x 1)(x 2 + x + 1) x 1 = x 2 + x + 1 \[ \begin{split} \frac{x^3-1}{x-1} &= \frac{(x-1)(x^2 + x + 1)}{x-1} \\ &= x^2 + x + 1 \end{split} \]

Equation references Suppose we d like to number and later refer to an inset equation. g(n) = d n f (d) (1) Here s a reference to equation (1). \begin{equation}\label{divisorsum} g(n) = \sum_{d n} f(d) \end{equation} Here s a reference to equation \eqref{divisorsum}.

L A TEX automatically keeps track of and increments equation labels. If g is defined by (1) then f (n) = d n µ(d)g ( n d ). (2) Equation (2) is called the Möbius inversion formula. If $g$ is defined by \eqref{divisorsum} then \begin{equation}\label{inversion} f(n) = \sum_{d n} \mu(d) g\left( \frac{n}{d} \right). \end{equation} Equation \eqref{inversion} is called the \em{m\"{o}bius inversion formula.}

Beamer Beamer is a L A TEX document style used to create presentations. Each slide is enclosed by \begin{frame} and \end{frame}. Items can be subsequently revealed on a slide in various ways, e.g. \pause, \onslide, \only, etc. One can also easily include figures using \includegraphics.

Sample beamer slide with a subtitle This is a slide. First item Second item

Sample slide code \begin{frame} \frametitle{sample beamer slide} \framesubtitle{with a subtitle} This is a slide. \pause \begin{itemize} \item First item \pause \item Second item \end{itemize} \end{frame}

Need more help? We ve only scratched the surface of L A TEX s capabilities. If you need additional help: Online: try googling latex (command name). In person: ask your peers or any math professor! Anything you re trying to do with L A TEX someone else has probably already done. Don t reinvent the wheel!