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

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

Introduction to MCS 220 and L A TEX

L A TEX for Psychological Researchers

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

A Short Introduction to L A TEX

Introduction to L A TEX for MCS-236

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

Course A, Part 1 Basic Formatting in L A TEX

Meeting One. Aaron Ecay. February 2, 2011

Math 235: Introduction to LaTeX

Typing Mathematics. Darrin Doud

Typesetting in wxmaxima

A Brief Introduction to L A TEX

An Interactive Introduction to L A TEX

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

LATEX Primer. 1 Introduction (Read Me)

Using L A TEX Tom Edgar

Guide to using L A TEX

Become a L A TEX Guru

An Introduction to LATEX

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

My Mathematical Thesis

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

Latex Tutorial 1 L A TEX. 1.1 Text

Effective Programming Practices for Economists

Math 395 Homework #1 Due Wednesday, April 12

Introduction to L A TEX

LaTeX A Tutorial. Mohsen Alimomeni, 2010

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

An introduction to L A TEX for students

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.

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

Getting started with Latex

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

Homework # (Latex Handout) by Laura Parkinson

Getting Started with L A TEX

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

1 Obtaining LyX and L A TEX

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

L A TEX: Online module 2

A L A T E X quick start

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

APPM 2460 PLOTTING IN MATLAB

VERY VERY SHORT GUIDE TO LATEX

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

Learning LaTeX: The Basics

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


Introduction to Scientific Typesetting Lesson 1: Getting Started

INSTALLING AND USING L A TEX

Typesetting with TEX

Introduction to L A T E X

Word-to-L A TEX specification

Helen Cameron. A Brief Overview of LATEX

Part II: Creating Visio Drawings

2. Unlock the Customization Features: The Edit Button Click the "Edit" button on the Dashboard Home Page to unlock the customization features.

Basic L A TEX. what is LaTeX?

Abstract A quick intro by examples to the document preparation language L A TEX.

A Grasshopper s Approach to L A TEX

Typing Math: Symbols and Graphing

L A TEX and Basic Text Editing

Helen Cameron. A Brief Overview of LATEX

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

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

Template and Tutorial for Math Modelers

1 Different Document Classes

Typing Math: Symbols and Graphing

Square cells: an array cooking lesson

Introduction to Math in LaTeX

EGR 53L - Spring 2011

Introduction to LAT E X

Not-So-Frequently Asked Questions for L A TEX

Appendix B: Latex survival guide

Introduction to LATEX

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

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

The LYX Tutorial. by Mohammed M. Kadhum

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

Mikkel Madsen

Introduction to L A TEX

An Introduction to L A TEX

An introduction to TeX. And other options for producing documents containing mathematics

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Getting Started in L A TEX

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

Using ShareLaTeX to make Trees

This is the LYX Beamer Template

Assessments for CS students:

Introduction to LaTeX. Paul Fodor Stony Brook University

Creating Your Web Site

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics.

L A TEXInstallation and Introduction

Introduction to Latex. A workshop by Dr. Ala Eshmawi

A Short L A TEX Introduction

L A TEX Is Your Friend OR ENEMY?????????.

Using Microsoft Excel

Workshop: A Simple Introduction to L A TEX

Introduction to L A TEX

Script for Interview about LATEX and Friends

Transcription:

