Name: Practice LATEX Worksheet 1) The enumerate package allows you to make lists. You can index your list with numbers, or letters. The environment is: \begin{enumerate}[a)] \item I really enjoy doing mathematics. \item Colorado is my favorite state. \item I am helping with the \LaTeX~seminar! \end{enumerate} Here are a few facts about myself: a) I really enjoy doing mathematics. b) Colorado is my favorite state. c) I am helping with the LATEX seminar! 2) We can use display math to have equations that look really nice. $$ \sum_{j=1}^{\infty} \dfrac{1}{j^2} = \dfrac{\pi}{6} $$ ∞ X π 1 = 2 j 6 j=1 We can also add tags, and labels, so that we can reference equations later. \begin{equation} \label{sum} \sum_{j=1}^{\infty} \dfrac{1}{j^2} = \dfrac{\pi}{6} \end{equation} ∞ X 1 π = 2 j 6 j=1 (1) You should really know all about (1). (Use \ref{sum}). We can also make sub equations, eqnarray aligns your equalities: \begin{subequations} \begin{eqnarray} \sin \left( \frac{\pi}{6} \right) &=& \frac{\sqrt{3}}{2} \label{eqn:sine} \\ \cos \left( \frac{\pi}{6} \right) &=& \frac{1}{2} \label{eqn:cosine} \end{eqnarray} \label{eqn:trig} \end{subequations} sin π = 6 π cos = 6 √ 3 2 1 2 The sine equation, (2a), and the cosine equation, (2b), are grouped together via equation (2). 1 (2a) (2b) What about piecewise functions? \begin{equation} f(x) = \begin{cases} ~x^2 & \text{if $x > 0$}\\ -x & \text{ if $x \leq 0$} \end{cases} \end{equation} ( f (x) = x2 −x if x > 0 if x ≤ 0 The align environment also makes it easy to line up your equalities. You can remove tags by using align∗ . \begin{align*} f(x) &= x^2 + 5x + 6 \\ &= (x+2)(x+3) \end{align*} f (x) = x2 + 5x + 6 = (x + 2)(x + 3) 3) We can also make itemized lists \begin{itemize} \item[$2)$] First item in the list \item[$3)$] Second item \item[$1)$] and so on \item[$\cdot$] And we can change the symbols. \item To all sorts of things. \item[$\approx$] Like this \end{itemize} 2) First item in the list 3) Second item 1) and so on · And we can change the symbols. • To all sorts of things. ≈ Like this 4) We can make tables in LATEX! \begin{center} \begin{tabular}{|c|c|c|} \hline Go & Buffs & Go \\ \hline \hline 1 & 2 & 3 \\ \hline a & b & c \\ \hline \end{tabular} \end{center} 2 (3) Go 1 a Buffs 2 b Go 3 c 5) We can also label our theorems to reference later. Add \newtheorem{thm}{Theorem} to your header. Here is a cool theorem: \begin{thm} \label{student} New grad students are better than undergraduates. \end{thm} Theorem 1 New grad students are better than undergraduates. I am not sure that Theorem 1 \ref{student} is true. 6) If you want to leave white space there are a few commands that will be helpful • horizontal Spacing: \hspace{0.5in} • vertical Spacing: \vspace{2in} • Horizontal filling: \hfill • Vertical filling:\vfill • New Page: \newpage • No Page Numbers: \pagenumbering{gobble} 7) Often we want to use “Blackboard Bold” characters, and subset notation, we use the commands: \mathbb{ } \subset \subseteq If you type: $$\mathbb{N}~\subseteq~\mathbb{Z}~\subset~\mathbb{Q}~\subseteq~\mathbb{R}~\subset~\mathbb{C}$$ You get: N ⊆ Z ⊂ Q ⊆ R ⊂ C 8) What about matrices? $$ \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} ~~ \begin{vmatrix}1 & 2 \\ 3 & 4 \end{vmatrix} ~~ \begin{bmatrix} 1 & 2 \\\ 3 & 4 \end{bmatrix}$$ 1 3 1 3 2 4 2 4 1 3 2 4 Other options for creating matrices exist... For example, \[\left< \begin{array}{c c} 1 & 2 \\ 3 & 4 \end{array} \right>\] 1 3 2 4 $$ is equivalent to \[ and \]; also you can use other grouping symbols with \left and \right, such as ( ), [ ], | |. 3 9) It will make your life easier to define some new commands: Type this in the header: \newcommand{\pd}[2] {\frac{\partial{#1}}{\partial{#2}}} Now when you type $\pd{y}{x}$ you will get: ∂y ∂x 10) Basic Include Graphics: Be sure to have the picture in the same directory as your TEX file. \begin{center} \includegraphics[height = 2in]{Fano.png} \end{center} 11) Basics of Beamer (a) Instead of using \documentclass{article}, you will use \documentclass{beamer}. (b) Many elements will be the same, however, you need to decide when to begin and end each frame. Simply type \begin{frame} and \end{frame} for each new frame. (c) There are other subtle options for having things stay hidden until you click, using images that overlay on each other, etc. If you are interested in a Beamer style that matches the CU-Denver powerpoint style, you can download what you need from Henc’s website: www.math.ucdenver.edu/∼hbouwmee/resources.php Homework: Get Henc’s template and mess around with beamer. 4