Getting Started with L A TEX

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

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

An Introduction to LATEX

Become a L A TEX Guru

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

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

LATEX Primer. 1 Introduction (Read Me)

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

A brief introduction to L A TEX

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

Homework # (Latex Handout) by Laura Parkinson

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

Guide to using L A TEX

Course A, Part 1 Basic Formatting in L A TEX

Learning L A TEX. Patrick Lam

Math 235: Introduction to LaTeX

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

Intro to LaTeX Workshop

A Short Introduction to L A TEX

Introduction to MCS 220 and L A TEX

Learning LaTeX: The Basics

MATLAB for the Sciences

Assessments for CS students:

Introduction to L A TEX for MCS-236

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

Getting started with Latex

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

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

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

A quick guide to L A TEX

Square cells: an array cooking lesson

Introduction to L A TEX

How To Get Your Word Document. Ready For Your Editor

Chapter 1. Math review. 1.1 Some sets

Part - I : Short Course Typing Text

Absolute L A TEX Beginner

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

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

Meeting One. Aaron Ecay. February 2, 2011

An Introduction to L A TEX

Mikkel Madsen

Manuscript Title. with Forced Linebreak. Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\

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

Learn how to [learn] LATEX

A Grasshopper s Approach to L A TEX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Introduction to Math in LaTeX

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

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection.

Introduction to L A TEX

Environments, Equations, and Tables

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

Script for Interview about LATEX and Friends

L A TEX and Basic Text Editing

Typesetting in wxmaxima

The Table and Figure Environments

Latex Tutorial 1 L A TEX. 1.1 Text

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.

Paul's Online Math Notes. Online Notes / Algebra (Notes) / Systems of Equations / Augmented Matricies

MAKING TABLES WITH WORD BASIC INSTRUCTIONS. Setting the Page Orientation. Inserting the Basic Table. Daily Schedule

Electronic Production Guidelines

L A TEXInstallation and Introduction

CSE 150: Notation Examples

Tools for Scientific Writing with LAT E X. Johan Carlson

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

The supertabular environment

Getting Funky: Headers, Tables, Abstracts etc.

Introduction to L A TEX beamer

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

An introduction to L A TEX for students

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50

EGR 53L - Spring 2011

Section 0.3 The Order of Operations

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


9. MATHEMATICIANS ARE FOND OF COLLECTIONS

Student Learning Service: Introduction to Latex

SOFTWARE ARCHITECTURE 4. TEXT FORMATTING SYSTEM

Paul's Online Math Notes Calculus III (Notes) / Applications of Partial Derivatives / Lagrange Multipliers Problems][Assignment Problems]

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

CS 189 L A TEX and Linux: Text in Boxes

Creating a Template in WordPerfect

Latex Tutorial. CIS400 Senior Design 9/5/2013

L A TEX: Online module 6

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

How to get started in L A TEX

Topic. Section 4.1 (3, 4)

Math 395 Homework #1 Due Wednesday, April 12

Creating Tables and Figures with L A T E X

Mikkel Madsen

3.7. Vertex and tangent

Using Microsoft Access

My LaTeX Document. July 7, Introduction 2

Tips & Tricks for Microsoft Word

ORB Education Quality Teaching Resources

Topic C. Communicating the Precision of Measured Numbers

LAT E X week 2: Basics for Writing a Document

--- stands for the horizontal line.

Using Microsoft Word. Tables

Using Microsoft Excel

Transcription:

Getting Started with L A TEX This document is designed to help you see how to produce some mathematical typesetting. The best way to learn how to use L A TEX is to experiment with particular commands. After you have read through this you might just try making some small changes to the.tex file and see what happens to the resulting pdf file you get. Here is how to make the truth table near the bottom of page 38 of the textbook. Notice how I made double horizontal or vertical lines. P Q P Q T T T T F F F T F F F F This table was typeset with the following commands. \begin{center} \begin{tabular} { c c c } \hline $P$ & $Q$ & $P \wedge Q$ \\ \hline\hline $T$ & $T$ & $T$ \\ \hline $T$ & $F$ & $F$ \\ \hline $F$ & $T$ & $F$ \\ \hline $F$ & $F$ & $F$ \\ \hline \end{tabular} \end{center} I wanted the table to be centered horizontally so the table is inside what is called the center environment. To do this I started with the \begin{center} command and ended with \end{center}. Everything between these two commands is centered horizontally. If you look closely at the table and the commands that make it, you will notice that it begins with the command 1

