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 NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main – NEMO

source: NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/main/NEMO_manual.sty @ 11003

Last change on this file since 11003 was 10896, checked in by cetlod, 5 years ago

Adding a first Draft of TOP documentation

File size: 5.5 KB
Line 
1%% ==============================================================================
2%% NEMO_manual.sty: all customizations (packages, styles, cmds)
3%% ==============================================================================
4
5
6%% LaTeX packages
7%% ==============================================================================
8
9\usepackage{natbib}           %% bib
10\usepackage{caption}          %% caption
11\usepackage{xcolor}           %% color
12\usepackage{times}            %% font
13\usepackage{hyperref}         %% hyper
14\usepackage{idxlayout}        %% index
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\usepackage[utf8]{inputenc}   %% input encoding
22\usepackage{draftwatermark}   %% watermark
23\usepackage{textcomp}         %% Companion fonts
24
25%% Extensions in bundle package
26
27\usepackage{amssymb, graphicx, makeidx, tabularx}
28
29
30%% Configuration
31
32\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
33\graphicspath{{../../../figures/}}
34\hypersetup{
35   pdftitle={NEMO ocean engine}, pdfauthor={Gurvan Madec, and NEMO System Team},
36   colorlinks
37}
38\idxlayout{font=footnotesize, columns=3}
39\renewcommand{\bibfont}{\footnotesize}
40\renewcommand{\bibsep}{3pt}
41
42
43%% Styles
44%% ==============================================================================
45
46\pagestyle{fancy}
47\bibliographystyle{../main/ametsoc}
48
49%% Additionnal fonts
50
51\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
52
53
54%% Page layout
55
56\fancyhf{}
57\fancyhead[LE,RO]{\bfseries\thepage}
58\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
59\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
60\fancyhead[RE]{\bfseries\leftmark}
61\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
62\renewcommand{\headrulewidth}{0.5pt}
63\renewcommand{\footrulewidth}{0pt  }
64\addtolength{\headheight}{2.6pt}
65
66
67%% Catcodes
68
69\makeatletter
70\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
71\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
72\def\GrosCarreAvecUnChiffre#1{
73   \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
74   \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
75   \vrule height 0pt width 1cm depth 0pt
76}
77\def\@makechapterhead#1{
78   \hbox{
79      \huge\LignesVerticales\hspace{-0.5cm}
80      \GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
81      \hbox{#1}
82   }
83   \par\vskip
841cm
85}
86\def\@makeschapterhead#1{
87   \hbox{
88      \huge\LignesVerticales
89      \hbox{#1}
90   }
91   \par\vskip
922cm
93}
94\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
95  \hbox{}
96  \vspace*{\fill}
97  \vspace{\fill}
98  \thispagestyle{empty}
99  \newpage
100  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
101\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
102\makeatother
103
104
105%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
106%% ==============================================================================
107
108%% NEMO and Fortran in small capitals
109\newcommand{\NEMO}{\textsc{nemo}}
110\newcommand{\fortran}{\textsc{Fortran}}
111\newcommand{\fninety}{\textsc{Fortran 90}}
112
113%% Common aliases
114\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
115\newcommand{\zstar }{\ensuremath{z^\star}}
116\newcommand{\sstar }{\ensuremath{s^\star}}
117\newcommand{\ztilde}{\ensuremath{\tilde z}}
118\newcommand{\stilde}{\ensuremath{\tilde s}}
119\newcommand{\ie}{\ensuremath{i.e.}}
120\newcommand{\eg}{\ensuremath{e.g.}}
121
122%% Inline maths
123\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
124\newcommand{\rdt}{\Delta t}
125
126%% Text env. for Gurvan
127\newcommand{\gmcomment}[1]{}
128
129%% Index entries (italic font for files, preformat for code)
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]{\texttt{#1}                \index{Model parameters!#1}}
133\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
134\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
135\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Name!#1}}
136\newcommand{\np}[1]{\texttt{#1}                \index{Namelist variables!#1}}
137\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}
138
139%% Maths
140\newcommand{\lt}{\left}
141\newcommand{\rt}{\right}
142\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}}
143\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
144
145%% Shortened DOI in bibliography
146\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{doi:#1}}
147
148%% Namelists inclusion
149\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
150
151
152%% Minted package: syntax highlighting configuration
153%% ==============================================================================
154
155%% Global highlighting style
156\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
157\setminted[xml]{style=borland} %% Specific per language
158
159%% Oneliner
160\newmint[forline]{fortran}{}   % \forline|...|
161\newmint[xmlline]{xml}{}       % \xmlline|...|
162\newmint[cmd]{console}{}       % \cmd|...|
163
164%% Multi-lines
165\newminted[forlines]{fortran}{}   % \begin{forlines}
166\newminted[xmllines]{xml}{}       % \begin{xmllines}
167\newminted[cmds]{console}{}       % \begin{cmds}
168\newminted[clines]{c}{}           % \begin{clines}
169
170%% File
171\newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...}
172
173%% Inline
174\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...}
175\newmintinline[xmlcode]{xml}{    fontsize=auto, frame=lines}   % \xmlcode{...}
176\newmintinline[snippet]{console}{fontsize=auto, frame=lines}   % \snippet{...}
Note: See TracBrowser for help on using the repository browser.