become a l a t ex guru math mode
play

Become a L A T EX Guru - Math Mode Jason Gross 13 Week 2 - - PowerPoint PPT Presentation

L A T EX Modes Become a L A T EX Guru - Math Mode Jason Gross 13 Week 2 - Saturday, April 24, 2010 Jason Gross 13 Become a L A T EX Guru - Math Mode L A T EX Modes 1. Log in using the username sipb2 and the password


  1. L A T EX Modes Become a L A T EX Guru - Math Mode Jason Gross ’13 Week 2 - Saturday, April 24, 2010 Jason Gross ’13 Become a L A T EX Guru - Math Mode

  2. L A T EX Modes 1. Log in using the username sipb2 and the password hsspMONSTER 2. Once you are logged on, type sudo apt-get install kile okular in the terminal and press enter. 3. When prompted for a password, type the password you used to log on (in this case, hsspMONSTER ) and press enter. Do not worry if the password does not show up as you type it. 4. When it asks you if you want to continue, type y and press enter. 5. When it is finished installing, type kile in the terminal, and press enter. 6. Find the file that you saved last class (on the desktop), and open it. Jason Gross ’13 Become a L A T EX Guru - Math Mode

  3. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Text Mode ◮ Text mode is the standard L A T EX mode. ◮ Lets you type things like “text”. ◮ If you try to type something like \alpha , ^ or other math mode things, L A T EX complains and tells you ! Missing $ inserted. <inserted text> $ Jason Gross ’13 Become a L A T EX Guru - Math Mode

  4. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Math Mode ◮ Math mode lets you typeset mathematics, like α 2 + β 2 = γ 2 . ◮ Most things you do in text mode can be done in math mode without L A T EX complaining. ◮ A few things will only work in text mode. ◮ \’a gives ´ a in text mode, but $\’a$ gives LaTeX Warning: Command \’ invalid in math mode on input line line number . ◮ (Almost) all spaces in math mode are ignored. ◮ Exception: If you want α a , you have to type $\alpha a$ (or $\alpha a$ (or $\alpha a$ (or . . . ))), not $\alphaa$ . ◮ If you don’t like this, you can instead type something like $\alpha{}a$ or ${\alpha}a$ . Jason Gross ’13 Become a L A T EX Guru - Math Mode

  5. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Math Mode ◮ (Almost) all spaces in math mode are ignored. ◮ If you type $Hi, my name is Jason.$ , you will get Hi , mynameisJason . ◮ You can escape your spaces: $Hi,\ my\ name\ is\ Jason.$ gives Hi , my name is Jason . ◮ You can get from math mode to text mode with \text : $\text{Hi, my name is Jason.}$ gives Hi, my name is Jason. ◮ If you just want an upright (roman) character, use \rm : $\alpha \ne a = \rm a \ne \alpha$ gives α � = a = a � = α Jason Gross ’13 Become a L A T EX Guru - Math Mode

  6. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Grouping Grouping - {} groups things. ◮ $a^10$ gives a 1 0, $a^{10}$ gives a 10 . ◮ Empty arguments: \LaTeX Guru gives L A T EXGuru, \LaTeX{} Guru and {\LaTeX} Guru give L A T EX Guru. ◮ $a = {\rm a} = a$ gives a = a = a . Jason Gross ’13 Become a L A T EX Guru - Math Mode

  7. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Entering Math Mode x i ◮ $\sum_i \frac{x^i}{i!}$ gives � i ! . \( stuff \) i works the same way. ( stuff ) ◮ $stuff$ is (almost) the same as \begin{math}stuff\end{math} . This is the math environment . ◮ $$\sum_i \frac{x^i}{i!}$$ gives x i � i ! i ◮ $$stuff$$ is (almost) the same as \begin{displaymath}stuff\end{displaymath} . Jason Gross ’13 Become a L A T EX Guru - Math Mode

  8. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations Entering Math Mode ◮ The equation environment gives numbered equations: x i � (1) i ! i ◮ You can \tag your equations: \begin{equation} E = mc^2 \tag{Einstein} \end{equation} gives E = mc 2 (Einstein) ◮ The equation* environment is like $$ (unnumbered equations, large spaces) ◮ \[stuff\] is (almost) the same as \begin{equation*}stuff\end{equation*} Jason Gross ’13 Become a L A T EX Guru - Math Mode

  9. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations multiline \begin{multline} a + b + c + d + e + f + g + h + i a + b + c + d + e + f + g + h + i \\ = j + k + l + m + n = j + k + l + m + n (2) \end{multline} Jason Gross ’13 Become a L A T EX Guru - Math Mode

  10. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations eqnarray \begin{eqnarray} a & = & b + c \\ & = & d + e + f + g + h + i = b + c (3) a \nonumber \\ = d + e + f + g + h + i && {} + m + n + o \\ + m + n + o (4) & = & p + q + r + s = p + q + r + s (5) \end{eqnarray} \begin{eqnarray} a & = & a = a = a = a (6) \end{eqnarray} a Bad! 1 1 See www.tug.org/pracjourn/2006-4/madsen/madsen.pdf on more reasons why eqnarray is bad. Jason Gross ’13 Become a L A T EX Guru - Math Mode

  11. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations align \begin{align} a & = b + c \\ a = b + c (7) & = d + e \end{align} = d + e (8) Jason Gross ’13 Become a L A T EX Guru - Math Mode

  12. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations align \begin{align} a & = b + c \\ & = d + e + f + g + h + i a = b + c (9) + j + k + l \nonumber \\ = d + e + f + g + h + i + j + k + l & + m + n + o \\ + m + n + o (10) & = p + q + r + s = p + q + r + s (11) \end{align} Jason Gross ’13 Become a L A T EX Guru - Math Mode

  13. Text Mode Math Mode L A T EX Modes Grouping Getting into math mode Long Equations align \begin{align} a = {} & b + c \\ = {} & d + e + f + g + h + i a = b + c (12) + j + k + l \nonumber \\ = d + e + f + g + h + i + j + k + l & + m + n + o \\ + m + n + o (13) = {} & p + q + r + s = p + q + r + s (14) \end{align} Jason Gross ’13 Become a L A T EX Guru - Math Mode

Recommend


More recommend