Learn how to [learn] LATEX

Similar documents
Become a L A TEX Guru

Math 235: Introduction to LaTeX

Getting started with Latex

An introduction to L A TEX for students

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Helen Cameron. A Brief Overview of LATEX

Guide to using L A TEX

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

Learning LaTeX: The Basics

An Interactive Introduction to L A TEX

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

L A TEX for Psychological Researchers

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

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

Using L A TEX Tom Edgar

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

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

An Introduction to LATEX

Introduction to MCS 220 and L A TEX

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

Introduction to LaTeX. Paul Fodor Stony Brook University

An Introduction to L A T E X

Basics. Options. Commands

Introduction to L A T E X

1 Obtaining LyX and L A TEX

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

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.

Introduction to L A TEX

Introduction to L A TEX

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

Getting Started with L A TEX

Assessments for CS students:

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

INSTALLING AND USING L A TEX

Helen Cameron. A Brief Overview of LATEX

Dec. 27 th, 2010 University of Isfahan

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

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

Mikkel Madsen

Not-So-Frequently Asked Questions for L A TEX

An Introduction to L A TEX

A brief introduction to L A TEX

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

A Brief Introduction to L A TEX

Introduction to L A TEX

Introduction to LATEX

L A TEXInstallation and Introduction

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

Formatting with LaTeX

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

Introduction to L A TEX

An Introduction to L A TEX

VERY VERY SHORT GUIDE TO LATEX

Student Learning Service: Introduction to Latex

Absolute L A TEX Beginner

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

Typing Mathematics. Darrin Doud

Introduzione a LaTex. Fabrizio Messina

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

Latex Tutorial. CIS400 Senior Design 9/5/2013

Introduction to L A TEX

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

LaTeX. Information Literacy II EN(IL2) Course

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

Introduction to L A TEX for MCS-236

MATLAB for the Sciences

Math 291: Lecture 2. Justin A James. Minnesota State University Moorhead web.mnstate.edu/jamesju/

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

L A TEX for psychological researchers

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

Intro to LaTeX Workshop

Learning L A TEX. Patrick Lam

L A TEX for Psychological Researchers

An Introduction to LATEX

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

Lecture 2: Tables, Figures and Formulæ

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

Introduction to L A TEX

Introduction to LATEX

Introduction to L A TEX

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

CSCM10 Research Methodology A Taster of L A TEX

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

Introduction to Computer Science E15 Lab Week 37

Lecture 1: Short summary of LaTeX basics

A Brief Introduction to LaTeX

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

Paul Gartside. March 2, 2013

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

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 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

Getting ready for L A TEX. Alexis Dimitriadis. Version: March 28, 2013

Introduction to L A TEX beamer

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

An Introduction to LATEX

Math 395 Homework #1 Due Wednesday, April 12

1 Different Document Classes

Introduction to Scientific Typesetting Lesson 1: Getting Started

L A TEX and Basic Text Editing

L A TEX E Here s the example of a X

Transcription:

Learn how to [learn] L A TEX November 19, 2010 This document is available at http://web.mit.edu/jgross/ Public/2010cluedump/Slideshow.pdf.

Outline Installing L A TEX What is L A TEX? Getting Help Basic Setup

Outline Installing L A TEX What is L A TEX? Getting Help Basic Setup Good Practices Optional (but useful) packages L A TEX and Math Basic math typsetting Ways to get into math mode A few common math things A few not so common math things

Outline Installing L A TEX What is L A TEX? Getting Help Basic Setup Good Practices Optional (but useful) packages L A TEX and Math Basic math typsetting Ways to get into math mode A few common math things A few not so common math things Things to watch out for Other environments

Outline Installing L A TEX What is L A TEX? Getting Help Basic Setup Good Practices Optional (but useful) packages L A TEX and Math Basic math typsetting Ways to get into math mode A few common math things A few not so common math things Things to watch out for Other environments

