Index: /NEMO/trunk/doc/latex/global/document.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/document.tex	(revision 11173)
+++ /NEMO/trunk/doc/latex/global/document.tex	(revision 11174)
@@ -4,5 +4,5 @@
 
 %% NEMO release version
-\def\version{X.X~}
+\def\version{4.0rc~}
 
 %% Preamble
@@ -12,9 +12,13 @@
 \documentclass[draft]{scrreport}
 
-%% Engine name and Zenodo DOI
+%% Load manual definitions
 \input{definitions}
 
-%% Custom style (.sty)
-\usepackage{../../global/packages}
+%% Load all *.tex files from './latex/global' directory
+\input{../../global/packages}
+\input{../../global/highlighting}
+\input{../../global/new_cmds}
+\input{../../global/styles}
+\input{../../global/todonotes}
 
 %% Include references and index for single subfile compilation
Index: MO/trunk/doc/latex/global/highlighting.sty
===================================================================
--- /NEMO/trunk/doc/latex/global/highlighting.sty	(revision 11173)
+++ 	(revision )
@@ -1,25 +1,0 @@
-%% Minted package: syntax highlighting configuration
-%% ==============================================================================
-
-%% Global highlighting style
-\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
-\setminted[xml]{style=borland} %% Specific per language
-
-%% Oneliner
-\newmint[forline]{fortran}{}   % \forline|...|
-\newmint[xmlline]{xml}{}       % \xmlline|...|
-\newmint[cmd]{console}{}       % \cmd|...|
-
-%% Multi-lines
-\newminted[forlines]{fortran}{}   % \begin{forlines}
-\newminted[xmllines]{xml}{}       % \begin{xmllines}
-\newminted[cmds]{console}{}       % \begin{cmds}
-\newminted[clines]{c}{}           % \begin{clines}
-
-%% File
-\newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...}
-
-%% Inline
-\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...}
-\newmintinline[xmlcode]{xml}{    fontsize=auto, frame=lines}   % \xmlcode{...}
-\newmintinline[snippet]{console}{fontsize=auto, frame=lines}   % \snippet{...}
Index: /NEMO/trunk/doc/latex/global/highlighting.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/highlighting.tex	(revision 11174)
+++ /NEMO/trunk/doc/latex/global/highlighting.tex	(revision 11174)
@@ -0,0 +1,25 @@
+%% Minted package: syntax highlighting configuration
+%% ==============================================================================
+
+%% Global highlighting style
+\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
+\setminted[xml]{style=borland} %% Specific per language
+
+%% Oneliner
+\newmint[forline]{fortran}{}   % \forline|...|
+\newmint[xmlline]{xml}{}       % \xmlline|...|
+\newmint[cmd]{console}{}       % \cmd|...|
+
+%% Multi-lines
+\newminted[forlines]{fortran}{}   % \begin{forlines}
+\newminted[xmllines]{xml}{}       % \begin{xmllines}
+\newminted[cmds]{console}{}       % \begin{cmds}
+\newminted[clines]{c}{}           % \begin{clines}
+
+%% File
+\newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...}
+
+%% Inline
+\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...}
+\newmintinline[xmlcode]{xml}{    fontsize=auto, frame=lines}   % \xmlcode{...}
+\newmintinline[snippet]{console}{fontsize=auto, frame=lines}   % \snippet{...}
Index: MO/trunk/doc/latex/global/new_cmds.sty
===================================================================
--- /NEMO/trunk/doc/latex/global/new_cmds.sty	(revision 11173)
+++ 	(revision )
@@ -1,42 +1,0 @@
-%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
-%% ==============================================================================
-
-%% NEMO and Fortran in small capitals
-\newcommand{\NEMO}{\textsc{nemo}}
-\newcommand{\fortran}{\textsc{Fortran}}
-\newcommand{\fninety}{\textsc{Fortran 90}}
-
-%% Common aliases
-\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
-\newcommand{\zstar }{\ensuremath{z^\star}}
-\newcommand{\sstar }{\ensuremath{s^\star}}
-\newcommand{\ztilde}{\ensuremath{\tilde z}}
-\newcommand{\stilde}{\ensuremath{\tilde s}}
-\newcommand{\ie}{\ensuremath{i.e.}}
-\newcommand{\eg}{\ensuremath{e.g.}}
-
-%% Inline maths
-\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
-\newcommand{\rdt}{\Delta t}
-
-%% Text env. for Gurvan
-\newcommand{\gmcomment}[1]{}
-
-%% Index entries (italic font for files, preformat for code)
-\newcommand{\hf}[1]{\textit{#1.h90}            \index{h90 files!#1}}
-\newcommand{\ifile}[1]{\textit{#1.nc}          \index{Input NetCDF files!#1.nc}}
-\newcommand{\jp}[1]{\texttt{#1}                \index{Model parameters!#1}}
-\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
-\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
-\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Names!#1}}
-\newcommand{\np}[1]{\texttt{#1}                \index{Namelist parameters!#1}}
-\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}
-
-%% Maths
-\newcommand{\lt}{\left}
-\newcommand{\rt}{\right}
-\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}}
-\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
-
-%% Namelists inclusion
-\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
Index: /NEMO/trunk/doc/latex/global/new_cmds.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 11174)
+++ /NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 11174)
@@ -0,0 +1,42 @@
+%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
+%% ==============================================================================
+
+%% NEMO and Fortran in small capitals
+\newcommand{\NEMO}{\textsc{nemo}}
+\newcommand{\fortran}{\textsc{Fortran}}
+\newcommand{\fninety}{\textsc{Fortran 90}}
+
+%% Common aliases
+\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
+\newcommand{\zstar }{\ensuremath{z^\star}}
+\newcommand{\sstar }{\ensuremath{s^\star}}
+\newcommand{\ztilde}{\ensuremath{\tilde z}}
+\newcommand{\stilde}{\ensuremath{\tilde s}}
+\newcommand{\ie}{\ensuremath{i.e.}}
+\newcommand{\eg}{\ensuremath{e.g.}}
+
+%% Inline maths
+\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
+\newcommand{\rdt}{\Delta t}
+
+%% Text env. for Gurvan
+\newcommand{\gmcomment}[1]{}
+
+%% Index entries (italic font for files, preformat for code)
+\newcommand{\hf}[1]{\textit{#1.h90}            \index{h90 files!#1}}
+\newcommand{\ifile}[1]{\textit{#1.nc}          \index{Input NetCDF files!#1.nc}}
+\newcommand{\jp}[1]{\texttt{#1}                \index{Model parameters!#1}}
+\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
+\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
+\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Names!#1}}
+\newcommand{\np}[1]{\texttt{#1}                \index{Namelist parameters!#1}}
+\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}
+
+%% Maths
+\newcommand{\lt}{\left}
+\newcommand{\rt}{\right}
+\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}}
+\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
+
+%% Namelists inclusion
+\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
Index: MO/trunk/doc/latex/global/packages.sty
===================================================================
--- /NEMO/trunk/doc/latex/global/packages.sty	(revision 11173)
+++ 	(revision )
@@ -1,33 +1,0 @@
-%% LaTeX packages in use
-%% ==============================================================================
-
-\usepackage{natbib}                      %% bib
-\usepackage{caption}                     %% caption
-\usepackage{xcolor}                      %% color
-\usepackage{times}                       %% font
-\usepackage{hyperref}                    %% hyper
-%\usepackage{idxlayout}                   %% index
-\usepackage{enumitem}                    %% list
-\usepackage[outputdir=../build]{minted}  %% listing
-\usepackage{amsmath}                     %% maths
-%\usepackage{fancyhdr}                    %% page
-\usepackage{minitoc}                     %% toc
-\usepackage{subfiles}                    %% subdocs
-\usepackage{draftwatermark}              %% watermark
-\usepackage{titling}                     %% titlepage
-
-%% Extensions in bundle package
-\usepackage{amssymb, graphicx, makeidx, tabularx, textcomp}
-\usepackage[utf8]{inputenc}              %% input encoding
-
-%% Configuration
-\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
-%\idxlayout{font=footnotesize, columns=3}
-%\renewcommand{\bibfont}{\footnotesize}
-%\renewcommand{\bibsep}{3pt}
-
-%% Load custom packages in './latex/global' directory
-\usepackage{../../global/styles}
-\usepackage{../../global/new_cmds}
-\usepackage{../../global/highlighting}
-\usepackage{../../global/todonotes}
Index: /NEMO/trunk/doc/latex/global/packages.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/packages.tex	(revision 11174)
+++ /NEMO/trunk/doc/latex/global/packages.tex	(revision 11174)
@@ -0,0 +1,27 @@
+%% LaTeX packages in use
+%% ==============================================================================
+
+\usepackage{natbib}                      %% bib
+\usepackage{caption}                     %% caption
+\usepackage{xcolor}                      %% color
+\usepackage{times}                       %% font
+\usepackage{hyperref}                    %% hyper
+%\usepackage{idxlayout}                   %% index
+\usepackage{enumitem}                    %% list
+\usepackage[outputdir=../build]{minted}  %% listing
+\usepackage{amsmath}                     %% maths
+%\usepackage{fancyhdr}                    %% page
+\usepackage{minitoc}                     %% toc
+\usepackage{subfiles}                    %% subdocs
+\usepackage{draftwatermark}              %% watermark
+\usepackage{titling}                     %% titlepage
+
+%% Extensions in bundle package
+\usepackage{amssymb, graphicx, makeidx, tabularx, textcomp}
+\usepackage[utf8]{inputenc}              %% input encoding
+
+%% Configuration
+\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
+%\idxlayout{font=footnotesize, columns=3}
+%\renewcommand{\bibfont}{\footnotesize}
+%\renewcommand{\bibsep}{3pt}
Index: MO/trunk/doc/latex/global/styles.sty
===================================================================
--- /NEMO/trunk/doc/latex/global/styles.sty	(revision 11173)
+++ 	(revision )
@@ -1,63 +1,0 @@
-%% Styles
-%% ==============================================================================
-
-%\pagestyle{fancy}
-\bibliographystyle{../../global/ametsoc}
-
-%% Additionnal fonts
-\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
-
-%% Hyperref
-\hypersetup{
-%  pdftitle={\heading},
-%  pdfauthor={\1stauthor and \2ndauthor},
-  colorlinks
-}
-
-%% Page layout
-%\fancyhf{}
-%\fancyhead[LE,RO]{\bfseries\thepage}
-%\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
-%\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
-%\fancyhead[RE]{\bfseries\leftmark}
-%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
-%\renewcommand{\headrulewidth}{0.5pt}
-%\renewcommand{\footrulewidth}{0pt  }
-%\addtolength{\headheight}{2.6pt}
-
-
-%% Catcodes
-%\makeatletter
-%\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
-%\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
-%\def\GrosCarreAvecUnChiffre#1{
-%	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
-%	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
-% 	\vrule height 0pt width 1cm depth 0pt
-%}
-%\def\@makechapterhead#1{
-%	\hbox{
-%		\huge\LignesVerticales\hspace{-0.5cm}
-%		\GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
-%		\hbox{#1}
-%	}
-%	\par\vskip
-%1cm
-%}
-%\def\@makeschapterhead#1{
-%	\hbox{
-%		\huge\LignesVerticales
-%		\hbox{#1}
-%	}
-%	\par\vskip
-%2cm
-%}
-%\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
-%  \hbox{}
-%  \vspace*{\fill}
-%  \vspace{\fill}
-%  \thispagestyle{empty}
-%  \newpage
-%  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
-%\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
-%\makeatother
Index: /NEMO/trunk/doc/latex/global/styles.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/styles.tex	(revision 11174)
+++ /NEMO/trunk/doc/latex/global/styles.tex	(revision 11174)
@@ -0,0 +1,63 @@
+%% Styles
+%% ==============================================================================
+
+%\pagestyle{fancy}
+\bibliographystyle{../../global/ametsoc}
+
+%% Additionnal fonts
+\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
+
+%% Hyperref
+\hypersetup{
+%  pdftitle={\heading},
+%  pdfauthor={\1stauthor and \2ndauthor},
+  colorlinks
+}
+
+%% Page layout
+%\fancyhf{}
+%\fancyhead[LE,RO]{\bfseries\thepage}
+%\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
+%\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
+%\fancyhead[RE]{\bfseries\leftmark}
+%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+%\renewcommand{\headrulewidth}{0.5pt}
+%\renewcommand{\footrulewidth}{0pt  }
+%\addtolength{\headheight}{2.6pt}
+
+
+%% Catcodes
+%\makeatletter
+%\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
+%\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
+%\def\GrosCarreAvecUnChiffre#1{
+%	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
+%	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
+% 	\vrule height 0pt width 1cm depth 0pt
+%}
+%\def\@makechapterhead#1{
+%	\hbox{
+%		\huge\LignesVerticales\hspace{-0.5cm}
+%		\GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
+%		\hbox{#1}
+%	}
+%	\par\vskip
+%1cm
+%}
+%\def\@makeschapterhead#1{
+%	\hbox{
+%		\huge\LignesVerticales
+%		\hbox{#1}
+%	}
+%	\par\vskip
+%2cm
+%}
+%\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
+%  \hbox{}
+%  \vspace*{\fill}
+%  \vspace{\fill}
+%  \thispagestyle{empty}
+%  \newpage
+%  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
+%\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
+%\makeatother
Index: MO/trunk/doc/latex/global/todonotes.sty
===================================================================
--- /NEMO/trunk/doc/latex/global/todonotes.sty	(revision 11173)
+++ 	(revision )
@@ -1,38 +1,0 @@
-\newcounter{ubcomment}
-\newcommand{\ubcomment}[2][]{%
-\refstepcounter{ubcomment}%
-{%
-\todo[linecolor=black,backgroundcolor={green!40!},size=\footnotesize]{%
-\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
-}}
-\newcommand{\ubcommentinline}[2][]{%
-\refstepcounter{ubcomment}%
-{%
-\todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize]{%
-\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
-}}
-
-\newcommand{\ubcommentmultiline}[2]{%
-\refstepcounter{ubcomment}%
-{%
-\todo[linecolor=black,inline,caption={\textbf{{Fixme: UB}
-    [\theubcomment] #1}} ,backgroundcolor={green!40!},size=\footnotesize]{%
-\textbf{Fixme: UB [\theubcomment]:}~#2}%
-}}
-
-% add support for todo in equations
-%\usepackage{marginnote}
-%\makeatletter
-%\renewcommand{\@todonotes@drawMarginNoteWithLine}{%
-%\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
-%    \node [coordinate] (inText) {};%
-%\end{tikzpicture}%
-%\marginnote[{% Draw note in left margin
-%    \@todonotes@drawMarginNote%
-%    \@todonotes@drawLineToLeftMargin%
-%}]{% Draw note in right margin
-%    \@todonotes@drawMarginNote%
-%    \@todonotes@drawLineToRightMargin%
-%}%
-%}
-%\makeatother
Index: /NEMO/trunk/doc/latex/global/todonotes.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/todonotes.tex	(revision 11174)
+++ /NEMO/trunk/doc/latex/global/todonotes.tex	(revision 11174)
@@ -0,0 +1,38 @@
+\newcounter{ubcomment}
+\newcommand{\ubcomment}[2][]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
+}}
+\newcommand{\ubcommentinline}[2][]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
+}}
+
+\newcommand{\ubcommentmultiline}[2]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,inline,caption={\textbf{{Fixme: UB}
+    [\theubcomment] #1}} ,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\theubcomment]:}~#2}%
+}}
+
+% add support for todo in equations
+%\usepackage{marginnote}
+%\makeatletter
+%\renewcommand{\@todonotes@drawMarginNoteWithLine}{%
+%\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+%    \node [coordinate] (inText) {};%
+%\end{tikzpicture}%
+%\marginnote[{% Draw note in left margin
+%    \@todonotes@drawMarginNote%
+%    \@todonotes@drawLineToLeftMargin%
+%}]{% Draw note in right margin
+%    \@todonotes@drawMarginNote%
+%    \@todonotes@drawLineToRightMargin%
+%}%
+%}
+%\makeatother
