1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-11-18 00:13:55 +01:00
crowbook/templates/template.tex

107 lines
2.0 KiB
TeX
Raw Normal View History

{{=<< >>=}}
\documentclass{<<#short>>article<</short>><<^short>>book<</short>>}
2016-02-19 03:55:16 +01:00
\usepackage[T1]{fontenc}
\usepackage[<<&tex_lang>>]{babel}
2016-02-19 03:55:16 +01:00
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{spverbatim}
2016-02-19 03:55:16 +01:00
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[colorlinks=true,breaklinks=true]{hyperref}
\usepackage[anythingbreaks]{breakurl}
2016-02-25 19:56:18 +01:00
% TODO: provide a way to configure
2016-02-19 03:55:16 +01:00
\usepackage[a5paper, top=2cm,
2016-02-25 19:56:18 +01:00
left=2.5cm,bottom=1.5cm,right=1.5cm]{geometry}%A5 by default
% Even with inputenc, not all unicode chars are recognized. This a
% listof some I stumbled upon and manually added to fix
\usepackage{newunicodechar}
\newunicodechar{}{ } % thin non breaking space
2016-02-25 19:56:18 +01:00
% Force LaTeX not to overflow page e.g. when there is long words
% (e.g. filenames, urls, ...). The result is not necesarily very
% beautiful, though, but at least it's readable.
\setlength\emergencystretch{.5\textwidth}
2016-02-19 03:55:16 +01:00
\makeatletter
\newcommand{\HRule}{
\paragraph{}
\begin{center}
*****
\end{center}
\paragraph{}
}
% Title
<<^short>>
2016-02-19 03:55:16 +01:00
\renewcommand{\maketitle}{
\thispagestyle{empty}
\vspace*{\stretch{1}}
2016-02-19 03:55:16 +01:00
\begin{center}
{\Huge \@title \\[5mm]}
\end{center}
\vspace*{\stretch{2}}
2016-02-19 03:55:16 +01:00
\newpage
\thispagestyle{empty}
\pagebreak
\newpage
\thispagestyle{empty}
\chapter*{}
\vspace*{\stretch{1}}
\begin{center}
% {\Huge \@author \\[5mm]}
2016-02-19 03:55:16 +01:00
{\Huge \@title \\[5mm]}
% {\huge \today \\[5mm]}
2016-02-19 03:55:16 +01:00
\end{center}
% \HRule
2016-02-19 03:55:16 +01:00
\vspace*{\stretch{2}}
\begin{center}
{\large \@author}
\end{center}
\vspace*{\stretch{1}}
\vspace*{\stretch{1}}
\pagebreak
\newpage
2016-02-19 03:55:16 +01:00
\thispagestyle{empty}
\pagebreak
\newpage
}
<</short>>
2016-02-19 03:55:16 +01:00
% Headers
\pagestyle{fancyplain}
\lhead[\fancyplain{}{}]{\fancyplain{}{}}
% Right header
\rhead[\fancyplain{}{}]{\fancyplain{}{}}
% Center header
\chead[\fancyplain{}{\rm\thepage}]{\fancyplain{}{\rm\thepage}}
% Footer
\cfoot{\fancyplain{}{}}
\makeatother
\title{<<&title>>}
\author{<<&author>>}
2016-02-19 03:55:16 +01:00
\begin{document}
2016-02-20 03:41:29 +01:00
2016-02-19 03:55:16 +01:00
\maketitle
<<&content>>
2016-02-19 03:55:16 +01:00
\end{document}