# My favorite LaTeX preamble


I've written quite a few LaTeX documents during the last few years, but
only recently I'm starting to discover very powerful new packages, like
`memoir` and `xelatex`.

So I just wanted to share my "new" way of writing LaTeX docs.

First read [the memoir class
documentation](http://downloads.miek.nl/2008/memman.pdf).
And the [fontspec doc](http://downloads.miek.nl/2008/fontspec.pdf).

# preamble
This now looks like
    
    \documentclass{memoir}
    \usepackage{eurosym}	%% for the EURO
    \usepackage{fontspec}	
    \usepackage{xltrxta}	%% \XeTeX if you need it

Usually this is hidden in one of my class files which implement
a new look for a document. See the following articles for some
examples

 * [atroff style](/2008/june/28/a_new_latex_style/index.html)
 * [blocksbook style](/2007/december/21/blockbook_cls_a_latex_class/index.html)

# example
This is a small example on how to use XeTeX

    \documentclass{article}
    \usepackage{fontspec}
    \begin{document}
    Testing XeLaTeX!

    \fontspec[Scale=0.9]{Trebuchet MS}
    Something in trebuchet, but too large

    \fontspec[Scale=MatchLowercase]{Trebuchet MS}
    Size adjusted to the rest of the text!
    
    \LaTeX rules

    \rmfamily
    \LaTeX in the normal font
    \end{document}

Generate the `pdf` with

    xelatex example.tex

`xelatex` is my new friend now :)

