1 | %% ============================================================================== |
---|
2 | %% NEMO_manual.sty: all customizations (packages, ) |
---|
3 | %% ============================================================================== |
---|
4 | |
---|
5 | |
---|
6 | %% LaTeX packages |
---|
7 | %% ============================================================================== |
---|
8 | |
---|
9 | \usepackage{natbib} %% bib |
---|
10 | \usepackage{caption} %% caption |
---|
11 | \usepackage{xcolor} %% color |
---|
12 | \usepackage{silence} %% compilation |
---|
13 | \usepackage{times} %% font |
---|
14 | \usepackage{hyperref} %% hyper |
---|
15 | \usepackage{idxlayout} %% index |
---|
16 | \usepackage{enumitem} %% list |
---|
17 | \usepackage{minted} %% listing |
---|
18 | \usepackage{amsmath} %% maths |
---|
19 | \usepackage{fancyhdr} %% page |
---|
20 | \usepackage{minitoc} %% toc |
---|
21 | \usepackage{subfiles} %% subdocs |
---|
22 | |
---|
23 | %% Extensions in bundle package |
---|
24 | |
---|
25 | \usepackage{amssymb, graphicx, makeidx, tabularx, xspace} |
---|
26 | |
---|
27 | |
---|
28 | %% Configuration |
---|
29 | |
---|
30 | \captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}} |
---|
31 | \graphicspath{{../figures/}} |
---|
32 | \hypersetup{ |
---|
33 | pdftitle={NEMO ocean engine}, pdfauthor={Gurvan Madec, and the NEMO team}, |
---|
34 | colorlinks |
---|
35 | } |
---|
36 | \idxlayout{font=footnotesize, columns=3} |
---|
37 | \renewcommand{\bibfont}{\footnotesize} |
---|
38 | \renewcommand{\bibsep}{3pt} |
---|
39 | |
---|
40 | |
---|
41 | %% Styles |
---|
42 | %% ============================================================================== |
---|
43 | |
---|
44 | \pagestyle{fancy} |
---|
45 | \bibliographystyle{../tex_sub/ametsoc} |
---|
46 | |
---|
47 | |
---|
48 | %% Additionnal fonts |
---|
49 | |
---|
50 | \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} |
---|
51 | |
---|
52 | |
---|
53 | %% Page layout |
---|
54 | |
---|
55 | \fancyhf{} |
---|
56 | \fancyhead[LE,RO]{\bfseries\thepage} |
---|
57 | \fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} |
---|
58 | \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} |
---|
59 | \fancyhead[RE]{\bfseries\leftmark} |
---|
60 | \renewcommand{\chaptermark}[1]{\markboth{#1}{}} |
---|
61 | \renewcommand{\headrulewidth}{0.5pt} |
---|
62 | \renewcommand{\footrulewidth}{0pt } |
---|
63 | \addtolength{\headheight}{2.6pt} |
---|
64 | |
---|
65 | |
---|
66 | %% Catcodes |
---|
67 | |
---|
68 | \makeatletter |
---|
69 | \def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} |
---|
70 | \def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} |
---|
71 | \def\GrosCarreAvecUnChiffre#1{ |
---|
72 | \rlap{\vrule height 0.8cm width 1cm depth 0.2cm} |
---|
73 | \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}} |
---|
74 | \vrule height 0pt width 1cm depth 0pt |
---|
75 | } |
---|
76 | \def\@makechapterhead#1{ |
---|
77 | \hbox{ |
---|
78 | \huge\LignesVerticales\hspace{-0.5cm} |
---|
79 | \GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm} |
---|
80 | \hbox{#1} |
---|
81 | } |
---|
82 | \par\vskip |
---|
83 | 1cm |
---|
84 | } |
---|
85 | \def\@makeschapterhead#1{ |
---|
86 | \hbox{ |
---|
87 | \huge\LignesVerticales |
---|
88 | \hbox{#1} |
---|
89 | } |
---|
90 | \par\vskip |
---|
91 | 2cm |
---|
92 | } |
---|
93 | \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else |
---|
94 | \hbox{} |
---|
95 | \vspace*{\fill} |
---|
96 | \vspace{\fill} |
---|
97 | \thispagestyle{empty} |
---|
98 | \newpage |
---|
99 | \if@twocolumn\hbox{}\newpage\fi\fi\fi} |
---|
100 | \def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} |
---|
101 | \makeatother |
---|
102 | |
---|
103 | |
---|
104 | %% Macros (to check) |
---|
105 | |
---|
106 | \def\deg{$^{\circ}$} |
---|
107 | \def\degC{$^{\circ}C$} |
---|
108 | \def\degK{$^{\circ}K$} |
---|
109 | \def\degN{$^{\circ}N$} |
---|
110 | \def\degS{$^{\circ}S$} |
---|
111 | |
---|
112 | \def\half{\textstyle\frac{1}{2}} |
---|
113 | \def\hhalf{\scriptstyle\frac{1}{2}} |
---|
114 | |
---|
115 | \def\quarter{\textstyle\frac{1}{4}} |
---|
116 | \def\qquarter{\scriptstyle\frac{1}{4}} |
---|
117 | \def\squarter{\sfrac{1}{4}} |
---|
118 | \def\stwelfth{\sfrac{1}{12}} |
---|
119 | \def\sthirtysixth{\sfrac{1}{36}} |
---|
120 | |
---|
121 | \def\bgamma\boldsymbol{\gamma} |
---|
122 | \def\rdt{\Delta t} |
---|
123 | |
---|
124 | |
---|
125 | %% New commands |
---|
126 | |
---|
127 | \newcommand{\gmcomment}[1]{} |
---|
128 | \newcommand{\sfcomment}[1]{} |
---|
129 | \newcommand{\sgacomment}[1]{} |
---|
130 | |
---|
131 | \newcommand{\nl}[1]{\texttt{\small{\textcolor{blue}{#1}}}} |
---|
132 | \newcommand{\NEMO}{\textit{NEMO}\xspace} |
---|
133 | |
---|
134 | \newcommand{\hf}[1]{\textit{#1.h90}\index{h90 file!#1}} |
---|
135 | \newcommand{\ifile}[1]{\textit{#1.nc}\index{Input NetCDF files!#1.nc}} |
---|
136 | \newcommand{\jp}[1]{\textit{#1}\index{Model parameters!#1}} |
---|
137 | \newcommand{\key}[1]{\textbf{key\_#1}\index{CPP keys!key\_#1}} |
---|
138 | \newcommand{\mdl}[1]{\textit{#1.F90}\index{Modules!#1}} |
---|
139 | \newcommand{\ngn}[1]{\textit{#1}\index{Namelist Group Name!#1}} |
---|
140 | \newcommand{\np}[1]{\textit{#1}\index{Namelist variables!#1}} |
---|
141 | \newcommand{\rou}[1]{\textit{#1}\index{Routines!#1}} |
---|
142 | |
---|
143 | \newcommand{\grad}{\nabla} |
---|
144 | \newcommand{\gradh}{\nabla_h} |
---|
145 | |
---|
146 | \newcommand{\ew}[3]{{e_{3#1}}_{\,#2}^{\,#3} } |
---|
147 | \newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}} |
---|
148 | \newcommand{\Div}{\grad\cdot} |
---|
149 | \newcommand{\curl}{\nabla \times} |
---|
150 | \newcommand{\pd}[2][]{\frac{\partial #1}{\partial #2}} |
---|
151 | \newcommand{\alpbet} {\left(\alpha / \beta \right)} |
---|
152 | |
---|
153 | \newcommand{\triad}[6][]{\ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}} |
---|
154 | \newcommand{\triadd}[5]{\ensuremath{{}_{#1}^{#2}{\mathbb{#3}}_{#4}^{\,#5}}} |
---|
155 | \newcommand{\triadt}[5]{\ensuremath{{}_{#1}^{#2}{\tilde{\mathbb{#3}}}_{#4}^{\,#5}}} |
---|
156 | \newcommand{\rtriad}[2][]{\ensuremath{\triad[#1]{i}{k}{#2}{i_p}{k_p}}} |
---|
157 | \newcommand{\rtriadt}[1]{\ensuremath{\triadt{i}{k}{#1}{i_p}{k_p}}} |
---|
158 | |
---|
159 | \newcommand{\Alts}{{A}} |
---|
160 | \newcommand{\Alt}{{A^{lT}}} |
---|
161 | |
---|
162 | \newcommand{\rMLt}[1][i]{\tilde{r}_{\mathrm{ML}\,#1}} |
---|
163 | \newcommand{\rML}[1][i]{r_{\mathrm{ML}\,#1}} |
---|
164 | |
---|
165 | \newcommand{\mygstrut}[2]{\rule[#1 em]{0pt}{#2 em}} |
---|
166 | \newcommand{\mystrut}{\rule[-.9 em]{0pt}{1.79 em}} |
---|
167 | |
---|
168 | \newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{full-text}} |
---|