Using L A TEX About these notes These notes give some starting tips on using L A TEX to typeset mathematical documents. To learn the system at all fully you ll need a proper L A TEX manual, but you can get started with this, and begin to see something of how the system works. To see what s happening you ll need to see this document both in its pretty (typeset) form and in its raw or (input) form. If you re reading this on paper, the input form follows the typeset form. What is L A TEX? L A TEX is a powerful but (conceptually) simple program for processing mathematical and ordinary text. Based on TEX (an even more powerful typesetting markup language), L A TEX has become more or less the mathematician s international gold standard for preparing professionally typeset mathematical documents. L A TEX is quite different from indeed, essentially opposite to WSYWIG (what you see is what you get) word processors such as... gasp... Microsoft Word. L A TEX is closer in spirit to HTML (HyperText Markup Language; used for creating Web pages) in that both include explicit markup commands, which tell the computer to treat words or characters in special ways. In L A TEX jargon, for example, the command {\it dog} causes the word dog to be set in italics. The similar command {\bf dog} causes dog to be set in boldface type. How L A TEX works To use L A TEX, one first creates (using any old word processor or text editor, even Microsoft Word) an input file, called something like latexprimer.tex. This file is fed to L A TEX, which creates a new file, called something like latexprimer.dvi. This new file is something like a JPEG or a GIF file; it s hard or impossible for a human to read in raw form, but with appropriate software it can be viewed or printed to produce a beautifully typeset result. Exactly how the *.tex file is fed to L A TEX and how the result is viewed or printed depends on the software you have available; that subject won t be treated here. The best way to start to see how L A TEX works is to look carefully at an input file (like the one that produces this document). You ll see that nearly all L A TEX commands start with a backslash (\). Many commands start with something of the \begin{commandname} and end with \end{commandname}. The basic structure of L A TEX was designed by a mathematician (Donald Knuth); perhaps for that reason an input file always contains lots of curly braces. Making numbered lists Here is an example: A numbered list is just that a collection of items sorted and labeled by number. 1. This is the first item to be enumerated. Notice how indentation is handled; the format is called a hanging indent. Here is a second paragraph of stuff within the first numbered item. 2. Here is the second item to be enumerated. 3. Here is the third item to be enumerated. Now the enumerated list is done; the margins revert to their defaults. To see how exactly how L A TEX produced this list you ll need to look carefully at the input form of this document. Font styles and sizes There s seldom any good reason to mess around with the basic L A TEX font (called Computer Modern), but there are often good reasons to use the italic style and boldface style. Other styles, such as the sans serif style and the slant style, are possible, but seldom of much use. The input form of this document shows how these styles are created. Type sizes are easily changed (though there s seldom much reason to do so). Here are some words that illustrate some of the sizes possible: 1

small, large, Large. The input file shows how to produce these effects. (In practice, they re seldom really needed.) Math mode L A TEX handles mathematical symbols and expressions like a dream, but it needs to be told exactly what you want. As a rule you turn math mode on and off by using either single or double dollar signs. To produce a+b = c, for instance, you type $a+b=c$. To produce b f(x)dx, you type $\int_a^b f(x) dx$ a. To produce a b = c, you type $\frac{a}{b}=c$. To produce a b+d = c, you type $\frac{a}{b+d}=c$. Notice the careful use of wiggly brackets to group things, and how subscripts and superscripts are formed. The examples above illustrate the in-line math style; everything appears on the same line as the ordinary type, and spacing can get crowded. The other possibility is called displayed equation style; here s an example: f 1 r n+1 (c) = lim = 1 n 1 r r. Note that the equation is centered on its own line, doesn t interfere with surrounding text, and is easier to read when expressions are complicated. On the other hand, displayed equations take more vertical space, and can be annoying to read if they come along too often. L A TEX nicely handles Greek mathematical symbols, such as π, ɛ, δ, θ, ξ, α, and β. See the input file for how this is done. 2

% This is the file latexprimer.tex. Any line in the input file % that begins with a % (percent sign) is treated as a comment, and ignored % by LaTeX. Note that blank lines and empty spaces are ignored % by LaTeX, so it s fine to leave spaces wherever doing so is convenient. \documentclass{article} \usepackage{amsmath} \setlength{\parskip}{5pt} \setlength{\parindent}{24pt} \setlength{\oddsidemargin}{0in} \setlength{\textwidth}{6.5in} \setlength{\textheight}{9in} \pagestyle{plain} % All lines above this point are considered part of the preamble. They % tell LaTeX various things about the document to come, but aren t actually % part of the document as such, which begins after the following line. % Note that most commands begin with backslashes, and that lengths can % be measured in inches or in points (one point is 1/72 of an inch). % Other units of measurement (cm, mm, etc.) are also allowed. % The \pagestyle command says that pages are numbered in the usual way. \begin{document} \centerline{\large Using \LaTeX\ } % The line above tells LaTeX to center the stuff within braces. The % first word in braces ( \Large ) tells LaTex to use Large characters. % The word \LaTeX\ is handled in a special way; that s why it appears % with backslashes. \vskip.25 in % The line above LaTeX to skip.25 inches vertically. % The following command creates a paragraph header (set in boldface) % out of the given text. \paragraph*{about these notes} These notes give some vague suggestion on how to use \LaTeX\ to typeset mathematical documents. To learn the system at all fully you ll need a proper \LaTeX\ manual, but you can get started with this, and begin to see something of how the system works. To see what s happening you ll need to see this document both in its pretty (typeset) form and in its raw or (input) form. If you re reading this on paper, the input form follows the typeset form. \paragraph*{what is \LaTeX?} \LaTeX\ is a powerful but (conceptually) simple program for processing mathematical and ordinary text. Based on \TeX\ (an even more powerful typesetting markup language), \LaTeX\ has become more or less the mathematician s international gold standard for preparing professionally typeset mathematical documents. \LaTeX\ is quite different from---indeed, essentially opposite to---wsywig (what you see is what you get) word processors such as \dots 3

