doc: add a nitversion in generated document
[nit.git] / doc / nitreference / nitreference.tex
1 % This file is part of Nit ( http://www.nitlanguage.org ).
2 %
3 % Copyright 2011 Jean Privat <jean@pryen.org>
4 %
5 % Licensed under the Apache License, Version 2.0 (the "License");
6 % you may not use this file except in compliance with the License.
7 % You may obtain a copy of the License at
8 %
9 % http://www.apache.org/licenses/LICENSE-2.0
10 %
11 % Unless required by applicable law or agreed to in writing, software
12 % distributed under the License is distributed on an "AS IS" BASIS,
13 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 % See the License for the specific language governing permissions and
15 % limitations under the License.
16 \documentclass[10pt]{article}
17
18 \usepackage[T1]{fontenc}
19 \usepackage{nitlanguage}
20 \usepackage{multicol}
21 \usepackage{savetrees}
22 \usepackage{listings}
23 \usepackage{microtype}
24 \usepackage{xcolor}
25 \usepackage{comment}
26 \usepackage{../nit_version}
27
28 \newcommand\thedoctitle{A Concise Reference of the Nit Language}
29 \title{\thedoctitle}
30 \author{Jean Privat}
31 \date{\today}
32
33 \usepackage[bookmarks=false,pdftitle={\thedoctitle}]{hyperref}
34 \pdfcompresslevel=9 %best compression level for text and image
35
36 %\setcounter{collectmore}{90} % Force better column breaks
37
38 \lstMakeShortInline[basicstyle=\small\ttfamily\color{blue!30!black}]{@}
39
40 \hypersetup{colorlinks=true}
41 \newcommand\goto[1]{\hyperref[#1]{{\color{red}\scriptsize[\ref*{#1}]}}}
42 \newcommand\future[1]{}
43
44 \geometry{margin=0.35in} % short margins
45 % footer
46 \usepackage{fancyhdr}
47 \pagestyle{fancy}
48 \lhead{}
49 \chead{}
50 \rhead{}
51 \lfoot{\small\it\today}
52 \cfoot{\small\it\thedoctitle~---~\nitversion}
53 \rfoot{\small\it\thepage}
54 \renewcommand{\headrulewidth}{0pt}
55 \renewcommand{\footrulewidth}{0pt}
56 \setlength\footskip{15pt}
57
58 \begin{document}
59 \setlength\columnsep{8pt} % space around big columns
60 \begin{multicols}{2}
61 \setlength\columnsep{4pt} % space around smalls columns (for examples)
62 \input{nitreference-main.tex}
63 \end{multicols}
64 \end{document}