New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
NEMO_manual.sty in branches/2017/dev_merge_2017/DOC/tex_main – NEMO

source: branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty @ 9393

Last change on this file since 9393 was 9393, checked in by nicolasmartin, 6 years ago

Cleaning of section headings, reinstating the index by mixing \np and \forcode macros, continued conversion of source code inclusions

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