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

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

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

File size: 2.8 KB
RevLine 
[9376]1%% ==============================================================================
2%% preamble.tex: Document layout,
3%% ==============================================================================
[6998]4
5
[9376]6%% Document layout
7%% ==============================================================================
[9347]8
[9376]9\documentclass[a4paper, 11pt]{book}
[6998]10
11
[9376]12%% LaTeX packages
13%% ==============================================================================
[6998]14
[9376]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
[6998]27
28
[9376]29%% Extensions in bundle package
[6998]30
[9376]31\usepackage{amssymb, graphicx, longtable, makeidx, xspace}
[6998]32
33
[9376]34%% Configuration
35%% ==============================================================================
[6998]36
[9376]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}
[6998]43
44
[9376]45%% Styles & Customization
46%% ==============================================================================
[6998]47
[9376]48\pagestyle{fancy}
49\usemintedstyle{emacs}
50\bibliographystyle{texfiles/styles/ametsoc}
[6998]51
52
[9376]53%% Additionnal fonts
54\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
[6998]55
56
[9376]57%% Custom macros
[6998]58
[9376]59\usepackage{texfiles/styles/NEMO_manual}
[6998]60
61
[9376]62%% Page layout
[6998]63
[9376]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}
[6998]73
74
[9376]75%% Chapters catcodes
[6998]76
[9376]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
[6998]113
114
[9376]115%% Indexing
116%% ==============================================================================
[6998]117
[9376]118\makeindex
Note: See TracBrowser for help on using the repository browser.