LaTeX - gher-uliege/Documentation GitHub Wiki
LaTeX is a system for producing high-quality documents (reports, posters, presentations), used especially by the scientific community. LaTeX is a document markup language.
General
LaTeX project site: http://www.latex-project.org/
WikiBook: http://en.wikibooks.org/wiki/LaTeX
Installation
- Comprehensive TeX Archive Network (CTAN): http://www.ctan.org/
- TeX Live: http://www.tug.org/texlive/acquire-netinstall.html
- MiKTeX (Windows): http://miktex.org/2.9/setup
Editors
The .tex files can be prepared with any editor and then compiled in command line. However, specific editors offer the shortcuts for the text processing and for the compilation of the code.
- Texmaker: available for all architectures: http://www.xm1math.net/texmaker/.
- TeXnicCenter: http://www.toolscenter.org/
- WinShell: http://www.winshell.org/modules/ws_download/
- emacs with Auc Tex. Short intro to Auc Tex
References and bibliography
- BibTeX: a file format to process lists of references.
- natbib: a package to produce author-year style citations. Also check the reference sheet.
Management of the BibTex files
- JabRef (recommended): a graphical interface for managing BibTeX and other bibliographies. To create a reference, you simply select its type (article, book, thesis, etc) and then you fill the mandatory fields (author, title, etc) and the optional fields.
- BibTool: never tried it, but if you did, please comment!
Create your own bibliography style
Lots of .bst files are available and they are often provided by the different journals. If you want to generate your own .bst file, open a shell and type:
latex makebst
and go through the process. Check the doc here:
http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/
If the command is not found, download it (package manager if linux).
Changing fonts
Using latex packages
- The font catalogue: http://www.tug.dk/FontCatalogue/
- Installation: http://www.tug.org/fonts/fontinstall.html
- Examples (chose only one):
\usepackage{times}
\usepackage{helvet}
On my machine, the fonts are installed here:
/usr/share/texmf/tex/latex/psnfss
Using xelatex
XeTex is a TeX typesetting engine using Unicode and supporting modern font technologies.
- Install xetex:
sudo apt-get install texlive-xetex
- Install latex package "fontspec" if necessary.
- Get the font files (.otf or .ttf extension) on your machine.
- Adapt the line following example
\setmainfont[Path = /home/ctroupin/.fonts/]{Cube-Regular2}
in the following MWE example:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Path = /home/ctroupin/.fonts/]{Cube-Regular2}
\begin{document}
\large
Test (1) (2)
\end{document}
- Run
xelatex
, either by command line
xelatex example.tex
or using Texmaker directly (recent version include xelatex support).
Presentations
Presentations with LaTeX are not so frequent, but if you already have an article typed in LaTeX, then it is easy to create a presentation.
Beamer
Beamer is a LaTeX class for generating presentations.
The complete documentation is available at
http://archive.cs.uu.nl/mirror/CTAN/macros/latex/contrib/beamer/doc/beameruserguide.pdf
and the wikibook at: http://en.wikibooks.org/wiki/LaTeX/Presentations
Examples
- http://mike.depalatis.net/beamerthemes/
- browse by themes and colors:
http://deic.uab.es/~iblanes/beamer_gallery/
http://www.hartwork.org/beamer-theme-matrix/
- for other themes: http://latex.simon04.net/
To change the colors: http://en.wikibooks.org/wiki/LaTeX/Presentations
Tips
- Transparent background:
http://tex.stackexchange.com/questions/74038/transparent-image-background-in-beamer
Prosper
Prosper also aims to create presentations. The documentation is available at http://amath.colorado.edu/documentation/LaTeX/prosper/
Animations in a presentation
Here is an example of a small pdf with an animation. You should replace the name of the animation (AnimSmallBase.mp4) by a file that you have on your machine.
\documentclass[final]{beamer}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{multimedia}
\begin{document}
\begin{frame}[t]
\frametitle{Numerical model results}
\begin{figure}[H]
\centering
\movie[borderwidth=.5cm,width=7cm,height=7cm,poster,showcontrols]{}{./AnimSmallBase.mp4}
\end{figure}
\end{frame}
\end{document}
Posters
An alternative to power-point for the creation of poster is LaTeX. As with the presentation, if you already have your text typed in LaTeX, then it is easy to convert it into a poster. Note that the final page setting might be tedious.
Packages
A0 poster
A0poster is a class designed for the posters. You can find more details here. Note that the packages multicol, pstricks and pst-grad have to be installed. For the generation of the pdf:
latex poster.tex
bibtex poster
latex poster.tex
latex poster.tex
dvips -Ppdf poster.dvi -o poster.ps
ps2pdf poster.ps poster.pdf
Note that if you want to print it on the SEGI printers, you need to use the postscript file.
baposter
The package basposter is an easy-to-use alternative to AO.
beamerposter
http://www-i6.informatik.rwth-aachen.de/~dreuw/latexbeamerposter.php
Add a QR-code
A QR-code (Quick-response code) is similar to a barcode, but in two dimensions. It can store addresses or url's.
- Generate the QR code, for instance: http://qrcode.kaywa.com/, http://goqr.me/
- Export the results in the ad-hoc format (eps, png, etc)
- Test it: scan it with your smart phone, http://www.onlinebarcodereader.com/, http://zxing.org/w/decode.jspx
- Insert it in your poster (not too close to the bottom, otherwise it won't be seen)
- For original examples, check out: