12.07.2015 Views

LaTeX Math Mode

LaTeX Math Mode

LaTeX Math Mode

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Equations (II)Equation over multiple lines: 'eqnarray'Two alignment points, set with '&'Terms are aligned right in the first part, centered in themiddle, and aligned to the left on the last partNewline command: '\\'\begin{eqnarray}x_{k+1} & = & x_k + \Phi(t_k, x_k) \nonumber \\~ & = & x_k + h \cdot f(t_k, x_k) \\~ & = & x_k + h \cdot \lambda \cdot e^{x_k}\end{eqnarray}<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Equations (III)AMS Multiple Equations:There are several environments for equations defined inAMS<strong>Math</strong>: align, flalign, split, multiple, ...\begin{align}x_{k+1} & = x_k + \Phi(t_k, x_k) \nonumber \\& = x_k + h \cdot f(t_k, x_k) \\& = x_k + h \cdot \lambda \cdot e^{x_k}\end{align}Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 7Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 8Arrays<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Arrays (I)Rectangular environments with individual cells, like tablesCell-divisor: '&'Row/Line-divisor: '\\'Horizontal alignment in each column: r(ight), c(enter), l(eft)Alignment specifier determines number of columns!The number must not be exceeded!\begin{equation}\begin{array}{lcr}a & = & 1 \\b+c & = & 2 \\d & = & a + b\end{array}\end{equation}Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 9Matrices<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Arrays (II)Matrices can be built from Arrays by adding parenthesesParentheses on the left side are introduced with '\left', on theright side with '\right':Normal parentheses: \left(\right)Curly parentheses (must be escaped!): \left\{Brackets (must not be escaped!): \left[ \right]Invisible: \left. \right.\right\}Of course, closing parentheses can be used an the left andopening parentheses on the right side:\left)\right[Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 10<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Arrays (III)\begin{equation}\left(\begin{array}{ccc}a_{1,1} & a_{1,2} & \ldots \\a_{2,1} & a_{2,2} & \ldots \\\vdots & \vdots & \ddots\end{array}\right)\end{equation}\begin{equation}|x| :=\left\{\begin{array}{rl}-x & \text{if } x < 0 \\x & \text{if } x \geq 0\end{array}\right.\end{equation}Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 11AMS Matrices:<strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> – Arrays (IV)The AMS<strong>Math</strong> Package defines several matrix types, e.g.:matrix → no delimiterspmatrix → round parenthesesbmatrix → bracketsVmatrix → double vertical linesColumns Alignments can be omitted.\begin{equation}\begin{pmatrix}4 & -1 & 0 \\-1 & 4 & -1 \\0 & -1 & 4\end{pmatrix}\end{equation}Publishing / <strong>LaTeX</strong> <strong>Math</strong> <strong>Mode</strong> Slide 12


German Umlaute\usepackage[german]{babel}„deutsche Anführungszeichen”Umlaute: \”a , \”A , \”o , \”O , \”u , \”UScharfes-S: \ss\usepackage{german}\usepackage{ngerman}Umlaute: ”a , ”A , ”o , ”O , ”u , ”UScharfes-S: ”s\usepackage[latin1]{inputenc}ä , Ä , ö , Ö , ü , Ü , ßPublishing / <strong>LaTeX</strong> Slide 13\documentclass[a4paper,11pt]{dinbrief}\usepackage{ngerman}\usepackage[T1]{fontenc}\usepackage[latin1]{inputenc}\begin{document}Example: dinbrief (I)%%%\subject{Betreff-Vermerk des Briefes}\backaddress{Die Rücksendeadresse oben im Anschriftfenster}\signature{die gedruckte Unterschrift,über der man i.d.R. per Hand unterzeichnet}\Datum{ \today }\address{Name des Absenders \\ Straße \\ Postleitzahl und Ort des Absenders}%%%%%% Dies ist übrigens ein Befehl: \begin{letter}{Adresse}\begin{letter}{Anschriftfeld: Name \\ Straße \par PLZ-Ort}\opening{Anrede: Sehr geehrte Damen und Herren,}hier kommt der Text!\closing{Grußformel: Mit freundlichen Grüßen}\encl{Die Anlage}\end{letter}%%%\end{document}Publishing / <strong>LaTeX</strong> Slide 14<strong>LaTeX</strong> Beamer Class (I)<strong>LaTeX</strong> Beamer Class https://bitbucket.org/rivanvx/beamerPackage to create presentations to be held using aprojector.Was developed for a PhD presentation (2003).Is now the dominant latex package for presentations.http://www.tug.org/teTeX/tetex-texmfdist/doc/latex/beamer/beameruserguide.pdfAdvantages:Themes: change the whole appearance of yourpresentation with a single parameter.Easily usable overlays and dynamic effects.Highly configurable.Usually included in the <strong>LaTeX</strong> distribution.<strong>LaTeX</strong> / Beamer Slide 15Document:<strong>LaTeX</strong> Beamer Class (II)Sections and sub-sections (of pages)Frames ( ~ Slides )Components of a frame:Headline and FootlineLeft and right sidebarNavigation bar/symbolsLogoFrame titleBackgroundContentAspect ratio 4:3Characteristicsdeterminedby theme<strong>LaTeX</strong> / Beamer Slide 16Themes:<strong>LaTeX</strong> Beamer Class (III)Most are named after cities, usually because aconference was held there.Colors (“color theme”) can be changed independently.Some examples:<strong>LaTeX</strong> Beamer Class (IV)Our own style (corporate identity):\usetheme[footline=infoline,headline=secheader]{UPB}MadridCopenhagenAnnArborhttp://www.hartwork.org/beamer-theme-matrix<strong>LaTeX</strong> / Beamer Slide 17<strong>LaTeX</strong> / Beamer Slide 18


Useful global settingSectioning:<strong>LaTeX</strong> Beamer Class (V)Disable navigational symbols:\beamertemplatenavigationsymbolsempty\section[short]{long}\subsection[short]{long}Multiple columns: (vertical subdividing)\begin{columns}\column{.55\textwidth}\pgfimage[width=\textwidth]{image}\column{.45\textwidth}\begin{enumerate}\item First item\item Last item\end{enumerate}\end{columns}<strong>LaTeX</strong> / Beamer Slide 19<strong>LaTeX</strong> Beamer Class (VI)<strong>Math</strong>ematical environments:definition, lemma, theorem, proof\begin{theorem}[Pythagoras]$a^2 + b^2 = c^2$\end{theorem}\begin{proof}Trivial.\end{proof}<strong>LaTeX</strong> / Beamer Slide 20Blocks<strong>LaTeX</strong> Beamer Class (VII)A block of text with a heading.\begin{block}{title}text\end{block}\begin{exampleblock}{title}text\end{exampleblock}\begin{alertblock}{title}text\end{alertblock}Meta-Information<strong>LaTeX</strong> Beamer Class (VIII)\title[short title]{long title}\subtitle[short subtitle]{long subtitle}\author[J. Smith]{James Smith}\institute[short]{Institute\\ University}\date[26.05.06]{26. Mai 2006}\titlegraphic{\includegraphics[width=2cm,height=2cm]{logo}}Needs file logo.eps/ps/pdf or have to\DeclareGraphicsExtension{...}\begin{document}\begin{frame}[t]\maketitle\end{frame}<strong>LaTeX</strong> / Beamer Slide 21<strong>LaTeX</strong> / Beamer Slide 22FramesOverlay-ActionsOptions<strong>LaTeX</strong> Beamer Class (IX)\begin{frame}[Overlay-Actions][Options]{Title}{Subtitle}Content\end{frame}Successively build up a frame on several slides: Frame alignment: b(ottom), c(enter), t(op)plain: Don't show headline, footer, sidebarsqueeze: Shrink left and right bordersoptionallabel=name: Set a name for later reference<strong>LaTeX</strong> / Beamer Slide 23<strong>LaTeX</strong> Beamer Class (X)Guidelines for designing frames:Start with a subtitle for your slide.Topics on frames should be self-consistent.Avoid long sentencesUse bullet points and numbered lists!Choose large text sizes.Guideline: ~ 10 lines per frame.Audience in the last row must read it, too.Avoid too many colors and different fonts and sizes.To support, not to distract.Don't use italics, use bold face or color to highlight.Use pictures to express complex concepts.<strong>LaTeX</strong> / Beamer Slide 24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!