source: branches/2017/dev_merge_2017/DOC/texfiles/preamble.tex @ 9376

Last change on this file since 9376 was 9376, checked in by nicolasmartin, 2 years ago

Global reorganisation of DOC directory: refactoring & cleaning of TeX source code for readability

File size: 2.8 KB
Line 
1%% ==============================================================================
2%% preamble.tex: Document layout,
3%% ==============================================================================
4
5
6%% Document layout
7%% ==============================================================================
8
9\documentclass[a4paper, 11pt]{book}
10
11
12%% LaTeX packages
13%% ==============================================================================
14
15\usepackage{natbib}     %% bib
16\usepackage{caption}    %% caption
17\usepackage{xcolor}     %% color
18\usepackage{silence}    %% compilation
19\usepackage{times}      %% font
20\usepackage{hyperref}   %% hyper
21\usepackage{enumitem}   %% list
22\usepackage{minted}     %% listing
23\usepackage{amsmath}    %% maths
24\usepackage{fancyhdr}   %% page
25\usepackage{minitoc}    %% toc
26\usepackage{subfiles}   %% subdocs
27
28
29%% Extensions in bundle package
30
31\usepackage{amssymb, graphicx, longtable, makeidx, xspace}
32
33
34%% Configuration
35%% ==============================================================================
36
37\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
38\graphicspath{{figures/}}
39\hypersetup{
40   pdftitle={NEMO ocean engine}, pdfauthor={Gurvan Madec, and the NEMO team},
41   colorlinks
42}
43
44
45%% Styles & Customization
46%% ==============================================================================
47
48\pagestyle{fancy}
49\usemintedstyle{emacs}
50\bibliographystyle{texfiles/styles/ametsoc}
51
52
53%% Additionnal fonts
54\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
55
56
57%% Custom macros
58
59\usepackage{texfiles/styles/NEMO_manual}
60
61
62%% Page layout
63
64\fancyhf{}
65\fancyhead[LE,RO]{\bfseries\thepage}
66\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
67\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
68\fancyhead[RE]{\bfseries\leftmark}
69\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
70\renewcommand{\headrulewidth}{0.5pt}
71\renewcommand{\footrulewidth}{0pt  }
72\addtolength{\headheight}{2.6pt}
73
74
75%% Chapters catcodes
76
77\makeatletter
78\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
79\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
80\def\GrosCarreAvecUnChiffre#1{%
81   \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
82   \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}%
83   \vrule height 0pt width 1cm depth 0pt%
84}
85\def\@makechapterhead#1{
86   \hbox{
87      \huge\LignesVerticales
88      \hspace{-0.5cm}
89      \GrosCarreAvecUnChiffre{\thechapter}
90      \hspace{0.2cm}
91      \hbox{#1}
92   }
93   \par\vskip
941cm
95}
96\def\@makeschapterhead#1{
97   \hbox{
98      \huge\LignesVerticales
99      \hbox{#1}
100   }
101   \par\vskip
1022cm
103}
104\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
105  \hbox{}
106  \vspace*{\fill}
107  \vspace{\fill}
108  \thispagestyle{empty}
109  \newpage
110  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
111\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
112\makeatother
113
114
115%% Indexing
116%% ==============================================================================
117
118\makeindex
Note: See TracBrowser for help on using the repository browser.