L A TEX on Linux Outline Installing LATEX What is LATEX? Getting Help Basic Setup Usually comes preinstalled TEXLive can be downloaded from http://www.tug.org/texlive/ Use your favorite text editor (vim, emacs, etc.), OR Specialized editors for L A TEX, e.g. kile (http://kile.sourceforge.net/) sudo apt-get install kile okular

Installing LATEX What is LATEX? Getting Help Basic Setup L A TEX on Windows protext installs MiKTEX and TEXnicCenter Download from http://www.tug.org/protext/

Installing LATEX What is LATEX? Getting Help Basic Setup L A TEX on Mac MacTEX (http://www.tug.org/mactex/) TEXShop (http://pages.uoregon.edu/koch/texshop/)

What L A TEX is Outline Installing LATEX What is LATEX? Getting Help Basic Setup A typesetting system

Installing LATEX What is LATEX? Getting Help Basic Setup What L A TEX is A typesetting system Aimed at math and text

Installing LATEX What is LATEX? Getting Help Basic Setup What L A TEX is A typesetting system Aimed at math and text Extensible

Installing LATEX What is LATEX? Getting Help Basic Setup What L A TEX is A typesetting system Aimed at math and text Extensible A macro-based Turing complete programming language

What L A TEX is not Outline Installing LATEX What is LATEX? Getting Help Basic Setup A WYSIWYG editor

What L A TEX is not Outline Installing LATEX What is LATEX? Getting Help Basic Setup A WYSIWYG editor A programming language

Installing LATEX What is LATEX? Getting Help Basic Setup Finding Help lshort: This is the biggest beginner help file available on the web for L A TEX. Go to http: //mirror.ctan.org/info/lshort/english/lshort.pdf. Alternatively, Google lshort and it will come up. Google: One of the best help files out there. Google anything you want to accomplish along with L A TEX and you will get something. Unless of course you type "Build a time machine" latex. http://www.ctan.org: Gives the full documentation for any package, the source code, etc. http://detexify.kirelabs.org/classify.html. Slightly more useful for tablets, but useful nonetheless.

Document Structure Outline Installing LATEX What is LATEX? Getting Help Basic Setup \documentclass{document class} preamble \begin{document} document body \end{document}

Document Structure Outline Installing LATEX What is LATEX? Getting Help Basic Setup \documentclass{article} \usepackage{amsmath} \begin{document} Your stuff goes here! \end{document}

Installing LATEX What is LATEX? Getting Help Basic Setup The default given is the article document type, but there are others available: report, book, letter, slides. You can also set options for your document: \documentclass[11pt, letterpaper, landscape, twoside] {article}. Refer to the help files for more details.

Good Practices Optional (but useful) packages Basic math typsetting Guiding Principles I You re not a professional typesetter! Don t override L A TEX s default formatting (including font sizes) unless you have a very good reason for doing so. The default margins are large. It is easier to read papers if there are no more than 80 characters on a line; this is why newspapers have multiple columns. L A TEX (mostly) ignores duplicated white space. If you have two or more returns in a row, this makes a new line. Don t tell L A TEX to make multiple blank lines because it knows how to make things more readable. The one major exception to this rule is math mode.

Good Practices Optional (but useful) packages Basic math typsetting Guiding Principles II Every so often in the source code press enter (to make it readable - about every 80 characters). This won t affect your output because L A TEX doesn t render single line breaks. Use logical structure in your documents. Don t hardcode (too much) formatting into your document; use predefined L A TEX commands (like \subsection{}, etc.). (For advanced L A TEX users) Don t define too many macros, use obscure packages not on CTAN, and do other weird things like that. If you do, publishers won t like you very much.

Optional (but useful) packages Good Practices Optional (but useful) packages Basic math typsetting Packages provided added functionality for your L A TEX code. To include a package use the command \usepackage[(optional) Options]{Package name}. Package name amsmath amssymb amsthm Description Gives an environment for typsetting math formulas. Namely \begin{equation} \end{equation}, among other things. Gives mathematical symbols that may not be built into L A TEX Gives an environment for typing theorems in a standard format

Optional (but useful) packages Good Practices Optional (but useful) packages Basic math typsetting Package name graphicx hyperref geometry enumerate Description Can insert pictures from.jpg,.pdf,.png,.eps, among others using the \includegraphics[(optional) Options]{filename} Lets you make hyperlinks Lets you change the margins Lets you control the enumerate environment for lists and outlines You ll want to load amsmath and amssymb for any sort of math typsetting.

Ways to get into math mode Good Practices Optional (but useful) packages Basic math typsetting As you are typing regular text, put any math mode commands (or math) between $$ like so: $\frac{3}{4}$ (this will look like 3 4 ). This can be inserted right in the middle of text: The answer is $x = 3$. Use the package amsmath and then use \begin{equation}\end{equation} (numbers your lines between the two commands) or \begin{equation*}\end{equation*} (does not number your lines). Place math between \[insert math here\] or $$insert math here$$ to get it centered on a new line.

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 ) 2x+ 1 5

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) )

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) Trig functions: $\cos (\sin x)$ (cos(sin x)) )

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) Trig functions: $\cos (\sin x)$ (cos(sin x)) Summations: $\sum _{i = 0}^5 (ar^n)$ ( 5 i=0 (ar n )) )

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) Trig functions: $\cos (\sin x)$ (cos(sin x)) Summations: $\sum _{i = 0}^5 (ar^n)$ ( 5 i=0 (ar n )) Integrals: $\int _0^{\pi /2}e^x \ln x\,dx$ ( π/2 0 e x ln x dx) )

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) Trig functions: $\cos (\sin x)$ (cos(sin x)) Summations: $\sum _{i = 0}^5 (ar^n)$ ( 5 i=0 (ar n )) Integrals: $\int _0^{\pi /2}e^x \ln x\,dx$ ( π/2 0 e x ln x dx) Square roots and n th roots: $\sqrt {x^2 + 1}$ ( x 2 + 1), $\sqrt [3]{8} = 2$ ( 3 8 = 2) )

