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 @ 9388

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

Global reorganisation of DOC directory: implementation and configuration of syntax highlighting with 'minted' LaTeX package
New macros have been created to insert different source codes (fortran, xml, c and shell-session) in the document.
Pygments Python package is now required to compile the documentation.

File size: 4.6 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%% Additionnal fonts
42
43\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
44
45
46%% Page layout
47
48\fancyhf{}
49\fancyhead[LE,RO]{\bfseries\thepage}
50\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
51\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
52\fancyhead[RE]{\bfseries\leftmark}
53\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
54\renewcommand{\headrulewidth}{0.5pt}
55\renewcommand{\footrulewidth}{0pt  }
56\addtolength{\headheight}{2.6pt}
57
58
59%% Catcodes
60
61\makeatletter
62\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
63\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
64\def\GrosCarreAvecUnChiffre#1{%
65   \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
66   \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}%
67   \vrule height 0pt width 1cm depth 0pt%
68}
69\def\@makechapterhead#1{
70   \hbox{
71      \huge\LignesVerticales
72      \hspace{-0.5cm}
73      \GrosCarreAvecUnChiffre{\thechapter}
74      \hspace{0.2cm}
75      \hbox{#1}
76   }
77   \par\vskip
781cm
79}
80\def\@makeschapterhead#1{
81   \hbox{
82      \huge\LignesVerticales
83      \hbox{#1}
84   }
85   \par\vskip
862cm
87}
88\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
89  \hbox{}
90  \vspace*{\fill}
91  \vspace{\fill}
92  \thispagestyle{empty}
93  \newpage
94  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
95\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
96\makeatother
97
98
99%% Macros (to check)
100
101\def\deg{$^{\circ}$}
102\def\degC{$^{\circ}C$}
103\def\degK{$^{\circ}K$}
104\def\degN{$^{\circ}N$}
105\def\degS{$^{\circ}S$}
106
107\def\half{\textstyle\frac{1}{2}}
108\def\hhalf{\scriptstyle\frac{1}{2}}
109
110\def\quarter{\textstyle\frac{1}{4}}
111\def\qquarter{\scriptstyle\frac{1}{4}}
112\def\squarter{\sfrac{1}{4}}
113\def\stwelfth{\sfrac{1}{12}}
114\def\sthirtysixth{\sfrac{1}{36}}
115
116\def\bgamma\boldsymbol{\gamma}
117\def\rdt{\Delta t}
118
119
120%% New commands
121
122\newcommand{ \gmcomment}[1]{}
123\newcommand{ \sfcomment}[1]{}
124\newcommand{\sgacomment}[1]{}
125
126\newcommand{\nl}[1]{\texttt{\small{\textcolor{blue}{#1}}}}
127\newcommand{\NEMO}{\textit{NEMO}\xspace}
128
129\newcommand{\ifile}[1]{\textit{  #1.nc}\index{Input NetCDF files!#1.nc}}
130\newcommand{   \jp}[1]{\textit{     #1}\index{     Model parameters!#1}}
131\newcommand{   \hf}[1]{\textit{ #1.h90}\index{             h90 file!#1}}
132\newcommand{  \key}[1]{\textbf{key\_#1}\index{        CPP keys!key\_#1}}
133\newcommand{  \mdl}[1]{\textit{ #1.F90}\index{              Modules!#1}}
134\newcommand{  \ngn}[1]{\textit{     #1}\index{  Namelist Group Name!#1}}
135\newcommand{   \np}[1]{\textit{     #1}\index{   Namelist variables!#1}}
136\newcommand{   \pp}[1]{\textit{     #1}\index{     Model parameters!#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.