LaTeX Part 2

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

  • + awv7t awv7t 9 months ago
    You have found one of several typos in the presentation which I have not yet corrected. There should be a back-slash in front of 'end{displaymath}'. I am working on an updated version of this which will hopefully take care of all of those typos.
  • + meehan.kevin Kevin Meehan 10 months ago
    On slide 13/60, is the displaymath command correct? Or should it be ' \begin{display math} ...\end{displaymath} ' ?
Post a comment
Embed Video
Edit your comment Cancel

1 Favorite & 1 Group

LaTeX Part 2 - Presentation Transcript

  1. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources An Intro to Latex Part II An introduction to creating a Latex document Aubry W. Verret Brown Science and Engineering Library Research Computing Lab November 11, 2008
  2. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Outline I Notes Footnotes Marginal Notes Endnotes Mathematics in LaTeX Math Environment Math Symbols Tables Table Features How to Create Tables Example of Table Table Resources Graphics Graphicx Package
  3. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Outline II Allowed Formats Includegraphics Command Graphicx Examples Including Plots Figures Including and Formatting Figures Captions Example of Figure Making Presentations in LaTeX Packages Using Beamer Creating a Slide Hyperlinks Overlays
  4. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Outline III Acquiring Beamer Resources
  5. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Footnotes You can include footnotes in your document by using the command \\footnote[number]{text} 3 This is the third footnote
  6. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Footnotes You can include footnotes in your document by using the command \\footnote[number]{text} The footnote is automatically placed at the bottom of the page and is automatically given a number. 3 This is the third footnote
  7. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Footnotes You can include footnotes in your document by using the command \\footnote[number]{text} The footnote is automatically placed at the bottom of the page and is automatically given a number. You can override the automatic numbering by using the optional [number] portion of the footnote command. 3 This is the third footnote
  8. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Footnotes You can include footnotes in your document by using the command \\footnote[number]{text} The footnote is automatically placed at the bottom of the page and is automatically given a number. You can override the automatic numbering by using the optional [number] portion of the footnote command. Example: \\footnote[3]{This is the third footnote} 3 This command produces this footnote. 3 This is the third footnote
  9. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Marginal Notes You can also include margin notes in your document. Use the \\marginpar[left]{righttext} command If you only specify the required command righttext then the margin note placement goes as follows: • On the right for single sided documents • On the outside margin for doublesided documents If you use the optional [left] argument then the note will go on the left. Example: \\marginpar[left]{Here is a margin note.}
  10. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Endnotes Endnotes require the use of the endnote package. Include it in the preamble of your document with the \\usepackage{endnote} command. To create an endnote just use the \\endnote{text} command Finally, include this command at the end of your document where you want the endnotes to appear \\theendnotes
  11. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Math Environments In order to typeset mathematical formulae, you must put LaTeX into math mode. There are four different types of math mode: • Math environment - Short in-line equations • Displaymath environment - Numbered equations set apart in the text • Eqnarray Environment - Sequences of equations or very long equations • Equation environment - Centered equations
  12. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources You can achieve these modes by using the following commands: Math environment - • \\begin{math}...\\end{math • \\(...\\) • $...$
  13. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources You can achieve these modes by using the following commands: Math environment - • \\begin{math}...\\end{math • \\(...\\) • $...$ Displaymath environment - • \\begin{displaymath)...end{displaymath} • \\[...\\] • $$...$$
  14. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources You can achieve these modes by using the following commands: Math environment - • \\begin{math}...\\end{math • \\(...\\) • $...$ Displaymath environment - • \\begin{displaymath)...end{displaymath} • \\[...\\] • $$...$$ Eqnarray environment - • \\begin{eqnarray[*]}...\\end{eqnarray[*]}
  15. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources You can achieve these modes by using the following commands: Math environment - • \\begin{math}...\\end{math • \\(...\\) • $...$ Displaymath environment - • \\begin{displaymath)...end{displaymath} • \\[...\\] • $$...$$ Eqnarray environment - • \\begin{eqnarray[*]}...\\end{eqnarray[*]} Equation environment - • \\begin{equation}...\\end{equation}
  16. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Math symbols There are many symbols involved in typesetting simple and complicated mathematical formulae. LaTeX is equipped to typeset everything from simple to high level mathematics. Example (Ampere’s Circuit Law): ∂ΦE ,S B· dl = µo IS + µo o ∂t ∂S Code: $$\\oint_{\\partial S}B\\cdotp dl = \\mu_o I_S + \\mu_o \\epsilon_o \\frac{\\partial \\Phi_{E, S}}{\\partial t} $$
  17. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example (Matrices):      a11 a12 · · · a1n x1 0  a21 a22 · · · a2n x2 0    =     . . . . . .. . . . . .   . . . . . .    an1 an2 · · · ann xn 0 Code: $$\\left[ \\begin{array}{cccc} a_{11} & a_{12} & \\cdots & a_{1n} \\\\ a_{21} & a_{22} & \\cdots & a_{2n} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ a_{n1} & a_{n2} & \\cdots & a_{nn} \\end{array} \\right] \\left[ \\begin{array}{c} x_1 \\\\ x_2 \\\\ \\vdots \\\\ x_n \\end{array} \\right] = \\left[ \\begin{array}{c} 0 \\\\ 0 \\\\ \\vdots \\\\ 0 \\end{array} \\right]$$
  18. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example (Taylor Series): ∞ f n (a) (x − a)n n! n=0 Code: $$\\sum^{\\infty}_{n=0} \\frac{f^{n}(a)}{n!}(x - a)^n$$ Example (DeMorgan’s Law): ¬(p ∨ q) ⇐⇒ (¬p) ∧ (¬q) Code: $$\\neg (p \\vee q) \\Longleftrightarrow (\\neg p) \\wedge (\\neg q) $$
  19. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Features Aside from these examples, LaTeX provides symols for everything you need to typeset mathematics including: • binary operators • Greek symbols • logical operators • set notation • trig functions • delimiters You can look up any mathematical command on google. The following link is helpful: http://web.ift.uib.no/Fysisk/Teori/KURS/WRK/TeX/ symALL.html
  20. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Amsmath Package If you use mathematics heavily in your documents, you might consider using the amsmath package. It provides some enhancements to the normal LaTeX math capabilities which make typesetting formulas easier and more attractive. Go here for more info: http://www.ams.org/tex/amslatex.html
  21. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Tables You can use LaTeX to create tables for your document. They are highly customizable and can be simple or complex. With LaTeX you can: • Easily format columns and Rows • Customize the lines that separate columns and rows • Control table size
  22. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Tables must be created within the Tabular environment. \\begin{tabular[alignment]{columns}...\\end{tabular}
  23. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Tables must be created within the Tabular environment. \\begin{tabular[alignment]{columns}...\\end{tabular} Here are examples of parameters for the columns argument: • l - left justified column • c - centered column • r - right justified column • - vertical line
  24. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Tables must be created within the Tabular environment. \\begin{tabular[alignment]{columns}...\\end{tabular} Here are examples of parameters for the columns argument: • l - left justified column • c - centered column • r - right justified column • - vertical line The [alignment] argument is optional. The options are: • b - bottom • c - center • t - top
  25. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources To form the table, separate each element with a & sign and each row with \\ \\
  26. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources To form the table, separate each element with a & sign and each row with \\ \\ a b c d e f g h Example: i j k l m n o p Code: \\begin{tabular}{|c|c|c|c|} \\hline a & b & c & d \\\\ e & f & g & h \\\\ i & j & k & l \\\\ m & n & o & p \\\\ \\hline \\end{tabular}
  27. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example: Iteration k of f (xn ) k k k k x1 x2 x3 remarks 0 -0.3 0.6 0.7 - 1 0.47102965 0.04883157 -0.53345964 δ< 2 0.49988691 0.00228830 -0.52246185 δ<ε 3 0.49999976 0.00005380 -0.523656 N 4 0.5 0.00000307 -0.52359743 . . . .. . . . . . . . δ < 10−8 7 0.5 0.0 -0.52359878 Find code here: http://amath.colorado.edu/documentation/LaTeX/ reference/tables/
  28. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources You can find a number of other examples plus code here: http://en.wikibooks.org/wiki/LaTeX/Tables http://amath.colorado.edu/documentation/LaTeX/ reference/tables/
  29. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Including Graphics LaTeX is able to manage graphics via an external package called graphicx. To use graphicx you must include the package in the preamble of your document. \\usepackage{graphicx} The graphicx package allows you too: • Use several different file formats • Scale or specify dimensions of the image • Crop the image • Rotate the image
  30. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Allowed Formats If you compile with latex you can only use the EPS image format. If you compile with pdflatex you can use the following formats: • JPG • PNG • PDF
  31. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Includegraphics Command Use this command to include a graphic in your document: \\includegraphics[dimension]{file} The optional [dimension] argument can include several different options including: • width and height • scale • angle • trim
  32. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example of Graphicx \\includegraphics[width=6cm, height=4cm]{flower.jpg}
  33. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example of Graphicx \\includegraphics[scale = .05]{flower.jpg}
  34. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example of Graphicx \\includegraphics[scale=.05, angle=45]{flower.jpg}
  35. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Importing Plots It is also possible to import plots from other programs such as Matlab or Maple into your document. You just need to export the plot as a .eps file, or if you are using pdflatex you can export it as a .jpg. Then include the plot in your document using the includegraphincs command.
  36. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Including Figures LaTeX provides a way to include figures in your document. You must use the figure environment. \\begin{figure}...\\end{figure} LaTeX will insert the figure into your document wherever it seems best, but there are a few optional commands that you can use with the figure environment: • h - put figure here • t - put figure at top of page • b - put figure at bottom of page • p - put figure on separate page
  37. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example: \\begin{figure}[h] You can also include captions with your figures by using the command \\caption{text} LaTeX will automatically number your figures and update a List of Figures page in the ToC each time you add new figure to your document. Example: \\begin{figure} \\centering \\includegraphics{filename} \\caption{This is a figure} \\end{figure}
  38. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Example Figure \\begin{figure} \\centering \\includegraphics{flower} \\caption{Photo of a purple flower} \\end{figure} Figure: Photo of a purple flower
  39. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Slide Presentations in LaTeX You can use LaTeX to make professional looking presentations. There are several packages for doing so including: • Beamer • Prosper • Ppower4
  40. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Slide Presentations in LaTeX You can use LaTeX to make professional looking presentations. There are several packages for doing so including: • Beamer • Prosper • Ppower4 The Beamer class allows you to easily create professional looking presentations that are • Easily customized • Capable of displaying sophisticated mathematics • Capable of containing overlays • Easily converted to handouts • Display independent of operating system
  41. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Using Beamer In order to use the Beamer Class you must use it as the documentclass option in the preamble: \\documentclass[style]{beamer} In the optional [style] command you can specify a number of different styles. If you exclude the command, then Beamer will use a default style. Go here for examples of Beamer styles: http://mike.depalatis.net/beamerthemes/
  42. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Creating a Slide To create slides using Beamer you must use the frame environment. \\begin{frame}[options]...\\end{frame}
  43. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Creating a Slide To create slides using Beamer you must use the frame environment. \\begin{frame}[options]...\\end{frame} The [options] parameter can be used to specify a number of features: • fragile or containsverbatim will allow you to include verbatim text on the slide using the verbatim pakage • allowframebreaks will allow Beamer to create extra slides to accommodate overflow text • shrink will shrink contents to fit onto one slide
  44. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Sample Frame Code Here is the code for a basic frame: \\section{} \\subsection{} \\begin{frame} \\frametitle{This is the title} Contents... end{frame}
  45. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Hyperlinks Beamer allows you to create links between slides. For example: Jump to next slide
  46. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Target Frame This is the target frame.
  47. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Target Frame This is the target frame. To create a hyperlink you must include the hyperref package in the preamble. Then you must use the following code: \\hyperlink{target_label}{\\beamergotobutton{text}} The target label argument specifies the label you have given to the target slide and can say anything you want. You must label the target slide as follows: \\begin{frame}[label=target_label]
  48. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Overlays Beamer allows you to create overlays in your slide presentations. The overlays can be simple or intricate. Here is an example of a very simple overlay:
  49. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Overlays Beamer allows you to create overlays in your slide presentations. The overlays can be simple or intricate. Here is an example of a very simple overlay: • First item
  50. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Overlays Beamer allows you to create overlays in your slide presentations. The overlays can be simple or intricate. Here is an example of a very simple overlay: • First item • Second item
  51. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Overlays Beamer allows you to create overlays in your slide presentations. The overlays can be simple or intricate. Here is an example of a very simple overlay: • First item • Second item • Third item
  52. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Overlays Beamer allows you to create overlays in your slide presentations. The overlays can be simple or intricate. Here is an example of a very simple overlay: • First item • Second item • Third item You can create this overlay by inserting the pause command after each item in the list. Code: \\begin{itemize} \\item First item \\pause \\item Second item \\pause \\item Third item \\pause \\end{itemize}
  53. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Examples Example: The following overlay can be created using this code \\only<1>{First}\\only<2>{Second}\\only<3>{Third} First Example: The following overlay can be created using this code \\alt<5>{I am here}{I am not here} I am not here
  54. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Examples Example: The following overlay can be created using this code \\only<1>{First}\\only<2>{Second}\\only<3>{Third} Second Example: The following overlay can be created using this code \\alt<5>{I am here}{I am not here} I am not here
  55. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Examples Example: The following overlay can be created using this code \\only<1>{First}\\only<2>{Second}\\only<3>{Third} Third Example: The following overlay can be created using this code \\alt<5>{I am here}{I am not here} I am not here
  56. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Examples Example: The following overlay can be created using this code \\only<1>{First}\\only<2>{Second}\\only<3>{Third} Example: The following overlay can be created using this code \\alt<5>{I am here}{I am not here} I am not here
  57. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources More Examples Example: The following overlay can be created using this code \\only<1>{First}\\only<2>{Second}\\only<3>{Third} Example: The following overlay can be created using this code \\alt<5>{I am here}{I am not here} I am here
  58. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Acquiring Beamer In order to use the Beamer class you must first install it. You can download it here: http://sourceforge.net/projects/latex-beamer/
  59. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Where to get Help There are several different resources for learning LaTeX Books: • LaTeX Concisely by Adrian Johnstone • The LaTeX Companion by Michel Goossens • A Guide to LaTeX by Melmut Kopka • LaTeX For Scientists and Engineers by David J. Buerger • The LaTeX Graphics Companion • The LaTeX Web Companion
  60. Notes Mathematics in LaTeX Tables Graphics Figures Making Presentations in LaTeX Resources Online: There are numerous online tutorials and user guides for LaTeX, specific commands, packages, etc. The Research Computing Lab: You can send questions to me through our ticket system http: //www2.lib.virginia.edu/brown/rescomp/help/index.html
SlideShare Zeitgeist 2009

+ awv7tawv7t Nominate

custom

3373 views, 1 favs, 1 embeds more stats

This is the second part of a two part tutorial desi more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 3373
    • 3368 on SlideShare
    • 5 from embeds
  • Comments 2
  • Favorites 1
  • Downloads 19
Most viewed embeds
  • 5 views on http://goinggnu.wordpress.com

more

All embeds
  • 5 views on http://goinggnu.wordpress.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories

Groups / Events