\begin{tabular} { c c c } and ends with the command \end{tabular} Everything between these commands is part of what is called the tabular environment. There are lots of other environments such as itemize, center, enumerate, equation, align, eqnalign, and many others. Each of these environments is set up to do one special thing. For example, the tabular environment is to make a table, the center environment is to center some text horizontally on a line, the enumerate environment helps you to enumerate items, and so on. You get the idea, right? You guessed it. That last line was typeset with \begin{center} You get the idea, right? \end{center} Now notice the rest of the command that started the tabular environment. It has a combination of vertical lines, like, and three copies of the letter c. The fact that there are three tells L A TEX that the table will have three columns, and the vertical lines tell it where to draw vertical lines up and down the table. By the way, the letter c does not stand for column but for center. The way I made the table each entry was centered in its column. You can also use r for right and l for left. The r prints the column contents right justified; the l prints the column contents left justified. Since each entry in the first and second columns in this example was a single character, replacing c by r or l has no visible effect. It would have changed the appearance if I had replaced c by either l or r in the third column. In the following example you can see what happens. a b c a b a c b + 5c b a 23 c + 2d b c c b a + b c Consecutive entries in a given row of a table are separated by an & and each row ends with a double backslash. 2

In this class - and in most higher level mathematics classes - you will have occasion to use set notation a lot. Here are several examples of that. The first of these is just below Definition 1.2 on page 8 of the text; the second is from page 6; the third from Example 1.7 on page 20. A B = {(k, q), (k, r), (l, q), (l, r), (m, q), (m, r)} (a, b] = {x R: a < x b} P = N P = {1, 4, 6, 8, 9, 10, 12,...} These three lines were typeset with the following commands \noindent $A \times B=\{(k,q), (k,r), (\ell,q), (\ell,r), (m,q), (m,r)\}$ \\ $(a,b]=\{x \in \mathbb{r} \colon a < x \le b\}$ \\ $\overline{p}=\mathbb{n}-p=\{1,4,6,8,9,10,12,\ldots\}$ Notice the \noindent at the beginning of the first line and the double backslash \\ at the end of the first and second lines. It s sort of obvious what \noindent means. The double backslash is a command to end a line of text and begin a new line. Also notice the \mathbb{r} and \mathbb{n} commands above. These are commands to use the blackboard font that we mathematicians tend to use for special sets - in this case for the set of real numbers and the set of natural numbers, respectively. You probably also see the strange \ell above. Sometimes it seems natural to use a lower case eleventh letter of the alphabet in what we write, but it tends to be easily confused with the numeral 1. So \ell produces a script form of this letter. Here are three algebraic equations illustrating some of the common algebraic operations like fractions, powers and roots. α 3 = 1 + i 2, α 5 = 1 i 2, β = 5 x 3 3x 2 + 17. That last line was typeset with this command. \[\alpha^3=\frac{-1+i}{\sqrt{2}}, \hskip 1cm \alpha^5=\frac{-1-i}{\sqrt{2}}, \hskip 1cm \beta=\sqrt[5]{x^3-3x^2+17}\,.\] This line is set in mathematical font and is on a line centered horizontally with a space above it and a space below the line (before the text begins again). To set off mathematics like this you start the line with the command \[ and end it with \]. You can instead use $$ to begin and $$ to end the line. 3