A few common math things Good Practices Optional (but useful) packages Basic math typsetting A more exhaustive list can be found through the lshort reference. Fractions: $\frac {1}{4}$ ( 1 4 ), $\frac {1 + \frac {1}{3}}{2x + \frac {1}{5}}$ ( 1+ 1 3 2x+ 1 5 Exponents and subscripts: $x_1^2 + x_2^2 + \cdots + x_{11}^2$ (x1 2 + x 2 2 + + x 11 2 ), $(3x + 7)^{100}$ ((3x + 7) 100 ) Trig functions: $\cos (\sin x)$ (cos(sin x)) Summations: $\sum _{i = 0}^5 (ar^n)$ ( 5 i=0 (ar n )) Integrals: $\int _0^{\pi /2}e^x \ln x\,dx$ ( π/2 0 e x ln x dx) Square roots and n th roots: $\sqrt {x^2 + 1}$ ( x 2 + 1), $\sqrt [3]{8} = 2$ ( 3 8 = 2) Greek letters: $\pi $ (π), $\Omega $ (Ω), $\omega $ (ω) )

Good Practices Optional (but useful) packages Basic math typsetting A few not so common math things Spaces in math mode are tricky. Here are some ways to fix up spaces: Symbol Code Example \! x \! y xy \, x \, y x y \: x \: y x y \; x \; y x y \ x \ y x y \quad x \quad y x y \qquad x \qquad y x y How to box an answer (only in text mode): \framebox[width][position (l, c, r)]{text} For example, Einstein said, E = mc 2!

Things to watch out for Other environments Just a few reminders/cautions: L A TEX is case-sensitive (for the most part), so if you are getting strange compiler errors, check your capitalization. Some characters are only available in math mode (e.g. <, >) Special characters that L A TEX will get angry about: #, $, %, ^, &, _, {, }, ~, \. To typeset these, use this instead: \#, \$, \%, \^{}, \&, \_, \{, \}, \~{}, \textbackslash

The list environment Outline Things to watch out for Other environments Lists: Here are two examples of lists and their output: \begin{itemize} \item Math \item Chemistry \item Physics \end{itemize} Math Chemistry Physics

