Math 235: Introduction to LaTeX

Similar documents
Become a L A TEX Guru

Getting started with Latex

Learning LaTeX: The Basics

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

Introduction to MCS 220 and L A TEX

LaTeX A Tutorial. Mohsen Alimomeni, 2010

An Interactive Introduction to L A TEX

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

1 Obtaining LyX and L A TEX

Guide to using L A TEX

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


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

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

An introduction to L A TEX for students

L A TEX for Psychological Researchers

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 Primer. Randall R. Holmes. August 17, 2018

Learn how to [learn] LATEX

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

LaTeX. Information Literacy II EN(IL2) Course

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

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

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduction to L A TEX

Homework # (Latex Handout) by Laura Parkinson

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 Primer. 1 Introduction (Read Me)

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

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

Learning L A TEX. Patrick Lam

Assessments for CS students:

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

An Introduction to LATEX

INSTALLING AND USING L A TEX

An Introduction to L A TEX

Getting Started in L A TEX

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

Introduction to L A TEX for MCS-236

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

Introduction to LATEX

Introduction to L A TEX

CSCM10 Research Methodology A Taster of L A TEX

Meeting One. Aaron Ecay. February 2, 2011

LaTeX, automata,computability, and notation. CS154 Chris Pollett Jan. 25, 2006.

Typing Mathematics. Darrin Doud

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

Math 395 Homework #1 Due Wednesday, April 12

CSCE 222 Discrete Structures for Computing. LaTeX. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Introduction to LATEX

Intro to LaTeX Workshop

Helen Cameron. A Brief Overview of LATEX

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

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 Latex. A workshop by Dr. Ala Eshmawi

Typesetting in wxmaxima

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

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

Helen Cameron. A Brief Overview of LATEX

Introduction to L A TEX

Very Short Introduction to LaTeX

Course A, Part 1 Basic Formatting in L A TEX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Introduction to LAT E X

Effective Programming Practices for Economists

Basic L A TEX. what is LaTeX?

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

L A TEX for psychological researchers

An Introduction to L A T E X

Excellent support for mathematical formatting. Automatically downloads/installs missing components as needed Updates somewhat frequently

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

LAT E X week 2: Basics for Writing a Document

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

Introduction to LAT E X

NAVIGATING UNIX. Other useful commands, with more extensive documentation, are

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

L A TEX and Basic Text Editing

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

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

Introduction to L A T E X

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

An Introduction to LATEX

A Grasshopper s Approach to L A TEX

A Short Introduction to L A TEX

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

David Helmbold, October 2005, Revised October 2007

LaTeX and Turing Machines. CS254 Chris Pollett Aug. 30, 2006.

Formatting with LaTeX

A brief introduction to L A TEX

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

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

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

Outline. A Sneak Peek

L A TEX From The Ground Up

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

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

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

COMS 6100 Class note

My Mathematical Thesis

Transcription:

Math 235: Introduction to LaTeX The LaTeX word processing system was built to do mathematical typesetting. It is different than word processors; in LaTeX you type in text and typesetting commands, then the program builds the pages of text, then you can view the end result- That is, LaTeX does not work as a what you see is what you get (or WYSIWYG) kind of processor. We ll follow the steps below to build a document. Three Steps to a LaTeX Document Use a regular text editor (we re using Texmaker) to type in words, mathematical notation, and other typesetting commands. Save this plain text document with the file suffix.tex (Our example file is called Template.tex) Run the LaTeX program on the tex file, either by pressing the Quick Build button in the editor or by going to Tools -> Latex in the menu. What happens is that LaTeX builds a file called a DVI file (DVI stands for Device Independent). We typically don t view the DVI file, we usually take one more step and Build the PDF file. Texmaker can be programmed to do these steps for you. Go to the menu options at the top of the monitor, and select Options -> Configure Texmaker Once in the configuration menu, select the second button on your left (this is the Quick Build button), and then you have lots of choices. I rather like the Pdflatex + View PDF option. You can test these options on the template file- Try it out. The smallest LaTeX document Every LaTeX document must begin with the command \documentclass followed by some options. Next, we include any packages (discussed later). Finally, every document must begin and end, and all of our typesetting commands go in between. Here is our template document: \documentclass[12pt]{article} \usepackage{graphicx,fullpage} \begin{document} Text goes here... \end{document} That s it! Here are some observations about the template: 1

