= LaTeX = ---- . <> ---- . <> = TeX/LaTeX Documentation = * A short introduction to LaTeX: https://tobi.oetiker.ch/lshort/lshort.pdf * Based on the original German edition found here: http://www.ctan.org/tex-archive/info/lshort/german = 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! Direct downloads of the letter templates: * UZH Brief deutsch mit Absender ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-de-mit-absender.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-de-mit-absender.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/korrespondenz/uzhbrief-de-mit-absender.tex|tex]]) * UZH Brief deutsch ohne Absender ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-de-ohne-absender.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-de-ohne-absender.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/korrespondenz/uzhbrief-de-ohne-absender.tex|tex]]) * UZH Letter English with Sender ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-en-mit-absender.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-en-mit-absender.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/korrespondenz/uzhbrief-en-mit-absender.tex|tex]]) * UZH Letter English without Sender ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-en-ohne-absender.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzhbrief-en-ohne-absender.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/korrespondenz/uzhbrief-en-ohne-absender.tex|tex]]) Please replace the text enclosed by angle brackets (`<>`) with the appropriate information. == Presentation == Direct downloads of the persentation templates: * UZH Präsentation deutsch (informell) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-de-informal.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-de-informal.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/praesentation/uzh-praesentation-de-informal.tex|tex]]) * UZH Präsentation deutsch ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-de.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-de.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/praesentation/uzh-praesentation-de.tex|tex]]) * UZH Presentation English (informal) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-en-informal.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-en-informal.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/praesentation/uzh-praesentation-en-informal.tex|tex]]) * UZH Presentation English ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-en.pdf|pdf]]) ([[https://wiki.math.uzh.ch/public/LaTeX?action=AttachFile&do=get&target=uzh-praesentation-en.ps|ps]]) ([[http://www.math.uzh.ch/doc/latex/praesentation/uzh-praesentation-en.tex|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 Console and select "Updates" from the dropdown menu. Press "check for updates" and install the available ones. ==== Letter Templates ==== Download the LaTeX Letter templates from [[http://www.math.uzh.ch/doc/latex/config/nmathletter.zip|math www]] ([[#Access:_restrictions|access]]). Unzip the package, and copy the entire `nmathletter` directory to `C:\\AppData\Local\Programs\MiKTeX\tex\latex\`. Find install Path: Open MiKTeX Console --> Packages --> "Install in:" --> use this path for your packages {{attachment:1.png}} ==== Beamer Templates ==== Download the LaTeX Beamer templates from [[http://www.math.uzh.ch/doc/latex/config/mathbeamer.zip|math www]] ([[#Access:_restrictions|access]]). Unzip the package, and copy the entire `mathbeamer` directory to `C:\\AppData\Local\Programs\MiKTeX\tex\latex\`. === 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 }}} ==== Letter Templates ==== * Download the LaTeX Letter templates from [[http://www.math.uzh.ch/doc/latex/config/nmathletter.zip|math www]] ([[#Access:_restrictions|access]]). * Unzip the package, and copy the entire `nmathletter` directory `/usr/local/share/texmf/tex/latex`. * Download http://prdownload.berlios.de/koma-script3/koma-script-20120729.tds.zip and save it to `/usr/local/share/texmf/` and unzip the file in that directory. * Run `sudo mktexlsr` in order to update the search database of latex. ==== Beamer Templates ==== * Download the LaTeX Beamer templates from [[http://www.math.uzh.ch/doc/latex/config/mathbeamer.zip|math www]] ([[#Access:_restrictions|access]]). * 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 [[http://www.tug.org/mactex/downloading.html|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"` * Download the installer "install-getnonfreefonts" to i.e. the Downloads directory: getnonfreefonts can be obtained [[https://tug.org/fonts/getnonfreefonts/install-getnonfreefonts|here]] * 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` * The font Arial will be downloaded * next, in order to install the fonts run this command in the same terminal . `updmap-user` Further notes can be found: * http://www.tug.org/mactex/TeXLive2018+Changes.pdf ==== Letter Templates ==== Download the LaTeX Letter templates from [[http://www.math.uzh.ch/doc/latex/config/nmathletter.zip|math www]]. Unzip the package, and copy the entire `nmathletter` directory `/usr/local/texlive/texmf-local/tex/latex/local` (you need administrative privileges to perform this task and you will be asked to enter your password). Run `sudo mktexlsr` in a terminal in order to update the search database of latex. ==== Beamer Templates ==== Download the LaTeX Beamer templates from [[http://www.math.uzh.ch/doc/latex/config/mathbeamer.zip|math www]]. Unzip the package, and copy the entire `mathbeamer` directory to `/usr/local/texlive/texmf-local/tex/latex/local` (you need administrative privileges to perform this task and you will be asked to enter your password). 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 = UZH Logo = If you want to include the UZH logo in a LaTeX document, download [[http://www.math.uzh.ch/doc/latex/logo/uzhlogo.zip|this zip file]]. Read the `README.pdf` file for instructions. = Tips and tricks = == Count words in a latex document == {{{ Kile: File > Statistics }}} == kdvi == * [[public/TeX/kdvi|KDVI]] == 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 }}} == Looking for a symbol == * http://detexify.kirelabs.org/classify.html == Converting .eps-files (automatically) to .pdf-files == * [[TeX/epstopdf|epstopdf]] == Include a movie in a PDF Document == * [[http://www.uoregon.edu/~noeckel/PDFmovie.html|movie15]] Example: [[attachment:omega.tex]] [[attachment:omega.mpg]] [[attachment: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} }}} * To include a Youtube Flash movie, convert it to mp4: * Video example: http://www.youtube.com/watch?v=6lIM9p6XOKo * Convert it online: http://keepvid.com * Download the MP4 version: [[http://keepvid.com/?url=http://www.youtube.com/watch?v=6lIM9p6XOKo|http://keepvid.com/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6lIM9p6XOKo]] * compile: {{{ pdflatex movie.tex }}} * View in acrobat reader: [[https://wiki.math.uzh.ch/public/TeX?action=AttachFile&do=get&target=movie.pdf|movie.pdf]] = Graphic / Drawing = == xfig == * old, powerful and strange * http://www.xfig.org/userman/latex_and_xfig.html == inkscape == * modern drwaing application * http://famelis.wordpress.com/2011/04/12/latex-and-inkscape/ * http://wiki.inkscape.org/wiki/index.php/LaTeX * 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) = * Overview: http://tug.org/utilities/texconv/textopc.html || 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`|| ? || - || (./) ||