location: LaTeX

# Institute of Mathematics - PublicMathWiki:

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

# UZH Style Templates

The UZH offers LaTeX templates with official corporate design. Below you can find versions of these templates adapted for the Institute of Mathematics.

## Letter

The UZH Letter style is based on the KOMA Letter package. Documentation: http://www.ctan.org/pkg/scrlttr2

Please make sure that the return address (Institute of Mathematics) is mentioned on the envelope!

• UZH Brief deutsch mit Absender (pdf) (ps) (tex)

• UZH Brief deutsch ohne Absender (pdf) (ps) (tex)

• UZH Letter English with Sender (pdf) (ps) (tex)

• UZH Letter English without Sender (pdf) (ps) (tex)

Please replace the text enclosed by angle brackets (<>) with the appropriate information.

## Presentation

• UZH Präsentation deutsch (informell) (pdf) (ps) (tex)

• UZH Präsentation deutsch (pdf) (ps) (tex)

• UZH Presentation English (informal) (pdf) (ps) (tex)

• UZH Presentation English (pdf) (ps) (tex)

## Working with Templates on the I-MATH Terminals

If you are working with the I-MATH Terminals, you can also find the official LaTeX templates linked above at /scratch/templates/latex. Copy the desired template to your home directory, or any other suitable location (Do not edit the files in /scratch/templates/latex) and edit it with your favorite LaTeX editor.

## Installation of Corporate Design Templates

You have to perform the steps below only when using the LaTeX on your Notebook or Personal Computer.

### Windows

This instruction assumes that the latest MikTeX is installed including KOMA-Script, lastpage, mptopdf, and arial package. In order to ensure you're running the latest version or installing missing packages, start the MikTeX Package Administrator found under Start|All Programs|MikTeX X.Y|Maintenance (Admin)|Package Manager (Admin) and run the Update Wizard found under Task|Update Wizard. Please refer to the MikTeX Documentation for further information on this topic by pointing your browser to http://www.miktex.org/docs.

#### Letter Templates

Download the LaTeX Letter templates from math www (access). Unzip the package, and copy the entire nmathletter directory to C:\Program Files\MiKTeX X.Y\tex\latex.

Go to Start|All Programs|MiKTeX X.Y|Maintenance (Admin)|Settings (Admin) and click in the first tab on Refresh FNDB.

#### Beamer Templates

Download the LaTeX Beamer templates from math www (access). Unzip the package, and copy the entire mathbeamer directory to C:\Program Files\MiKTeX X.Y\tex\latex.

Go to Start|All Programs|MiKTeX X.Y|Maintenance (Admin)|Settings (Admin) and click in the first tab on Refresh FNDB.

### Ubuntu

You need to have the Ubuntu package texlive-fonts-extra installed:

In order to install the Arial font, type on a command line: sudo getnonfreefonts --sys arial-urw

If there is no getnonfreefonts :

cd /var/tmp
curl -O http://tug.org/fonts/getnonfreefonts/install-getnonfreefonts
texlua install-getnonfreefonts
getnonfreefonts --sys arial-urw

#### Beamer Templates

• Unzip the package, and copy the entire mathbeamer directory to /usr/local/share/texmf/tex/latex.

• Run sudo mktexlsr in order to update the search database of latex.

### MacOS X

#### installation of required packages and prepare installation

• Download and install the latest MacTeX. MacTeX can be obtained here.

• next, you need to install the required fonts.
• before this can be performed, you need to set the correct installation path. Please open a terminal and type export PATH="/Library/TeX/texbin/:\$PATH"

• assuming the terminal is still open, please navigate (cd) into the directory containing the downloaded file
• type sudo texlua install-getnonfreefonts

• do not close the terminal, as we need it for the next steps

#### Installing the Arial Font

• in the terminal type now:
• sudo getnonfreefonts --sys arial-urw

• next, in order to install the fonts run this command in the same terminal
• updmap-user

Further notes can be found:

#### Letter Templates

Run sudo mktexlsr in a terminal in order to update the search database of latex.

#### Beamer Templates

Run sudo mktexlsr in a terminal in order to update the search database of latex.

• note: all sudo introduced command requires a password to perform the action

# Tips and tricks

## Count words in a latex document

Kile: File > Statistics

## Custom paper size

\documentclass[a4paper]{amsart}
\usepackage{amssymb,latexsym}
\usepackage{graphicx, pgf, pst-all}

\usepackage[paperwidth=17truecm, paperheight=24truecm, centering, twoside, margin=1.58cm,heightrounded]{geometry}

\textwidth14truecm
\textheight20truecm

## Include a movie in a PDF Document

Example: omega.tex omega.mpg omega.pdf

[user@host] pdflatex omega.tex

View the PDF File in Acrobat Reader. It probably won't work on the Terminals.

### Example

• movie.tex

\documentclass[12pt,landscape]{article}
\usepackage{geometry}
\geometry{verbose,letterpaper}
\usepackage{movie15}
\usepackage{hyperref}
\begin{document}
Whispering-gallery mode in a quarter circle:
\begin{figure}[ht]

\includemovie[
poster,
text={\small(2-twist-spun.mp4)}
]{6cm}{4.8cm}{2-twist-spun.mp4}

\end{figure}
\end{document}

pdflatex movie.tex

# Graphic / Drawing

## xfig

• old, powerful and strange

## inkscape

• modern drwaing application
• e.g.:

Save your image, eg as “image.svg”. In addition, in Inkscape go to the
option File -> Save a Copy and chose PDF as your output format in the
same folder as the SVG. In the PDF options popup that comes right after
select the options:

* PDF+LaTeX: Omit text in PDF and create LaTeX file
* Export area is drawing

Save and go to your LaTeX document.

\begin{figure}
\centering
\def\svgwidth{\columnwidth} % sets the image width, this is optional
\input{image.pdf_tex}
\end{figure}

# Kile

## Path setting

Kile users should make sure, that under Settings|Configure Kile|Tools|Build for LaTeX and PDFLaTeX the command is /usr/sepp/bin/latex resp. /usr/sepp/bin/pdflatex.

# Access: restrictions

• Some files are copyright protected. To access such files (links named 'math www'), you have to provide your I-MATH credentials.

# Converting Latex to Word (and more)

 way Correct math symbols Keep Layout Editable Open the PDF under Windows in Adobe Acrobat (not Adobe Reader) and 'Export as Word' - - Open the PDF under Windows in Adobe Acrobat (not Adobe Reader) and 'Export as Image'. Take all Images, one per side in an empty Word Document. - LyX > ODT > Word ? ? ? pandoc > DOCX ? ? ? TeX4HT: http://www.tug.org/applications/tex4ht/mn.html * All possible filters: ls -l /usr/share/tex4ht * Converting a LaTeX Document to MS Word: mk4ht oolatex filename.tex ? -