1. We will use the backslash a lot- The backslash is to denote a typesetting command, and will not be printed. To actually get a backslash, you would have to type \textbackslash 2. Curly braces are used to gather things in LaTeX- In our document, they are used to contain typesetting arguments. 3. I like the 12 point font for readability, and we use the article template (that s what the options are in the first line). 4. The two packages we will just about always use: graphicx (for figures) and fullpage (to set the margins to a nice size). Typesetting Mathematics All mathematical symbols (including single variables like y, t, x, etc.) should be typeset using what is called Math Mode. Mathematics may be typeset within a line (or Inline Math Mode), or we may want to highlight certain formulas and important ideas by writing the formula on its own line- called Display Math Mode To write things inline in math mode, use single dollar signs to denote the beginning and ending of the expression. Here are some examples. The text in the Courier font is what you type in, and the paragraph below is what LaTeX will produce: \documentclass[12pt]{article} \usepackage{graphicx,fullpage} \begin{document} You can see from the figure that the function $y=\sin(x)$ is not one to one, but the function $y=\sin(x)$, $-\pi/2\leq x \leq \pi/2$ is one to one. Therefore, the inverse exists and is given by: $$ \sin^{-1}(x)=y \qquad \Leftrightarrow \qquad \sin(y)=x \qquad \mbox{ and } \qquad -\frac{\pi}{2}\leq y \leq \frac{pi}{2} $$ \end{document} You can see from the figure that the function y = sin(x) is not one to one. But the function y = sin(x), π/2 x π/2 is one to one. Therefore, the inverse exists and is given by: Notes about the LaTeX: sin 1 (x) = y sin(y) = x and π 2 y π 2 Mathematics inline is provided by single dollar signs, and double dollar signs may be used to start/end the display math mode. We see that sin (as all named functions) should be typeset in normal font using math mode (use the backslash). Fractions are made using the \frac command, followed by the numerator in braces, then the denominator in braces. 2

Extra horizontal white space is denoted by \qquad (leaving these out will squish all your text together). Try this- There are other ways of highlighting mathematical formulas: Use \[ \] in place of the double dollar signs. You ll get an identical look. Use \begin{equation} and \end{equation} in place of the double dollar signs- What happens then? A New Document The best way to learn LaTeX is to play around with files that are already put together. Here is an example- You should type this into the LaTeX editor and produce a PDF document from it. We ll start it on the next page for easier copying. 3

\documentclass[12pt]{article} \usepackage{graphicx, fullpage} \title{the Mean Value Theorem} \author{your Name(s) Go Here} \begin{document} \date{\today} \maketitle {\bf THE MEAN VALUE THEOREM.} Let $f$ be a continuous function on the interval $[a,b]$, and differentiable on $(a,b)$. Then there is a $c$ in $(a,b)$ so that: $$ f (c)=\frac{f(b)-f(a)}{b-a} $$ {\bf Discussion:} In order to use the MVT, we see that there are two hypotheses that must be true: \begin{itemize} \item The function $f$ is continuous on $[a,b]$ \item The function $f$ is differentiable on $(a,b)$. \begin{itemize} \item This means that $f$ may not be differentiable at $a$ or $b$. \item Second note \end{itemize} \end{itemize} \begin{align} E &= mc^2 \\ m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}} \end{align} \end{document} Save this file as MVT.tex. and use Texmaker to compile the tex file and produce a PDF file (use your folders to make sure these files have been constructed). 4

New commands we see: Did you copy and paste the LaTeX commands from the PDF file to your LaTeX editor? It does save time (rather than typing everything from scratch). We see how to create a document with a title and author. Notice that the title and author commands are before the \begin{document} command. To create boldface text, we used: {\bf text }. Notice that these are curly braces and not parentheses. A bulleted list is created by the use of itemize. Try changing one begin-end pair to use enumerate instead of itemize. Notice that we nested the lists- That is, one list of items is under another. Often, we have equations that run over a single line. Now we have a third way of expressing something in display math mode- This time, we can organize the material into columns. Ampersands (&) are used to end a column, and double backslash ends a row. Can t find what you re looking for? A quick internet search should give you a lot of resources. For example, how do I create a table in LaTeX? A search for create tables in latex will even give you an online table generator! Using the Editor Be sure to take a little time and play around with the editor settings- In particular, you might take a look at the menu buttons on the far left- There are a lot of commonly used symbols there. Finding and Fixing Errors What should we do if we get an error? Here s an example: Put some white space here: \begin{equation} f (c)=\frac{f(b)-f(a)}{b-a} \end{equation} and try to run LaTeX- You should see Process exited with error(s) in the Message Window, and the errors are listed in red- in this case, it actually points to the wrong line, so you can see that sometimes the error message doesn t correspond exactly to what is wrong. Homework Be sure to finish the handout. Watch the videos; linked from class website. Write a short biography of yourself (see details below). Upload the tex file and the pdf file to your dropbox before our next class meeting. 5

Writing Assignment Write a short bio of yourself (just 1-2 paragraphs). Include things like where you are from and how much experience in mathematics you ve had, and mathematical things that might be of interest. You can also include hobbies. Mainly, in this document I would like to see some structural things in LaTeX: Use title, author, date (and \maketitle). Include some mathematical notation, both inline and display. Save the tex file as: bio.tex. Use TeXmaker to create the appropriate PDF file, and upload both tex and PDF files to your CLEO dropbox before our next class meeting. 6