a mathematical introduction to latex
play

A Mathematical Introduction to LaTeX CUMC CC EM 2013, Montr eal, - PowerPoint PPT Presentation

A Mathematical Introduction to LaTeX CUMC CC EM 2013, Montr eal, Qu ebec Elana Hashman 1 Who? From? University of Waterloo When? July 13, 2013 1 French Translations by David McLaughlin Table of contents Introduction History


  1. A Mathematical Introduction to LaTeX CUMC – CC´ EM 2013, Montr´ eal, Qu´ ebec Elana Hashman 1 Who? From? University of Waterloo When? July 13, 2013 1 French Translations by David McLaughlin

  2. Table of contents Introduction History Setting up My first document Into the Code Document layout Templates Proof by example For T EX experts Some fun tricks Macros and Custom Environments Graphics Questions

  3. A Brief History of L A T EX T EX is almost certainly older than you. “T EX” developed by Don Knuth in 1978 Pronounced “tech”, from Greek τεχνη Markup language, like HTML L A T EX was derived from T EX by Leslie Lamport in 1985 Idea: Focus on content while L A T EX takes care of the presentation for you

  4. Get the software L A T EX is free, platform-independent software. pdflatex package for OS X/UNIX-based platforms LyX for WYSIWYG: http://www.lyx.org Online: http://scribtex.com

  5. My first document Hello, world!

  6. Code for my first document L A T EX code: \documentclass{article} \begin{document} Hello, world! \end{document} Contrast with a similar HTML document: <html> <body> Hello, world! </body> </html>

  7. Document Layout Document type 1 ◦ article ◦ beamer (slides) ◦ report Preamble (header) 2 ◦ Include packages ◦ Set spacing ◦ Declare macros, commands Body (content) 3

  8. Sample templates See http://hashman.ca/tex for article.tex , report.tex , and slides.tex sample templates. This gives you some sample preamble information and templates for your use.

  9. \ begin { document } Squeeze Theorem. Let ( x n ), ( y n ) and ( z n ) be sequences in R . Suppose ( x n ) → L , ( z n ) → L , and for all n ≥ n 0 , we have x n ≤ y n ≤ z n ; then ( y n ) → L . Proof. Let ε > 0. Since ( x n ) → L , there is some integer n 1 such that ∀ n ≥ n 1 , we have | x n − L | < ε . Similarly, for the same ε , since ( z n ) converges, ∃ n 2 ∈ N such that ∀ n ≥ n 2 , we have | z n − L | < ε . Then take N = max( n 0 , n 1 , n 2 ), and let n ≥ N . For all n ≥ N , we must have L − ε < x n ≤ y n ≤ z n < L + ε which implies | y n − L | < ε . So ( y n ) converges to L .

  10. Squeeze Theorem Code, I { \bf Squeeze Theorem. } Let ✩✭①❴♥✮✩ , ✩✭②❴♥✮✩ and ✩✭③❴♥✮✩ be sequences in ✩ \mathbb { ❘ } ✩ . Suppose ✩✭①❴♥✮ \to ▲✩ , ✩✭③❴♥✮ \to ▲✩ , and for all ✩♥ \ge ♥❴✵✩ , we have ✩①❴♥ \le ②❴♥ \le ③❴♥✩ ; then ✩✭②❴♥✮ \to ▲✩ .

  11. Squeeze Theorem Code, II \begin { proof } Let ✩ \epsilon ❃ ✵✩ . Since ✩✭①❴♥✮ \to ▲✩ , there is some integer ✩♥❴✶✩ such that ✩ \forall ♥ \ge ♥❴✶✩ , we have ✩⑤①❴♥ ✲ ▲⑤ ❁ \epsilon ✩ .\\[2mm] Similarly, for the same ✩ \epsilon ✩ , since ✩✭③❴♥✮✩ converges, ✩ \exists ♥❴✷ \in \mathbb { ◆ } ✩ such that ✩ \forall ♥ \ge ♥❴✷✩ , we have ✩⑤③❴♥ ✲ ▲⑤ ❁ \epsilon ✩ .\\[2mm]

  12. Squeeze Theorem Code, III Then take ✩◆ ❂ \max ✭♥❴✵✱ ♥❴✶✱ ♥❴✷✮✩ , and let ✩♥ \ge ◆✩ . For all ✩♥ \ge ◆✩ , we must have ❭❬ ▲ ✲ \epsilon ❁ ①❴♥ \le ②❴♥ \le ③❴♥ ❁ ▲ ✰ \epsilon ❭❪ which implies ✩⑤②❴♥ ✲ ▲⑤ ❁ \epsilon ✩ . So ✩✭②❴♥✮✩ converges to ✩▲✩ . \end { proof }

  13. Terminology Control characters: $ % # & ^ { } , etc. Command: sequence beginning with ‘\’ , e.g. \bf or \mathbb { R } Environment: section delimited by commands, with special properties, e.g. \begin { proof } and \end { proof } Math mode: delimited by $’s

  14. Common math mode commands Display L A T EX code x i +1 x^{i+1} 1 \frac{1}{2} 2 √ b 2 − 4 ac \sqrt{b^2-4ac} ln e \ln{e} n →∞ ( x n ) lim \lim_{n\to\infty} (x_n) cos (2 π n ) \cos{(2{\pi}n)} n � s i b i \sum_{i=1}^n s_i b_i i =1

  15. Common math mode commands, continued Display L A T EX code 10 ≡ 3 (mod 7) 10 \equiv 3 \pmod{7} � b f ( x ) dx \int_a^b f(x)\,dx a P \mathcal{P} τ ε χ \tau \epsilon \chi A ∩ B � = ∅ A \cap B \ne \varnothing β = { v 1 , . . . , v n } \beta = \{v_1, \ldots, v_n\} f : S → R f \colon S \to \mathbb{R}

  16. Tricks for L A T EX veterans! DON’T ...use arrays for matrices. Use a matrix environment. ...forget about the ‘*’ commands. ...let people tell you you’re using L A T EX “wrong.” ...be afraid to write macros to make your code shorter. DO ...use a good text editor. ...be willing to learn all the time. The learning curve is steep but your speed improves quickly. ...use Google (or your search engine of choice). It is your friend. ...use L A T EX for your assignments. More legible work means TAs are more forgiving on marking!

  17. Macros and Other User-Defined Objects R : \mathbb { R } vs. \R dim( V ): \operatorname { dim } vs. \dim � P ( e x ): \overline { \int } vs. \uint ⊆ : \subseteq vs. \ss Centering math in enumerate environment without moving the numbers Question counters Using the provided document structuring commands to easily generate a table of contents, title page, etc. My take on this can be found in the macros.sty file on my website.

  18. TiKZ and Other Graphics Packages Graphs a � �� � Diagrams ✛ ✲ b − r b + r b

  19. fin. More resources: My website: http://hashman.ca/tex Wikibooks’ L A T EX guide: http://en.wikibooks.org/wiki/LaTeX David Wilkins’ Primer: http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/ Random math grad students, particularly when fretting over their theses

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend