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

Last change on this file since 9378 was 9378, checked in by nicolasmartin, 3 years ago

Global reorganisation of DOC directory: cosmetic changes

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