Another list environment Things to watch out for Other environments \begin{enumerate} \item Math \item Chemistry \item Physics \end{enumerate} 1. Math 2. Chemistry 3. Physics

The tabular environment Things to watch out for Other environments Tables: \begin{tabular}{l cc} Number & Numeral & Roman \\ \hline Five & $5$ & $V$\\ Ten & $10$ & $X$\\ \end{tabular} Number Numeral Roman Five 5 V Ten 10 X

Aligned equations Outline Things to watch out for Other environments Aligned equations: \begin{align} f(x) & = 9y^2-6y \nonumber\\ & = (9y^2-6y + 1) - 1 \nonumber \\ & = (3y - 1)^2-1 \end{align} f (x) = 9y 2 6y = (9y 2 6y + 1) 1 = (3y 1) 2 1 (1)

The section command Things to watch out for Other environments Sections: \section{scientists} \subsection{euler} He knew everything. \subsection{newton} He knew gravity. \section{students} \section{mit Students} \subsubsection*{jason} He knows \LaTeX. \subsubsection*{piper} She s running cluedumps. 1 Scientists 1.1 Euler He knew everything. 1.2 Newton He knew gravity. 2 Students 2.1 MIT Students Jason He knows L A TEX. Piper She s running cluedumps.

graphicx Outline Basics Intermediate Advanced GUI The simplest way is to \usepackage{graphicx} and then \includegraphics{file name}. For example, \begin{center} \includegraphics[height=0.5\textheight]{grumpyfuzzball} \end{center} gives me

Picture Outline \setlength{\unitlength}{0.8cm} \begin{picture}(6,5) \thicklines \put(1,0.5){\line(2,1){3}} \put(4,2){\line(-2,1){2}} \put(2,3){\line(-2,-5){1}} \put(0.7,0.3){$a$} \put(4.05,1.9){$b$} \put(1.7,2.95){$c$} \put(3.1,2.5){$a$} \put(1.3,1.7){$b$} \put(2.5,1.05){$c$} \put(0.3,4){$f= \sqrt{s(s-a)(s-b)(s-c)}$} Basics Intermediate Advanced GUI F = s(s a)(s b)(s c) C a b B A c s := a + b + c 2 \put(3.5,0.4){$\displaystyle s:=\frac{a+b+c}{2}$} \end{picture}

pgf/tikz Outline Basics Intermediate Advanced GUI \begin{tikzpicture}[scale=2] \clip (-0.1,-0.2) rectangle (1.8,1.2); \draw[step=.25cm,gray,very thin] (-1.4,-1.4) grid (3.4,3.4); \draw (-1.5,0) -- (2.5,0); \draw (0,-1.5) -- (0,1.5); \draw (0,0) circle (1cm); \filldraw[fill=green!20!white, draw=green!50!black] (0,0) -- (3mm,0mm) arc (0:30:3mm) -- cycle; \end{tikzpicture}

Geogebra Outline Basics Intermediate Advanced GUI

Geogebra Outline Basics Intermediate Advanced GUI

Geogebra Outline Basics Intermediate Advanced GUI

Basics Intermediate Advanced GUI Geogebra Exports to pgf/tikz, pdf, png, and others. Great for geometrical figures. Allows labeling with (almost) arbitrary LaTeX formulas. Sometimes requires a bit of manual tweaking.

Basics Intermediate Advanced GUI Inkscape + inkscape2tikz + TeXText Great for arbitrary vector graphics. Good when you want to draw a diagram by hand. Doesn t seem to support exporting text as tikz, though TeXText lets you insert LaTeX for export as pdf.

Basics Intermediate Advanced GUI Asymptote Standard for L A TEX diagrams Extraordinarily powerful Requires an extra program to TEX your documents

Basics Intermediate Advanced GUI xfig Good for very large files Old and not very good interface Steep learning curve

Exercises Should take you 2 20 hours Email me if you want help Can be found at http://web.mit.edu/jgross/public/ 2010cluedump/exercises.pdf

Thank You Thank You!