L A TEX Introduction. 1 Basic Resources: Melissa Desjarlais (amended by Dr. Dena Morton)

Similar documents
LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

Math typesetting guide

LaTeX in SLATE. Common Symbols. 1. Subscripts & Superscripts Fractions & Roots. 4. Brackets.. 5. Multiline Formulas.. 6. Matrices..

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

Introduction to L A TEX

David Helmbold, October 2005, Revised October 2007

Helen Cameron. A Brief Overview of LATEX

Learning LaTeX: The Basics

Paul Gartside. March 2, 2013

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Using L A TEX Tom Edgar

An Introduction to LATEX

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

Environments, Equations, and Tables

LAT E X Math Mode. RSI 2007 Staff

Course A, Part 1 Basic Formatting in L A TEX

T E X and L A T E X For the Uninitiated

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

L A TEX for Psychological Researchers

L A TEX and Basic Text Editing

An introduction to L A TEX for students

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

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

Introduction to MCS 220 and L A TEX

Introduction to L A TEX

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

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

A Short Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

Become a L A TEX Guru

L A TEX: Online module 9

Math 235: Introduction to LaTeX

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

An Interactive Introduction to L A TEX

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

CSE 150: Notation Examples

MATLAB for the Sciences

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

A Brief Introduction to L A TEX


Introduction to L A TEX

Latex Tutorial 1 L A TEX. 1.1 Text

Semantics. Doug Arnold (L A TEX for Linguists) September 25, 2007

Typing Mathematics. Darrin Doud

Getting started with L A TEX on XP

Just Enough L A TEX, Week 4

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.

LATEX Workshop. Yi Liu Chen SUNY Geneseo PRISM Math Club. February 6, Wordmark Reversed Geneseo Wordmark Style Guide 4

A Beginner s Guide to LATEX. Last Revised: August 21, 2013

Intro to LaTeX Workshop

LATEX Primer. 1 Introduction (Read Me)

Getting started with Latex

CS 189 L A TEX and Linux: Mathematical Formulas

Guide to using L A TEX

An Introduction to L A TEX

Guide to L A TEX. Daniel M. Kane

Assessments for CS students:

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

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

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

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

Typesetting Mathematics. Dr. C. F. Rocca Jr.

Writing Mathematics in L A TEX by Example

Tables, Lists and Matrices. MAT 218 Mathematical Computing. February 2, 2016

Alex Milbrand. September 8, Graduate Student Seminar. Introduction to L A TEX. Alex Milbrand. History. Software. Basic Set-Up and Construction

Student Learning Service: Introduction to Latex

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

INSTALLING AND USING L A TEX

Learn how to [learn] LATEX

EGR 53L - Spring 2011

Introduction to Math in LaTeX

L A TEX for Psychological Researchers

1 Different Document Classes

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

An Introduction to L A TEX

Summary of Commonly-Used Features of LaT E X

Effective Programming Practices for Economists

PHYS-4007/5007: Computational Physics

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

The Joys of LAT E X. Vadim Ponomarenko. introducing the world s standard typesetting language.

My Mathematical Thesis

Introduction to L A T E X

L A TEX: Online module 2

Not-So-Frequently Asked Questions for L A TEX

LaTeX Style Guide for the Journal of Integer Sequences

A Running Introduction to L A TEX. Dr. Ken Rietz

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

Communicating Mathematics

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

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

1 Obtaining LyX and L A TEX

CIS 160 L A TEX Guide

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

INTRODUCTION TO L A TEX

The dropbox has two buttons: add and send. You must send the file to turn it in to the instructor.

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

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

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

Here are some suggestions for writing this assignment and future assignments:

George Grätzer. Practical L A TEX

Transcription:

L A TEX Introduction Melissa Desjarlais (amended by Dr. Dena Morton) Abstract We showcase some L A TEX typesetting. Additionally, we give resources for further exploration of typesetting mathematics and other things with L A TEX. 1 Basic Resources: Some things you will need or may want to download MikTeX from www.miktex.org WinEdt (a student license for $30) from www.winedt.com TeXnic Center from www.toolscenter.org/front content.php Ghostview (for using Postscript files) from www.cs.wisc.edu/ ghost/ Additional packages from ctan.tug.org Some additional websites that may be helpful 1. The Official WinEdt Community Site www.winedt.org 2. Information about L A TEX www.latex-project.org 3. Getting Started with LATEX www.maths.tcd.ie/ dwilkins/latexprimer/ 4. Text Processing using L A TEX www-h.eng.cam.ac.uk/help/tpl/textprocessing/ 5. AMS-L A TEX www.ams.org/tex/amslatex.html 6. The TEX Catalogue Online www.ctan.org/tex-archive/help/catalogue/bytopic.html 7. The Comprehensive LaTeX List www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf Some LATEX books that may be helpful. Math into L A TEX George Grätzer The TEXBook Donald Erwin Knuth 1

L A TEX A Document Preparation System Leslie Lamport The L A TEXCompanion Michel Goossens and Frank Mittelbach and Alexander Samarin The L A TEXGraphic Companion Michel Goossens and Sebastian Rahtz and Frank Mittelbach The LATEXWeb Companion Michel Goossens and Sabastian Rahtz and et al. A Guide to L A TEX Document Preparation for Beginners and Advanced Users Helmut Kopka and Patrick W. Daly TEXUnbound LATEXand TEXStrategies for fonts, graphics, and more Alan Hoenig 2

2 Typing Text There are some symbols that are reserved for LATEXcommands: Also, straight double quotes. # $ % & ˆ {} \ You can add comments to a L A TEX document by placing % in front of anything that you do not want to appear in the L A TEX ed document. If you want to have comments with multiple lines, the % symbol must appear on each line. 2.1 Spacing If you have two or more spaces in text, only one space will be displayed. A blank line indicates the end of a paragraph (and L A TEXwill automatically indent the next line). Spaces at the beginning of a line are ignored. Within lines: You can force a line to indent, prevent a line from indenting or make a horizontal skip with the following commands. \indent, \noindent, \hskip0.1in Between lines: You can force text to begin on a new line or make a vertical skip with the following commands. \newline, \vskip0.1in You can begin a new page by using the following command: \newpage 2.2 Commanding L A TEX There are commands and environments in L A TEX. Examples of commands are \emph{text} {\it text} which would both italicize the word text: text or text. An environment has a begin and an end command: \begin{center} This text would be centered horizontally on the page. \end{center} Everything typed between the two commands is in that environment. So this actually looks like This text would be centered horizontally on the page. 3

3 Text Environments You can create a numbered list using the enumerate environment: \begin{enumerate} \item Talk about posters \item Talk about \LaTeX \end{enumerate} which would be displayed as 1. Talk about posters 2. Talk about L A TEX You can create a bulleted list by using the itemize environment: \begin{itemize} \item Work on research \item Play volleyball % \item Watch a movie \end{itemize} which would be displayed as Work on research Play volleyball To have L A TEX commands displayed without being evaluated, you can use the verbatim environment. 3.1 Proclamations In L A TEX, theorems, lemmas, definitions, etc. are displayed in text environments called proclamations (or theorem-like structures). To use a proclamation, you need to define the proclamation with a newtheorem command in the preamble of the document, and then you invoke the proclamation in the body of the document. The first line below would appear in the preamble while the next three lines would appear in the body of the document. \theoremstyle{plain} \newtheorem*{theorem}{theorem} \begin{theorem} My first theorem. \end{theorem} which would be displayed as Theorem. My first theorem. 4

Notice that the theorem is not numbered and it is italicized. These are two things that can be changed. By removing the asterisk, the theorems would then be numbered. The first line below would appear in the preamble while the next three lines would appear in the body of the document. \theoremstyle{plain} \newtheorem{proposition}{proposition}[section] \begin{proposition} My first numbered proposition. Note this is numbered by the section number (this can also be user defined...) \end{proposition} which would be displayed as Proposition 1. My first numbered proposition. Note this is numbered by the section number (this can also be user defined...) 3.2 Proof Environments The AMS document classes and the amsthm package define a proof environment. \begin{proof} This is a proof, delimited by the q.e.d. \ symbol. \end{proof} would be displayed as: Proof. This is a proof, delimited by the q.e.d. symbol. Tabular environments You can use the tabular environment to create a table. \vskip0.1in \begin{tabular}{ l r c }\hline Name & Course & Grade \\ \hline Rebecca & Counting 101 & A+ \\ Elisheva & Cuteness and Burping 305 & A++ \\ Jack & How to be a good Husband 809 & A+++\\ Dena & How to Sleep after Baby 1001 & F-- \\ \hline \end{tabular} \vskip0.1in which would be displayed as Name Course Grade Rebecca Counting 101 A+ Elisheva Cuteness and Burping 305 A++ Jack How to be a Good Husband 809 A+++ Dena How to Sleep after Baby F 5

The information after the first tabular indicates where there are vertical lines and how the text is justified: left, right or center. Each line (other than the last line) is ended with two backslashes. Items on each line are separated by ampersands. A horizontal line can be added with the \hline command. If you want a horizontal line at the end, you need to end the last line with two backslashes. If you do not skip a little space before and after the table, it will appear within a line. There are many options that can be used with the tabular environment. 6

4 Typing Mathematics A math formula can be typeset inline, as part of the current line, or displayed, on a separate line with space above and below the formula. Dollar signs are used as delimiters for a math environment. A single pair of dollar signs is used for inline math. A double pair of dollar signs can be used to display the math on a separate line. Other math environments are \equation, \aligned, \split, \matrix Greek letter are displayed by typing a backslash and then the letter, such as \delta or \Delta. If delta is not capitalized, the lowercase delta will be displayed; if Delta is capitalized, the uppercase delta will be displayed. Use underscores and carets to make subscripts and superscripts, respectively. If you want more than one character to be in an exponent, you need to put the characters inside braces { }. Some math commands you may want to use include \frac{a}{b}, (a \choose b}, \lim_{x \to a} f(x), \sum_{i=1}^{n} i^2, A \cup B, A \cap B which would be displayed as inline as a b,( a) b,limx a f(x), n i=1 i2,a B,A B or as ( ) a a n b,, lim f(x), i 2,A B,A B b x a i=1 if not inline. Other math formulas: would result from n k=0 ( ) n = k lim x ( ) n + + 0 2x 2 + 3x 4x 2 7 = 1 2 e x2 dx = π ( n ) c A i = i=1 n i=1 ( ) n = 2 n k A c i $$\sum_{k=0}^{n} {n \choose k}= {n \choose 0} + \cdots + {n \choose k} =2^n $$ $$ \lim_{x \to \infty} \frac{2x^2+3x}{4x^2-7}=\frac{1}{2} $$ $$\int_{-\infty}^{\infty} e^{-x^2} \, dx= \sqrt{\pi}$$ $$\left(\bigcup_{i=1}^{n} A_i \right)^c=\bigcap_{i=1}^{n} A_i^c$$ There are also many mathematical symbols that can be used. Some are included below, but the comprehensive list of symbols (an 82 page document) can be found at ctan.tug.org. 7

There are a number of options for matrices: a + b + c uv ( a + b + c ) uv [ a + b + c ] uv a + b c + d a + b c + d a + b c + d a + b + c uv a + b c + d a + b + c uv { } a + b + c uv a + b c + d a + b c + d The first matrix is typed as: \begin{matrix} a+b+c & uv \\ a+b & c+d \end{matrix} while the others, instead of matrix, use pmatrix, bmatrix, vmatrix, Vmatrix, and Bmatrix, respectively. Another matrix example: results from a 11 a 1n a 21 a 2n..... a n1 a nn \begin{equation*} \begin{bmatrix} a_{11} & \cdots & a_{1 n} \\ a_{21} && a_{2 n} \\ & \ddots & \\ \vdots && \vdots \\ a_{n 1} & \cdots & a_{n n} \end{bmatrix} \end{equation*} Note that the asterisk after the word equation means that the equation is not numbered. Here s what the equation looks like with \begin{equation} and \end{equation}: a 11 a 1n a 21 a 2n... (1).. a n1 a nn Let s reference it: 1. You can use the \aligned command to display a series of equations where, for example, the equal signs are all lined up. The following 8