There are several ways to put vertical and horizontal space in what you write. You can tell the program exactly how much space to put by putting in a command like \vskip 2cm which asks for a vertical skip of 2 centimeters. A horizontal skip is similar and the command would be \hskip 2 cm. You can ask the program to insert just a small horizontal space by using \,. You will find such a command in the last line of mathematics above. If you simply press the Enter key twice then you get a new paragraph, but pressing it more than twice doesn t give you any more vertical space. Try it. Sometimes it is helpful (to us and especially to those who read what we write) to display the simplification or expansion of an expression as an array of equations, congruences, inequalities, etc. Here is an example of doing this to show the simplification of a sum. (This is from a proof on page 158 of the text. You will see that I have given this array a number (even though it does not have one in the text) so that I can easily refer to it elsewhere in my writing. Actually I didn t give it a number, but L A TEX automatically gave it a number when I decided to give it a label. Look below to the commands that generated this aligned set of expressions to see where I gave it a label. k+1 i i! = i=0 ( k ) i i! + (k + 1)(k + 1)! (1) i=0 = ((k + 1)! 1) + (k + 1)(k + 1)! = (k + 1)! + (k + 1)(k + 1)! 1 = (1 + (k + 1))(k + 1)! 1 = (k + 2)(k + 1)! 1 = (k + 2)! 1 = ((k + 1) + 1)! 1. I can now refer to this array of expressions (1) by giving the command \eqref{simplify}. The above was typeset using the following commands. I hope you can see that L A TEX automatically generates the numbers associated with things like arrays of equations. You can use whatever name you want as the label; L A TEX takes care of the rest. If you have other equations that you want to refer to elsewhere in the same document, then again, L A TEX handles all of the 4

bookkeeping for you. \begin{eqnarray}\label{simplify} \sum_{i=0}^{k+1} i \cdot i! &=& \left(\sum_{i=0}^{k} i \cdot i!\right) +(k+1)(k+1)!\\ &=& \left((k+1)!-1\right)+(k+1)(k+1)!\nonumber \\ &=& (k+1)! + (k+1)(k+1)! -1 \nonumber \\ &=& (1+(k+1))(k+1)!-1 \nonumber \\ &=& (k+2)(k+1)!-1 \nonumber \\ &=& (k+2)!-1 \nonumber \\ &=& ((k+1)+1)!-1. \nonumber \end{eqnarray} We will spend some time studying functions and their properties. Here is an example from exercise 15 on page 205 of the text that illustrates function notation. f : {A, B, C, D, E, F, G} {1, 2, 3, 4, 5, 6, 7} This is typeset using the commands $f:\{a,b,c,d,e,f,g\} \to \{1,2,3,4,5,6,7\}$ How about some fancy underbraces? In this course you probably won t need to do anything this fancy, but I just want to show you that L A TEX is really a powerful program. We have just scratched the surface. Here is an example. typeset with (1 + 1 + + 1) (1 + 1 + + 1) = (1 + 1 + + 1) }{{}}{{}}{{} n summands m summands nm summands \[ \underbrace{(1+1+\cdots+1)}_{n \,\,\mbox{{\scriptsize summands} }} \underbrace{(1+1+\cdots+1)}_{m \,\,\mbox{{\scriptsize summands} }}= \underbrace{(1+1+\cdots+1)}_{nm \,\,\mbox{{\scriptsize summands} }}\] In the above example the command \, adds a little space and the command {\scriptsize summands} prints the word summands in a font size about the same as the n or the m. The command \mbox allows you to insert regular text fonts inside a mathematical expression. The text you wish to put there 5

is enclosed inside the set brackets { and }. Here the mathematical expression is put into display mode by the use of the delimiter \[ at the beginning and \] at the end. To get started producing your own typesetting with L A TEX there are a couple more important things for you to know. You have to tell L A TEX what kind of a document you are creating. You do that in the first lines of the.tex file with some commands such as \documentclass[12pt]{report} \usepackage{amsmath,amssymb,latexsym} These particular commands tell the program that your document will be a report written in 12 point font. There are other document classes such as letters, articles, etc. The command \usepackage{amsmath,amssymb,latexsym} instructs the program to use certain packages or style files that tell it what symbols and so on to expect. There are lots of style files; it is best to consult a L A TEX manual or ask someone about these. There are lots of other commands that allow you to set the size of the margins of your document, the width of the text, the height of text, etc. Here are several of those that I used at the top of this document. You might try experimenting with these, but you should keep in mind that some of this is quite subtle. 1 Consulting a L A TEX book or asking an expert is advisable. \setlength{\textwidth}{7.5in} \setlength{\leftmargin}{-.5in} You also have to tell L A TEX where the actual document begins and where it ends. You have probably figured out that is done with \begin{document} and \end{document} respectively. Check out the.tex file that produced this pdf file and you can see where these commands belong. 1 See the negative left margin setting if you don t understand what I mean by subtle. By the way, please look at the.tex file that produced this pdf to see how easy it is to make footnotes in L A TEX. 6