gasp \dots Microsoft Word. \LaTeX\ is closer in spirit to HTML (HyperText Markup Language; used for creating Web pages) in that both include explicit markup commands, which tell the computer to treat words or characters in special ways. In \LaTeX\ jargon, for example, the command \verb+{\it dog}+ causes the word {\it dog} to be set in italics. The similar command \verb+{\bf dog}+ causes {\bf dog} to be set in boldface type. % The \verb command is slightly atypical. Don t worry about it too much % at this point. In effect, it causes things to be printed verbatim, % whatever that means. \paragraph*{how \LaTeX\ works} To use \LaTeX, one first creates (using any old word processor or text editor, even Microsoft Word) an input file, called something like \verb+latexprimer.tex+.this file is fed to \LaTeX, which creates a new file, called something like \verb+latexprimer.dvi+. This new file is something like a JPEG or a GIF file; it s hard or impossible for a human to read in raw form, but with appropriate software it can be viewed or printed to produce a beautifully typeset result. Exactly {\em how} the \verb+*.tex+ file is fed to \LaTeX\ and how the result is viewed or printed depends on the software you have available; that subject won t be treated here. The best way to start to see how \LaTeX\ works is to look carefully at an input file (like the one that produces this document). You ll see that nearly all \LaTeX\ commands start with a backslash (\verb+\+). Many commands start with something of the \verb+\begin{commandname}+ and end with \verb+\end{commandname}+. The basic structure of \LaTeX\ was designed by a mathematician (Donald Knuth); perhaps for that reason an input file always contains lots of curly braces. \paragraph*{making numbered lists} A numbered list is just that---a collection of items sorted and labeled by number. Here is an example: \begin{enumerate} % The command above tells LaTeX that an enumerated list is coming. % Each item in the list starts with an \item command. \item This is the first item to be enumerated. Notice how indentation is handled; the format is called a hanging indent. \item Here is the second item to be enumerated. \item Here is the third item to be enumerated. \end{enumerate} % The command above tells LaTeX that an enumerated list has ended. Now the enumerated list is done; the margins revert to their defaults. 4

To see how exactly how \LaTeX\ produced this list you ll need to look carefully at the input form of this document. \paragraph*{font styles and sizes} There s seldom any good reason to mess around with the basic \LaTeX\ font (called Computer Modern), but there are often good reasons to use the {\it italic} style and {\bf boldface} style. Other styles, such as the {\sf sans serif} style and the {\sl slant} style, are possible, but seldom of much use. The input form of this document shows how these styles are created. % Note the commands above that produce italic, bold, and other shapes. % In each case, curly brackets ({ and }) define the scope of the command. Type sizes are easily changed (though there s seldom much reason to do so). Here are some words that illustrate some of the sizes possible: \begin{quote} {\small small}, {\large large}, {\Large Large}. \end{quote} The input file shows how to produce these effects. (In practice, they re seldom really needed.) \paragraph*{math mode} \LaTeX\ handles mathematical symbols and expressions like a dream, but it needs to be told {\em exactly} what you want. As a rule you turn math mode on and off by using either single or double dollar signs. To produce $a+b=c$, for instance, you type \verb@$a+b=c$@. To produce $\int_a^b f(x) dx$, you type \verb@$\int_a^b f(x) dx$@. To produce $\frac{a}{b}=c$, you type \verb@$\frac{a}{b}=c$@. To produce $\frac{a}{b+d}=c$, you type \verb@$\frac{a}{b+d}=c$@. Notice the careful use of wiggly brackets to group things, and how subscripts and superscripts are formed. % As earlier, you should basically ignore the \verb commands above. The % important commands are those that start and end with the dollar sign ($). The examples above illustrate the {\bf in-line math} style; everything appears on the same line as the ordinary type, and spacing can get crowded. The other possibility is called {\bf displayed equation} style; here s an example: $$ f (c) = \lim_{n \to \infty} \frac{1-r^{n+1}}{1-r} = \frac{1}{r}. $$ % Look carefully at how the \frac command works; the numerator is in the first % set of braces and the denominator in the second. Note that the equation is centered on its own line, doesn t interfere with surrounding text, and is easier to read when expressions are complicated. On the other hand, displayed equations take more vertical space, and can be annoying to read if they come along too often. \LaTeX\ nicely handles Greek mathematical symbols, such as $\pi$, $\epsilon$, $\delta$, $\theta$, $\xi$, $\alpha$, and $\beta$. See the input file 5

for how this is done. \end{document} % Every document ends with an \end{document} command. 6