\begin{equation*} \begin{aligned} 3x+5 &= 7x-11 \\ %5 &= 4x-11 \\ 16 &= 4x \\ x &= 4 \end{aligned} \end{equation*} would be displayed as: 3x + 5 = 7x 11 16 = 4x x = 4 The \split command can be used to display a series of computations where, for example, the equal signs are all lined up. The following \begin{equation*} \begin{split} (a+b)(a-b) &= a^2-ab+ba-b^2 \\ &= a^2-ab+ab-b^2 \\ &= a^2-b^2 \end{split} \end{equation*} would be displayed as: (a + b)(a b) = a 2 ab + ba b 2 = a 2 ab + ab b 2 = a 2 b 2 The \cases command can be used to define a piecewise function. The following \begin{equation*} f(x)= \begin{cases} -x^2 & \text{if } x < 0; \\ \alpha+x & \text{if } 0 \leq x \leq 1; \\ x^2 & \text{otherwise.} \end{cases} \end{equation*} would be displayed as x 2 if x < 0; f(x) = α + x if 0 x 1; x 2 otherwise. 9

4.1 Some Math Symbols Type Typeset Type Typeset Type Typeset \leq \geq \sim \approx \equiv \cong = \subset \supset \subseteq \supseteq \smile \frown \therefore \because \nless \ngtr \neq \notin / \nsubseteq \nsupseteq \subsetneq \supsetneq \pm ± \mp \times \div \circ \bullet n\oplus \otimes \ast \dagger \triangleleft \setminus \ \leftarrow \to \longleftarrow \longrightarrow \Leftarrow \Rightarrow \leftrightarrow \Leftrightarrow \uparrow \downarrow \Uparrow \Downarrow \mapsto \hookrightarrow \leftharpoonup \rightharpoondown \forall \exists \clubsuit \diamondsuit \heartsuit \spadesuit \langle \rangle \lceil \rceil \lfloor \rfloor \sin sin \log log \gcd gcd \max max \det det \liminf lim inf \bar{a} ā \hat{a} â \tilde{a} ã \vec{a} a \mathcal{a} A \mathbb{a} A \int \cdot \in \infty \star \vee \wedge \aleph ℵ \ldots... \cdots \ddots... \vdots. \mathbb{z} \cup \cap \bigcap Z \{ { \} } \backslash \ \hat{a} â \acute{a} á \sqrt{a} a Most of this information came from Math into L A TEX by George Grätzer at the internet. 10

5 Sample Document This is a sample document. You can tell it is a sample document because it is a document with a bunch of text. We also have a bunch of equations, coming right up. For example, since we love calculus, let s do a derivative and an integral. The derivative is going to be inside of this sentence: d dy (y2 3) = 2y. Here s a partial derivative x (sec ye y + arctan y + 42) = 0. The integral is beautiful so gets displayed and centered nicely on its own line: π e ( ) 2 cos(x) sin(x) dx. We can italicize important statements. Generally in mathematics we do not bold our statements. We can leave a very nice, comfortable vertical space of 1/2 an inch right here: We can look at sets. Surely, you all love discrete mathematics. Let Z represent the integers, as always. Then we know that 3 Z, {3,4,5} Z, 2 Z, {3,4,π} Z. To and beyond!!! If A B then ( B) ( A). If A B C, then mathematics is cool. Hey, so are sub scripts. We can make a bulleted list, which in this case contains your homework: Assignment 1: Typeset something technical (i.e. with formulas) from your paper. Assignment 2: Continue to do your research. 11