

% My LaTeX-settings to be used with python-docutils and reStructuredText

% Author:
% Juhapekka Tolvanen
% http://iki.fi/juhtolv
% juhtolv (at) iki (dot) fi

% This file is public domain. There is no warranty.


% Just use rst2latex in this way or something:

%rst2latex --generator --time \
%   --toc-entry-backlinks --footnote-backlinks \
%   --section-numbering --strip-comments \
%   --report=5 \
%   --language=fi \
%   --input-encoding=UTF-8 --output-encoding=UTF-8:strict \
%   --documentclass=scrbook \
%   --documentoptions=10pt,a4paper,oneside,openany,portrait \
%   --stylesheet=RST \
%   --use-latex-footnotes \
%   --use-latex-toc \
%   --use-latex-docinfo \
%   --compound-enumerators \
%   --section-prefix-for-enumerators \
%   --table-style=booktabs \
%   --graphicx-option=pdftex \
%   --font-encoding=T1 \
%   --use-verbatim-when-possible \
%   RST.koe.txt RST.koe.tex

% Then use pdflatex to create PDF from that LaTeX-source.

% This makes stfloats or fix2col obsolete. This loads fixltx2e.
%% "When the new output routine for LaTeX3 is done, this package will
%% be obsolete. The sooner the better..."
\RequirePackage{dblfloatfix}
% This makes type1cm and type1ec obsolete:
\RequirePackage{fix-cm}

% To ease checking pdf(la)tex with if-statements
\RequirePackage{ifpdf}

%\setcounter{secnumdepth}{3}
\setcounter{secnumdepth}{7}

%%%%%%%%%%%%%%%%%%%%%
% Packages

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
%

% Most special chars, also copyleft
\usepackage{textcomp}

% Palatino:
% Very good, if you are going to read from paper.
% Use this even if you do not write math.
% A packet called "palatino" is deprecated. See: CTAN: l2tabu
%\usepackage{mathpazo}
% Use Palatino-fonts of fpl-neu -package:
% <http://home.vrweb.de/~was/x/FPL/>:
%\renewcommand{\rmdefault}{fp9x}
% Just like above, but use old style digits:
%\renewcommand{\rmdefault}{fp9j}

% Concrete fonts:
% Slab serif, hence works quite well on screen.
%\usepackage{beton}
% There are no bold Concrete fonts, but it is generally accepted that the
% Computer Modern Sans Serif demibold condensed fonts are an adequate
% substitute. If you are using concmath or ccfonts and you want to
% follow this suggestion, then use the package with boldsans class
% option (in spite of the fact that the concmath documentation calls it
% sansbold class option).
%\renewcommand{\bfdefault}{sbc}

% Bitstream Charter:
% Better for reading from screen
%\usepackage{charter}

% Bitstream Vera -fonts:
% Even better for reading from screen.
% If you use this, you'd better comment away those
% Sans Serif- and Monospace -settings below, because
% Bitstream Vera has good sans serif- and monospace-fonts, too.:
\usepackage{bera}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sans Serif -font
% This should be taken from CM-Super- and hfbright-fonts:
%\renewcommand{\sfdefault}{cmbr}
% Use this, if CM Super-fonts are broken:
%\renewcommand{\sfdefault}{lmss}

% Helvetica
%\renewcommand{\sfdefault}{phv}
% Also this trick is from l2tabu
%\usepackage[scaled=.95]{helvet}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Monospace-font:
% This should be taken from CM-Super-fonts:
%\renewcommand{\ttdefault}{cmtt}
% Use this, if CM Super-fonts are broken:
%\renewcommand{\ttdefault}{lmtt}

% Quite good monospace-font:
%\renewcommand{\ttdefault}{txtt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% cmap: "Make the PDF files generated by pdflatex "searchable and copyable"
% in Adobe (Acrobat) Reader and other compliant PDF viewers."
% (Must be before fontenc-package)
\ifpdf % Some people may have buggy cmap.
\usepackage{cmap}
\fi

\usepackage[T1]{fontenc}


\ifpdf
\usepackage[protrusion=true,expansion=true,verbose=true,final=true]{microtype}
\else
\usepackage[verbose=true,DVIoutput=true,draft=false,final=true]{microtype}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{setspace}
%\singlespacing
\onehalfspacing
%\spacing{1.7} % This causes bugs like this: (\end occurred inside a group at level 1) 
%\doublespacing

% To ease writing TeX-related names:
\usepackage{texnames}




