Index: /NEMO/trunk/doc/latex/.svnignore
===================================================================
--- /NEMO/trunk/doc/latex/.svnignore	(revision 14256)
+++ /NEMO/trunk/doc/latex/.svnignore	(revision 14257)
@@ -11,3 +11,3 @@
 *.toc
 *.xdv
-_minted-*
+cache*
Index: /NEMO/trunk/doc/latex/NEMO/main/NEMO_manual.ist
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/NEMO_manual.ist	(revision 14257)
+++ /NEMO/trunk/doc/latex/NEMO/main/NEMO_manual.ist	(revision 14257)
@@ -0,0 +1,1 @@
+link ../../global/index.ist
Index: /NEMO/trunk/doc/latex/NEMO/main/abstract.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/abstract.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/abstract.tex	(revision 14257)
@@ -1,17 +1,8 @@
-%% ================================================================
-%% Abstract
-%% ================================================================
+%% =================================================================================================
+%% Specific abstract
+%% =================================================================================================
 
-%% Common part between NEMO-SI3-TOP
-\NEMO\ (``Nucleus for European Modelling of the Ocean'') is a framework of ocean-related engines.
-It is intended to be a flexible tool for studying the ocean dynamics and thermodynamics (``blue ocean''),
-as well as its interactions with the components of the Earth climate system over
-a wide range of space and time scales.
-Within \NEMO, the ocean engine is interfaced with a sea-ice model (\SIcube\ or
-\href{http://github.com/CICE-Consortium/CICE}{CICE}),
-passive tracers and biogeochemical models (\TOP) and,
-via the \href{http://portal.enes.org/oasis}{OASIS} coupler,
-with several atmospheric general circulation models.
-It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software.
+%% Common part
+\input{../../global/nemo}
 
 %% Specific part
Index: /NEMO/trunk/doc/latex/NEMO/main/appendices.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/appendices.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/appendices.tex	(revision 14257)
@@ -1,2 +1,5 @@
+%% =================================================================================================
+%% Appendices
+%% =================================================================================================
 
 \subfile{../subfiles/apdx_s_coord}      %% A. Generalised vertical coordinate
Index: /NEMO/trunk/doc/latex/NEMO/main/authors.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/authors.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/authors.tex	(revision 14257)
@@ -1,34 +1,9 @@
-%Romain Bourdall\'{e}-Badie
-%\orcid{0000-0002-8742-3289} \\
-%Mike Bell                   \\
-%J\'{e}r\^{o}me Chanut       \\
-%Emanuela Clementi
-%\orcid{0000-0002-5752-1849} \\
-%Andrew Coward
-%\orcid{0000-0002-0456-129X} \\
-%Massimiliano Drudi
-%\orcid{0000-0002-9951-740X} \\
-%Christian \'{E}th\'{e}      \\
-%Doroteaciro Iovino
-%\orcid{0000-0001-5132-7255} \\
-%Dan Lea                     \\
-%Claire L\'{e}vy
-%\orcid{0000-0003-2518-6692} \\
-%Gurvan Madec
-%\orcid{0000-0002-6447-4198} \\
-%Nicolas Martin              \\
-%S\'{e}bastien Masson
-%\orcid{0000-0002-1694-8117} \\
-%Pierre Mathiot              \\
-%Silvia Mocavero
-%\orcid{0000-0002-6309-8282} \\
-%Simon M\"{u}ller            \\
-%George Nurser               \\
-%Guillaume Samson
-%\orcid{0000-0001-7481-6369} \\
-%Dave Storkey
+%% =================================================================================================
+%% Authors
+%% =================================================================================================
 
+\orcid{0000-0002-6447-4198} Gurvan Madec                \\
+                            Mike Bell                   \\
 \orcid{0000-0002-8742-3289} Romain Bourdall\'{e}-Badie  \\
-                            Mike Bell                   \\
                             J\'{e}r\^{o}me Chanut       \\
 \orcid{0000-0002-5752-1849} Emanuela Clementi           \\
@@ -39,5 +14,4 @@
                             Dan Lea                     \\
 \orcid{0000-0003-2518-6692} Claire L\'{e}vy             \\
-\orcid{0000-0002-6447-4198} Gurvan Madec                \\
                             Nicolas Martin              \\
 \orcid{0000-0002-1694-8117} S\'{e}bastien Masson        \\
Index: /NEMO/trunk/doc/latex/NEMO/main/chapters.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/chapters.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/chapters.tex	(revision 14257)
@@ -1,17 +1,21 @@
-\subfile{../subfiles/chap_model_basics}   %% 1.
-\subfile{../subfiles/chap_time_domain}    %% 2.  Time discretisation (time stepping strategy)
-\subfile{../subfiles/chap_DOM}            %% 3.  Space discretisation
-\subfile{../subfiles/chap_TRA}            %% 4.  Tracer advection/diffusion equation
-\subfile{../subfiles/chap_DYN}            %% 5.  Dynamics : momentum equation
-\subfile{../subfiles/chap_SBC}            %% 6.  Surface Boundary Conditions
-\subfile{../subfiles/chap_LBC}            %% 7.  Lateral Boundary Conditions
-\subfile{../subfiles/chap_LDF}            %% 8.  Lateral diffusion
-\subfile{../subfiles/chap_ZDF}            %% 9.  Vertical diffusion
-\subfile{../subfiles/chap_DIA}            %% 10. Outputs and Diagnostics
-\subfile{../subfiles/chap_OBS}            %% 11. Observation operator
-\subfile{../subfiles/chap_ASM}            %% 12. Assimilation increments
-\subfile{../subfiles/chap_STO}            %% 13. Stochastic param.
-\subfile{../subfiles/chap_misc}           %% 14. Miscellaneous topics
-\subfile{../subfiles/chap_cfgs}           %% 15. Predefined configurations
+%% =================================================================================================
+%% Chapters
+%% =================================================================================================
+
+\subfile{../subfiles/chap_model_basics} %% Continuous equations and assumptions
+\subfile{../subfiles/chap_time_domain}  %% Time discretisation (time stepping strategy)
+\subfile{../subfiles/chap_DOM}          %% Space discretisation
+\subfile{../subfiles/chap_TRA}          %% Tracer advection/diffusion equation
+\subfile{../subfiles/chap_DYN}          %% Dynamics : momentum equation
+\subfile{../subfiles/chap_SBC}          %% Surface Boundary Conditions
+\subfile{../subfiles/chap_LBC}          %% Lateral Boundary Conditions
+\subfile{../subfiles/chap_LDF}          %% Lateral diffusion
+\subfile{../subfiles/chap_ZDF}          %% Vertical diffusion
+\subfile{../subfiles/chap_DIA}          %% Outputs and Diagnostics
+\subfile{../subfiles/chap_OBS}          %% Observation operator
+\subfile{../subfiles/chap_ASM}          %% Assimilation increments
+\subfile{../subfiles/chap_STO}          %% Stochastic param.
+\subfile{../subfiles/chap_misc}         %% Miscellaneous topics
+\subfile{../subfiles/chap_cfgs}         %% Predefined configurations
 
 %% Not included
Index: /NEMO/trunk/doc/latex/NEMO/main/introduction.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/introduction.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/introduction.tex	(revision 14257)
@@ -1,21 +1,3 @@
-
 \chapter*{Introduction}
-
-%\chaptertoc
-
-%\paragraph{Changes record} ~\\
-
-%\thispagestyle{plain}
-
-%{\footnotesize
-%  \begin{tabularx}{\textwidth}{l||X|X}
-%    Release & Author(s) & Modifications \\
-%    \hline
-%    {\em x.x} & {\em ...} & {\em ...}   \\
-%    {\em ...} & {\em ...} & {\em ...}   \\
-%  \end{tabularx}
-%}
-
-%\clearpage
 
 The \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean (\NEMO) is
Index: /NEMO/trunk/doc/latex/NEMO/main/settings.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/main/settings.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/main/settings.tex	(revision 14257)
@@ -1,20 +1,20 @@
-%% Engine (subfolder name)
-\def \engine{NEMO}
+%% Engine
+\def\eng{NEMO}
 
-%% Cover page settings
-\def \spacetop{  \vspace*{1.85cm} }
-\def \heading{NEMO ocean engine}
-%\def \subheading{}
-\def \spacedown{ \vspace*{0.75cm } }
-\def \authorswidth{ 0.3\linewidth}
-\def \rulelenght{270pt}
-\def \abstractwidth{0.6\linewidth}
+%% Cover page
+\def\spcup{\vspace*{2.15cm}}
+\def\hdg{NEMO ocean engine}
+%\def\shdg{}
+\def\spcdn{\vspace*{1cm}}
+\def\autwd{0.25\linewidth}
+\def\lnlg{270pt}
+\def\abswd{0.65\linewidth}
 
-%% Manual color (frontpage banner, links  and chapter boxes)
-\def \setmanualcolor{ \definecolor{manualcolor}{cmyk}{1, .60, 0, .4} }
+%% Color in cmyk model for manual theme (frontpage banner, links and chapter boxes)
+\def\clr{1,.60,0,.4}
 
 %% IPSL publication number
-\def \ipslnum{27}
+\def\ipsl{27}
 
-%% Zenodo ID, i.e. doi:10.5281/zenodo.\([0-9]*\)
-\def \zid{1464816}
+%% Zenodo ID, i.e. doi:10.5281/zenodo.\zid
+\def\zid{1464816}
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 14257)
@@ -7,6 +7,4 @@
 
 %    {\em 4.0} & {\em Andrew Coward} & {\em Created at v4.0 from materials removed from chap\_DOM that are still relevant to the \forcode{DOMAINcfg} tool and which illustrate and explain the choices to be made by the user when setting up new domains }  \\
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -91,5 +89,5 @@
  \item [{\np{jphgr_mesh}{jphgr\_mesh}=0}]  The most general curvilinear orthogonal grids.
   The coordinates and their first derivatives with respect to $i$ and $j$ are provided
-  in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module.
+  in a input file (\textit{coordinates.nc}), read in \rou{hgr\_read} subroutine of the domhgr module.
   This is now the only option available within \NEMO\ itself from v4.0 onwards.
 \item [{\np{jphgr_mesh}{jphgr\_mesh}=1 to 5}] A few simple analytical grids are provided (see below).
@@ -156,6 +154,6 @@
 The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and
 $gdepw_0$ for $t$- and $w$-points, respectively. See \autoref{sec:DOMCFG_sco} for the
-S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \jp{jpk} is the number of
-$w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \jp{jpk}-1 $t$-points
+S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \texttt{jpk} is the number of
+$w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \texttt{jpk}-1 $t$-points
 inside the ocean, the additional $t$-point at $jk = jpk$ is below the sea floor and is not
 used.  The vertical location of $w$- and $t$-levels is defined from the analytic
@@ -167,5 +165,5 @@
 
 It is possible to define a simple regular vertical grid by giving zero stretching
-(\np[=0]{ppacr}{ppacr}).  In that case, the parameters \jp{jpk} (number of $w$-levels)
+(\np[=0]{ppacr}{ppacr}).  In that case, the parameters \texttt{jpk} (number of $w$-levels)
 and \np{pphmax}{pphmax} (total ocean depth in meters) fully define the grid.
 
@@ -179,5 +177,5 @@
 \end{gather}
 
-where $k = 1$ to \jp{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $t-$levels.  Such an
+where $k = 1$ to \texttt{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $t-$levels.  Such an
 expression allows us to define a nearly uniform vertical location of levels at the ocean
 top and bottom with a smooth hyperbolic tangent transition in between (\autoref{fig:DOMCFG_zgr}).
@@ -227,5 +225,5 @@
 \end{equation}
 
-With the choice of the stretching $h_{cr} = 3$ and the number of levels \jp{jpk}~$= 31$,
+With the choice of the stretching $h_{cr} = 3$ and the number of levels \texttt{jpk}~$= 31$,
 the four coefficients $h_{sur}$, $h_0$, $h_1$, and $h_{th}$ in
 \autoref{eq:DOMCFG_zgr_ana_2} have been determined such that \autoref{eq:DOMCFG_zgr_coef}
@@ -245,5 +243,5 @@
   Values from $3$ to $10$ are usual.
 \item \np{ppkth}{ppkth}~$= h_{th}$: is approximately the model level at which maximum stretching occurs
-  (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk})
+  (nondimensional, usually of order 1/2 or 2/3 of \texttt{jpk})
 \item \np{ppdzmin}{ppdzmin}: minimum thickness for the top layer (in meters).
 \item \np{pphmax}{pphmax}: total depth of the ocean (meters).
@@ -251,5 +249,5 @@
 
 As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are:
-\jp{jpk}~$= 46$, \np{ppacr}{ppacr}~$= 9$, \np{ppkth}{ppkth}~$= 23.563$, \np{ppdzmin}{ppdzmin}~$= 6~m$,
+\texttt{jpk}~$= 46$, \np{ppacr}{ppacr}~$= 9$, \np{ppkth}{ppkth}~$= 23.563$, \np{ppdzmin}{ppdzmin}~$= 6~m$,
 \np{pphmax}{pphmax}~$= 5750~m$.
 
@@ -346,5 +344,5 @@
   This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount.
 \item [{\np[=1]{nn_bathy}{nn\_bathy}}]: read a bathymetry and ice shelf draft (if needed).
-  The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at
+  The \textit{bathy\_meter.nc} file (Netcdf format) provides the ocean depth (positive, in meters) at
   each grid point of the model grid.
   The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto
@@ -353,5 +351,5 @@
   no wet levels are defined (all levels are masked).
 
-  The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at
+  The \textit{isfdraft\_meter.nc} file (Netcdf format) provides the ice shelf draft (positive, in meters) at
   each grid point of the model grid.
   This file is only needed if \np[=.true.]{ln_isfcav}{ln\_isfcav}.
@@ -396,8 +394,8 @@
 bathymetry varies by less than one level thickness from one grid point to the next).  The
 reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry.
-With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than
+With partial steps, layers from 1 to \texttt{jpk-2} can have a thickness smaller than
 $e_{3t}(jk)$.
 
-The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger
+The model deepest layer (\texttt{jpk-1}) is allowed to have either a smaller or larger
 thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$.
 
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Note on some algorithms}
 \label{apdx:ALGOS}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Diffusive Operators}
 \label{apdx:DIFFOPERS}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Discrete Invariants of the Equations}
 \label{apdx:INVARIANTS}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_s_coord.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_s_coord.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_s_coord.tex	(revision 14257)
@@ -8,6 +8,4 @@
 %    {\em 4.0} & {\em Mike Bell} & {\em review}  \\
 %    {\em 3.x} & {\em Gurvan Madec} & {\em original}  \\
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_triads.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_triads.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/apdx_triads.tex	(revision 14257)
@@ -15,6 +15,4 @@
 \chapter{Iso-Neutral Diffusion and Eddy Advection using Triads}
 \label{apdx:TRIADS}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 14257)
@@ -8,6 +8,4 @@
 %    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\
 %    {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version}  \\
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 14257)
@@ -11,6 +11,4 @@
 %    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\
 %    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -666,5 +664,5 @@
 \end{forlines}
 
-\noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d}
+\noindent will give the following file name radical: \textit{myfile\_ORCA2\_19891231\_freq1d}
 
 %% =================================================================================================
@@ -1942,9 +1940,9 @@
 When \np[=.true.]{ln_subbas}{ln\_subbas}, transports and stream function are computed for the Atlantic, Indian,
 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean.
-The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays,
+The sub-basin decomposition requires an input file (\textit{subbasins}) which contains three 2D mask arrays,
 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}).
 
 \begin{listing}
-  \nlst{namptr}
+%  \nlst{namptr}
   \caption{\forcode{&namptr}}
   \label{lst:namptr}
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Diurnal SST Models (DIU)}
 \label{chap:DIU}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 14257)
@@ -14,6 +14,4 @@
 % -    domclo: closed sea and lakes....
 %              management of closea sea area: specific to global cfg, both forced and coupled
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -368,6 +366,6 @@
 \label{subsec:DOM_size}
 
-The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and
-\jp{jpkglo} for the $i$, $j$ and $k$ directions, respectively.
+The total size of the computational domain is set by the parameters \texttt{jpiglo}, \texttt{jpjglo} and
+\texttt{jpkglo} for the $i$, $j$ and $k$ directions, respectively.
 Note, that the variables \texttt{jpi} and \texttt{jpj} refer to
 the size of each processor subdomain when the code is run in parallel using domain decomposition
@@ -379,7 +377,7 @@
 in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{nn\_cfg} are set from these values accordingly).
 
-The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}.
+The global lateral boundary condition type is selected from 8 options using parameter \texttt{jperio}.
 See \autoref{sec:LBC_jperio} for details on the available options and
-the corresponding values for \jp{jperio}.
+the corresponding values for \texttt{jperio}.
 
 %% =================================================================================================
@@ -465,5 +463,5 @@
 \begin{enumerate}
 \item the bathymetry given in meters;
-\item the number of levels of the model (\jp{jpk});
+\item the number of levels of the model (\texttt{jpk});
 \item the analytical transformation $z(i,j,k)$ and the vertical scale factors
   (derivatives of the transformation); and
@@ -575,6 +573,6 @@
 every gridcell in the model regardless of the choice of vertical coordinate.
 With constant z-levels, e3 metrics will be uniform across each horizontal level.
-In the partial step case each e3 at the \jp{bottom\_level}
-(and, possibly, \jp{top\_level} if ice cavities are present)
+In the partial step case each e3 at the \texttt{bottom\_level}
+(and, possibly, \texttt{top\_level} if ice cavities are present)
 may vary from its horizontal neighbours.
 And, in s-coordinates, variations can occur throughout the water column.
@@ -585,8 +583,8 @@
 those arising from a flat sea surface with zero elevation.
 
-The \jp{bottom\_level} and \jp{top\_level} 2D arrays define
-the \jp{bottom\_level} and top wet levels in each grid column.
-Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else).
-With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf.
+The \texttt{bottom\_level} and \texttt{top\_level} 2D arrays define
+the \texttt{bottom\_level} and top wet levels in each grid column.
+Without ice cavities, \texttt{top\_level} is essentially a land mask (0 on land; 1 everywhere else).
+With ice cavities, \texttt{top\_level} determines the first wet point below the overlying ice shelf.
 
 %% =================================================================================================
@@ -594,5 +592,5 @@
 \label{subsec:DOM_msk}
 
-From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows:
+From \texttt{top\_level} and \texttt{bottom\_level} fields, the mask fields are defined as follows:
 \begin{align*}
   tmask(i,j,k) &=
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Ocean Dynamics (DYN)}
 \label{chap:DYN}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Lateral Boundary Condition (LBC)}
 \label{chap:LBC}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -161,5 +159,5 @@
 
 %% =================================================================================================
-\section[Model domain boundary condition (\forcode{jperio})]{Model domain boundary condition (\protect\jp{jperio})}
+\section{Model domain boundary condition (\forcode{jperio})}
 \label{sec:LBC_jperio}
 
@@ -170,9 +168,9 @@
 
 %% =================================================================================================
-\subsection[Closed, cyclic (\forcode{=0,1,2,7})]{Closed, cyclic (\protect\jp{jperio}\forcode{=0,1,2,7})}
+\subsection{Closed, cyclic (\forcode{jperio={0,1,2,7}})}
 \label{subsec:LBC_jperio012}
 
 The choice of closed or cyclic model domain boundary condition is made by
-setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}.
+setting \forcode{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}.
 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}.
 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$,
@@ -183,18 +181,18 @@
 \begin{description}
 
-\item [For closed boundary (\jp{jperio}\forcode{=0})], solid walls are imposed at all model boundaries:
+\item [For closed boundary (\forcode{jperio=0})], solid walls are imposed at all model boundaries:
   first and last rows and columns are set to zero.
 
-\item [For cyclic east-west boundary (\jp{jperio}\forcode{=1})], first and last rows are set to zero (closed) whilst the first column is set to
+\item [For cyclic east-west boundary (\forcode{jperio=1})], first and last rows are set to zero (closed) whilst the first column is set to
   the value of the last-but-one column and the last column to the value of the second one
   (\autoref{fig:LBC_jperio}-a).
   Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end.
 
-\item [For cyclic north-south boundary (\jp{jperio}\forcode{=2})], first and last columns are set to zero (closed) whilst the first row is set to
+\item [For cyclic north-south boundary (\forcode{jperio=2})], first and last columns are set to zero (closed) whilst the first row is set to
   the value of the last-but-one row and the last row to the value of the second one
   (\autoref{fig:LBC_jperio}-a).
   Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end.
 
-\item [Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{=7})] combines cases 1 and 2.
+\item [Bi-cyclic east-west and north-south boundary (\forcode{jperio=7})] combines cases 1 and 2.
 
 \end{description}
@@ -209,5 +207,5 @@
 
 %% =================================================================================================
-\subsection[North-fold (\forcode{=3,6})]{North-fold (\protect\jp{jperio}\forcode{=3,6})}
+\subsection{North-fold (\forcode{jperio={3,6}})}
 \label{subsec:LBC_north_fold}
 
@@ -288,9 +286,9 @@
 Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory.
 For this reason,
-the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}.
+the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \texttt{jpi}, \texttt{jpj}, \texttt{jpk}.
 These dimensions include the internal domain and the overlapping rows.
-The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce},
+The number of rows to exchange (known as the halo) is usually set to one (\forcode{nn_hls=1}, in \mdl{par\_oce},
 and must be kept to one until further notice).
-The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}.
+The whole domain dimensions are named \texttt{jpiglo}, \texttt{jpjglo} and \texttt{jpk}.
 The relationship between the whole domain and a sub-domain is:
 \begin{gather*}
@@ -299,5 +297,5 @@
 \end{gather*}
 
-One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj.
+One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \texttt{jpi} is now always equal to nlci and \texttt{jpj} equal to nlcj.
 
 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,
@@ -309,5 +307,5 @@
 with $1 \leq i \leq jpi$, $1  \leq j \leq jpj $ , and  $1  \leq k \leq jpk$.
 
-The 1-d arrays $mig(1:\jp{jpi})$ and $mjg(1:\jp{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\jp{jpiglo})$, $mi1(1:\jp{jpiglo})$ and $mj0(1:\jp{jpjglo})$, $mj1(1:\jp{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\
+The 1-d arrays $mig(1:\texttt{jpi})$ and $mjg(1:\texttt{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\texttt{jpiglo})$, $mi1(1:\texttt{jpiglo})$ and $mj0(1:\texttt{jpjglo})$, $mj1(1:\texttt{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\
 
 The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). It is therefore possible that an MPI subdomain contains only land points. To save ressources, we try to supress from the computational domain as much land subdomains as possible. For example if $N_{mpi}$ processes are allocated to NEMO, the domain decomposition will be given by the following equation:
@@ -372,6 +370,6 @@
 The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}.
 Each boundary set can be either defined as a series of straight line segments directly in the namelist
-(\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \forcode{&nambdy_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\ifile{coordinates.bdy}'' file must be provided).
-The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file.
+(\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \forcode{&nambdy_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\textit{coordinates.bdy.nc}'' file must be provided).
+The coordinates.bdy file is analagous to the usual \NEMO\ ``\textit{coordinates.nc}'' file.
 In the example above, there are two boundary sets, the first of which is defined via a file and
 the second is defined in the namelist.
@@ -570,14 +568,14 @@
 
 The boundary geometry for each set may be defined in a namelist \forcode{&nambdy_index} or
-by reading in a ``\ifile{coordinates.bdy}'' file.
-The \texttt{nambdy\_index} namelist defines a series of straight-line segments for north, east, south and west boundaries.
-One \texttt{nambdy\_index} namelist block is needed for each boundary condition defined by indexes.
+by reading in a ``\textit{coordinates.bdy.nc}'' file.
+The \forcode{&nambdy_index} namelist defines a series of straight-line segments for north, east, south and west boundaries.
+One \forcode{&nambdy_index} namelist block is needed for each boundary condition defined by indexes.
 For the northern boundary, \texttt{nbdysegn} gives the number of segments,
-\jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and
-\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries.
+\texttt{jpjnob} gives the $j$ index for each segment and \texttt{jpindt} and
+\texttt{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries.
 These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$).
 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np[>1]{nn_rimwidth}{nn\_rimwidth}.
 
-The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file.
+The boundary geometry may also be defined from a ``\textit{coordinates.bdy.nc}'' file.
 \autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above.
 The file should contain the index arrays for each of the $T$, $U$ and $V$ grids.
@@ -633,6 +631,6 @@
   \centering
   \includegraphics[width=0.66\textwidth]{LBC_nc_header}
-  \caption[Header for a \protect\ifile{coordinates.bdy} file]{
-    Example of the header for a \protect\ifile{coordinates.bdy} file}
+  \caption[Header for a \textit{coordinates.bdy.nc} file]{
+    Example of the header for a \textit{coordinates.bdy.nc} file}
   \label{fig:LBC_nc_header}
 \end{figure}
@@ -684,15 +682,15 @@
 \texttt{<constituent>\_z1} and \texttt{<constituent>\_z2} for the real and imaginary parts of
 SSH, respectively, are expected to be available in file
-\ifile{<input>\_grid\_T}, variables \texttt{<constituent>\_u1} and
+\textit{<input>\_grid\_T.nc}, variables \texttt{<constituent>\_u1} and
 \texttt{<constituent>\_u2} for the real and imaginary parts of u, respectively, in file
-\ifile{<input>\_grid\_U}, and \texttt{<constituent>\_v1} and
+\textit{<input>\_grid\_U.nc}, and \texttt{<constituent>\_v1} and
 \texttt{<constituent>\_v2} for the real and imaginary parts of v, respectively, in file
-\ifile{<input>\_grid\_V}; when data along open boundary segments is used,
+\textit{<input>\_grid\_V.nc}; when data along open boundary segments is used,
 variables \texttt{z1} and \texttt{z2} (real and imaginary part of SSH) are
-expected to be available in file \ifile{<input><constituent>\_grid\_T},
+expected to be available in file \textit{<input><constituent>\_grid\_T.nc},
 variables \texttt{u1} and \texttt{u2} (real and imaginary part of u) in file
-\ifile{<input><constituent>\_grid\_U}, and variables \texttt{v1} and \texttt{v2}
+\textit{<input><constituent>\_grid\_U.nc}, and variables \texttt{v1} and \texttt{v2}
 (real and imaginary part of v) in file
-\ifile{<input><constituent>\_grid\_V}.\par
+\textit{<input><constituent>\_grid\_V.nc}.\par
 
 Note that the barotropic velocity components are assumed to be defined
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Lateral Ocean Physics (LDF)}
 \label{chap:LDF}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 14257)
@@ -14,6 +14,4 @@
 %    {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---}  \\
 %\end{tabular}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -420,5 +418,5 @@
 
 To use Sea Level Anomaly (SLA) data the mean dynamic topography (MDT) must be provided in a separate file defined on
-the model grid called \ifile{slaReferenceLevel}.
+the model grid called \textit{slaReferenceLevel.nc}.
 The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height.
 Below is an example header for this file (on the ORCA025 grid).
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB, TDE)}
 \label{chap:SBC}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -646,6 +644,6 @@
 parameters. It is therefore recommended to chose version 3.6 over 3.
 
-\subsection{Cool-skin and warm-layer parametrizations}
-%\subsection[Cool-skin and warm-layer parameterizations (\forcode{ln_skin_cs} \& \forcode{ln_skin_wl})]{Cool-skin and warm-layer parameterizations (\protect\np{ln_skin_cs}{ln\_skin\_cs} \& \np{ln_skin_wl}{ln\_skin\_wl})}
+\subsection[Cool-skin and warm-layer parameterizations (   \forcode{ln_skin_cs}               \& \forcode{ln_skin_wl}              )]
+           {Cool-skin and warm-layer parameterizations (\protect\np{ln_skin_cs}{ln\_skin\_cs} \&      \np{ln_skin_wl}{ln\_skin\_wl})}
 \label{subsec:SBC_skin}
 
@@ -979,9 +977,9 @@
   ocean tide model}: Mf, Mm, Ssa, Mtm, Msf, Msqm, Sa, K1, O1, P1, Q1, J1, S1,
 M2, S2, N2, K2, nu2, mu2, 2N2, L2, T2, eps2, lam2, R2, M3, MKS2, MN4, MS4, M4,
-N4, S4, M6, and M8; see file \hf{tide} and \mdl{tide\_mod} for further
+N4, S4, M6, and M8; see file \textit{tide.h90} and \mdl{tide\_mod} for further
 information and references\footnote{As a legacy option \np{ln_tide_var} can be
   set to \forcode{0}, in which case the 19 tidal constituents (M2, N2, 2N2, S2,
   K2, K1, O1, Q1, P1, M4, Mf, Mm, Msqm, Mtm, S1, MU2, NU2, L2, and T2; see file
-  \hf{tide}) and associated parameters that have been available in NEMO version
+  \textit{tide.h90}) and associated parameters that have been available in NEMO version
   4.0 and earlier are available}. Constituents to be included in the tidal forcing
 (surface and lateral boundaries) are selected by enumerating their respective
@@ -1013,5 +1011,5 @@
 potential). The tidal tilt factor $\gamma = 1 + k - h$ includes the
 Love numbers $k$ and $h$ \citep{love_PRSL09}; this factor is
-configurable using \np{rn_tide_gamma} (default value 0.7). Optionally,
+configurable using \np{rn_tide_gamma}{rn\_tide\_gamma} (default value 0.7). Optionally,
 when \np[=.true.]{ln_tide_ramp}{ln\_tide\_ramp}, the equilibrium tidal
 forcing can be ramped up linearly from zero during the initial
@@ -1187,5 +1185,5 @@
 
 \begin{listing}
-  \nlst{namsbc_isf}
+%  \nlst{namsbc_isf}
   \caption{\forcode{&namsbc_isf}}
   \label{lst:namsbc_isf}
@@ -1292,5 +1290,5 @@
 
 \begin{listing}
-  \nlst{namsbc_iscpl}
+%  \nlst{namsbc_iscpl}
   \caption{\forcode{&namsbc_iscpl}}
   \label{lst:namsbc_iscpl}
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Stochastic Parametrization of EOS (STO)}
 \label{chap:STO}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Ocean Tracers (TRA)}
 \label{chap:TRA}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -930,5 +928,5 @@
 When \np{nn_geoflx}{nn\_geoflx} is set to 2,
 a spatially varying geothermal heat flux is introduced which is provided in
-the \ifile{geothermal\_heating} NetCDF file
+the \textit{geothermal\_heating.nc} NetCDF file
 (\autoref{fig:TRA_geothermal}) \citep{emile-geay.madec_OS09}.
 
@@ -1151,5 +1149,5 @@
 \citep{madec.delecluse.ea_JPO96}.
 
-For generating \ifile{resto},
+For generating \textit{resto.nc},
 see the documentation for the DMP tools provided with the source code under \path{./tools/DMP_TOOLS}.
 
@@ -1175,5 +1173,5 @@
 $\gamma$ is initialized as \np{rn_atfp}{rn\_atfp}, its default value is \forcode{10.e-3}.
 Note that the forcing correction term in the filter is not applied in linear free surface
-(\jp{ln\_linssh}\forcode{=.true.}) (see \autoref{subsec:TRA_sbc}).
+(\np[=.true.]{ln_linssh}{ln\_linssh}) (see \autoref{subsec:TRA_sbc}).
 Not also that in constant volume case, the time stepping is performed on $T$,
 not on its content, $e_{3t}T$.
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 14257)
@@ -8,6 +8,4 @@
 \chapter{Vertical Ocean Physics (ZDF)}
 \label{chap:ZDF}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -1181,5 +1179,5 @@
 These values are assigned in \mdl{zdfdrg}.
 Note that there is support for local enhancement of these values via an externally defined 2D mask array
-(\np[=.true.]{ln_boost}{ln\_boost}) given in the \ifile{bfr\_coef} input NetCDF file.
+(\np[=.true.]{ln_boost}{ln\_boost}) given in the \textit{bfr\_coef.nc} input NetCDF file.
 The mask values should vary from 0 to 1.
 Locations with a non-zero mask value will have the friction coefficient increased by
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_cfgs.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_cfgs.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_cfgs.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Configurations}
 \label{chap:CFGS}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -85,5 +83,5 @@
 the SI3 model (ORCA-ICE) and possibly with PISCES biogeochemical model (ORCA-ICE-PISCES).
 An appropriate namelist is available in \path{./cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2.
-The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file,
+The domain of ORCA2 configuration is defined in \textit{ORCA\_R2\_zps\_domcfg.nc} file,
 this file is available in tar file on the \NEMO\ community zenodo platform: \\
 https://doi.org/10.5281/zenodo.2640723
@@ -152,5 +150,5 @@
 Each of configuration is set through the \textit{domain\_cfg} domain configuration file,
 which sets the grid size and configuration name parameters.
-The \NEMO\ System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file
+The \NEMO\ System Team provides only ORCA2 domain input file "\textit{ORCA\_R2\_zps\_domcfg.nc}" file
 (\autoref{tab:CFGS_ORCA}).
 
@@ -158,5 +156,5 @@
   \centering
   \begin{tabular}{p{4cm} c c c c}
-    Horizontal Grid & \jp{ORCA\_index} & \jp{jpiglo} & \jp{jpjglo} \\
+    Horizontal Grid & \texttt{ORCA\_index} & \texttt{jpiglo} & \texttt{jpjglo} \\
     \hline \hline
     % 4   \deg\ &              4   &          92 &          76 \\
@@ -246,12 +244,13 @@
 Its horizontal resolution (and thus the size of the domain) is determined by
 setting \np{nn_GYRE}{nn\_GYRE} in \nam{usr_def}{usr\_def}:
+
 \begin{align*}
-  \jp{jpiglo} = 30 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} \\
-  \jp{jpjglo} = 20 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}}
+   jpiglo = 30 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}} \\
+   jpjglo = 20 \times \text{\np{nn_GYRE}{nn\_GYRE}} + 2 + 2 \times \text{\np{nn_hls}{nn\_hls}}
 \end{align*}
 
 Obviously, the namelist parameters have to be adjusted to the chosen resolution,
 see the Configurations pages on the \NEMO\ web site (\NEMO\ Configurations).
-In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:DOM_zgr_e3}).
+In the vertical, GYRE uses the default 30 ocean levels (\forcode{jpk = 31}, \autoref{fig:DOM_zgr_e3}).
 
 \begin{listing}
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Invariants of the Primitive Equations}
 \label{chap:CONS}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Miscellaneous Topics}
 \label{chap:MISC}
-
-\thispagestyle{plain}
 
 \chaptertoc
@@ -205,5 +203,5 @@
 
 \noindent Consider an ORCA1
-configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc}
+configuration using the extended grid domain configuration file: \textit{eORCA1\_domcfg.nc}
 This file define a horizontal domain of 362x332.  The first row with
 open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran\ indexing)
@@ -226,5 +224,5 @@
 \noindent Note that with this option, the j-size of the global domain is (extended
 j-size minus \np{open_ocean_jstart}{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value
-for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must
+for the configuration. This means an alternative version of \textit{eORCA1\_domcfg.nc} must
 be created for when \np{ln_use_jattr}{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a
 convenient way of achieving this:
@@ -234,5 +232,5 @@
 \end{cmds}
 
-The domain configuration file is unique in this respect since it also contains the value of \jp{jpjglo}
+The domain configuration file is unique in this respect since it also contains the value of \texttt{jpjglo}
 that is read and used by the model.
 Any other global, 2D and 3D, netcdf, input field can be prepared for use in a reduced domain by adding the
@@ -374,5 +372,5 @@
 
 When more information is required for monitoring or debugging purposes, the various
-forms of output can be selected via the \np{sn\_cfctl} structure. As well as simple
+forms of output can be selected via the \np{sn_cfctl}{sn\_cfctl} structure. As well as simple
 on-off switches this structure also allows selection of a range of processors for
 individual reporting (where appropriate) and a time-increment option to restrict
@@ -449,7 +447,5 @@
 systems so bug-hunting efforts using this facility should also utilise the \fortran:
 
-\begin{forlines} 
-   CALL FLUSH(numout)
-\end{forlines}
+\forline|CALL FLUSH(numout)|
 
 statement after any additional write statements to ensure that file contents reflect
@@ -482,18 +478,18 @@
 
 \begin{forlines}
-   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only
-   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T
-     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following
-       sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings.
-       sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure
-       sn_cfctl%l_oceout  = .FALSE. ! that  all areas report.
-       sn_cfctl%l_layout  = .FALSE. !
-       sn_cfctl%l_prtctl  = .FALSE. !
-       sn_cfctl%l_prttrc  = .FALSE. !
-       sn_cfctl%l_oasout  = .FALSE. !
-       sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0]
-       sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000]
-       sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1]
-       sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info
+   sn_cfctl%l_glochk  = .false. ! Range sanity checks are local (F) or global (T). Set T for debugging only
+   sn_cfctl%l_allon   = .false. ! IF T activate all options. If F deactivate all unless l_config is T
+   sn_cfctl%l_config  = .true.  ! IF .true. then control which reports are written with the following
+   sn_cfctl%l_runstat = .false. ! switches and which areas produce reports with the proc integer settings.
+   sn_cfctl%l_trcstat = .false. ! The default settings for the proc integers should ensure
+   sn_cfctl%l_oceout  = .false. ! that  all areas report.
+   sn_cfctl%l_layout  = .false. !
+   sn_cfctl%l_prtctl  = .false. !
+   sn_cfctl%l_prttrc  = .false. !
+   sn_cfctl%l_oasout  = .false. !
+   sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0]
+   sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000]
+   sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1]
+   sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info
 \end{forlines}
 
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Model Basics}
 \label{chap:MB}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 14257)
@@ -4,6 +4,4 @@
 
 \chapter{ essai \zstar \sstar}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex
===================================================================
--- /NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 14257)
@@ -5,6 +5,4 @@
 \chapter{Time Domain}
 \label{chap:TD}
-
-\thispagestyle{plain}
 
 \chaptertoc
Index: /NEMO/trunk/doc/latex/SI3/main/SI3_manual.ist
===================================================================
--- /NEMO/trunk/doc/latex/SI3/main/SI3_manual.ist	(revision 14257)
+++ /NEMO/trunk/doc/latex/SI3/main/SI3_manual.ist	(revision 14257)
@@ -0,0 +1,1 @@
+link ../../global/index.ist
Index: /NEMO/trunk/doc/latex/TOP/main/TOP_manual.ist
===================================================================
--- /NEMO/trunk/doc/latex/TOP/main/TOP_manual.ist	(revision 14257)
+++ /NEMO/trunk/doc/latex/TOP/main/TOP_manual.ist	(revision 14257)
@@ -0,0 +1,1 @@
+link ../../global/index.ist
Index: /NEMO/trunk/doc/latex/global/document.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/document.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/document.tex	(revision 14257)
@@ -1,88 +1,90 @@
-
 %% =================================================================================================
-%% Template structure for reference manuals
+%% Manual structure
 %% =================================================================================================
 
-%% NEMO release version
-\def \version{trunk}
-
-%% Preamble
+%% Preamble: global configuration
 %% =================================================================================================
 
-%% Document layout
-\documentclass[fontsize = 10pt, twoside, abstract]{scrreprt}
+%% Layout
+%\documentclass[fontsize=10pt,twoside,abstract,draft]{scrreprt}
+\documentclass[fontsize=10pt,twoside,abstract      ]{scrreprt}
 
-%% Load manual configuration
-\input{../../global/prologue}
+%% Overall configuration 
+\input{../../global/preamble}
 
-%% End of common preamble between main and sub-files
-%% Override custom cmds for full manual compilation
-\newcommand{\subinc}[1]{#1}
-\newcommand{\subexc}[1]{}
+%% Special cmds around to {in,ex}clude content only in subfile
+  \newcommand{\subinc}[1]{#1}
+  \newcommand{\subexc}[1]{  }
 
 \begin{document}
 
-\renewcommand{\subinc}[1]{}
+\renewcommand{\subinc}[1]{  }
 \renewcommand{\subexc}[1]{#1}
 
-
-%% Frontmatter
+%% Frontmatter: covers
+%% ({sub}title, DOI, authors, abstract and color theme are specific to each manual)
 %% =================================================================================================
 
+%\frontmatter %% Not recognized in 'scrreprt' document class
 \pagenumbering{gobble}   %% Disable page numbering temporarily
+\pagestyle{empty}
 
-%% Title page
 \input{../../global/frontpage}
-
-%% Footer for introductory parts (no header by cleaning default)
-\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark}
-
-%% Information page (2nd page)
 \input{../../global/info_page}
 
+\cleardoublepage
+
+\pagenumbering{Roman} %% Reactivate page numbering (uppercase roman numbers)
+\pagestyle{plain}
+%\lastpageref{pagesLTS.0}
+
+\tableofcontents
 \listoffigures
 \listoflistings
 \listoftables
+%\listoftodos
+%\lastpageref{pagesLTS.Roman}
 
-\clearpage
+\cleardoublepage
 
-\pagenumbering{roman}
-\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark}
+%% Mainmatter: toc, lists, introduction and primary chapters
+%% =================================================================================================
+
+%\mainmatter %% Not recognized in 'scrreprt' document class
+\pagenumbering{arabic} %% Standard page numbering
+\pagestyle{plain}
 
 \input{introduction}
 
-%% Table of Contents
-\tableofcontents
+\cleardoublepage
 
-\clearpage
+\pagestyle{scrheadings}
+\renewcommand{\chapterpagestyle}{empty}
 
+\input{chapters}
 
-%% Mainmatter
+%% Appendix: subordinate chapters
 %% =================================================================================================
 
-%% Headings for document body
-\pagenumbering{arabic}
-\lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark}
-\ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}}
+\appendix %% Chapter numbering with letters by now
+\lohead{Apdx \thechapter\ \leftmark}
 
-\include{chapters}
+\input{appendices}
 
+\input{../../global/coding_rules} %% Add coding rules on every manual
 
-%% Appendix
+%\lastpageref{pagesLTS.arabic}
+\cleardoublepage
+
+%% Backmatter: bibliography, glossaries and indices
 %% =================================================================================================
 
-\appendix   %% Chapter numbering with letters by now
-\lohead{Apdx\ \thechapter\ \leftmark}
-\include{appendices}
+%\backmatter %% Not recognized in 'scrreprt' document class
+\pagenumbering{roman} %% Lowercase roman numbers
+\pagestyle{plain}
 
-%% Append coding rules for every manual
-\input{../../global/coding_rules}
-
-
-%% Backmatter
-%% =================================================================================================
-
-%% Bibliography and indexes
 \input{../../global/epilogue}
 
+%\lastpageref{pagesLTS.roman}
+
 \end{document}
Index: /NEMO/trunk/doc/latex/global/epilogue.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/epilogue.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/epilogue.tex	(revision 14257)
@@ -1,17 +1,24 @@
-
-\clearpage
+%% =================================================================================================
+%% Backmatter
+%% =================================================================================================
 
 %% Bibliography
+%% =================================================================================================
+
 \phantomsection
 \addcontentsline{toc}{chapter}{Bibliography}
-\lohead{Bibliography} \rehead{Bibliography}
+\lohead{Bibliography}
+\rehead{Bibliography}
 \bibliography{../main/bibliography}
 
 \clearpage
 
-%% Indexes
+%% Indices
+%% =================================================================================================
+
 \phantomsection
-\addcontentsline{toc}{chapter}{Indexes}
-\lohead{Indexes} \rehead{Indexes}
+\addcontentsline{toc}{chapter}{Indices}
+\lohead{Indices}
+\rehead{Indices}
 \printindex[blocks]
 \printindex[keys]
@@ -19,2 +26,12 @@
 \printindex[parameters]
 \printindex[subroutines]
+
+\clearpage
+
+%% Glossary
+%% =================================================================================================
+
+%\phantomsection
+%\addcontentsline{toc}{chapter}{Glossary}
+%\lohead{Glossary}\rehead{Glossary}
+%\printglossaries
Index: /NEMO/trunk/doc/latex/global/frontpage.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/frontpage.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/frontpage.tex	(revision 14257)
@@ -1,67 +1,71 @@
+%% =================================================================================================
+%% Front cover
+%% =================================================================================================
 
 \begin{titlepage}
-%  \newgeometry{hmargin = 1.5cm, vmargin = 3cm}
-  \setlength{\parindent}{0pt}
+%   \newgeometry{hmargin=1.5cm,vmargin=3cm}
+   \setlength{\parindent}{0pt}
 
-  \begin{center}
-    \begin{minipage}{0.3\textwidth}
-      \includegraphics[height=1.5cm]{logos/NEMO_grey}
-    \end{minipage}\begin{minipage}{0.6\textwidth}
-      \begin{center}
-      \Large\slshape
-      \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\
+   \begin{center}
+
+      \begin{minipage}{0.3\textwidth}
+         \includegraphics[height=1.5cm]{NEMO_grey}
+      \end{minipage} %% Don't insert void line between `minipage` envs
+      \begin{minipage}{0.6\textwidth}
+         \begin{center}
+            \Large\slshape
+            \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\
+            \medskip
+            \hyperref[resources]{
+               \faWordpress \hspace{1cm} \faCodeFork      \hspace{1cm}
+               \faGithub    \hspace{1cm} \faCloudDownload \hspace{1cm} \faEnvelope
+            }
+         \end{center}
+      \end{minipage}
+
+   \end{center}
+
+   \spcup
+   \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\hdg}}
+   \ifdef{\shdg}{\medskip\par\textcolor{white}{\Huge\shdg}}{}
+   \spcdn
+
+   \begin{center}
+      \LARGE Version {\ver} - {\today} \\
       \medskip
-      \hyperref[resources]{\textcolor{black}{
-          \faWordpress \hspace{0.75cm} \faCodeFork      \hspace{0.75cm}
-          \faGithub    \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope
-        }
-      }
-      \end{center}
-    \end{minipage}
-  \end{center}
+      \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{zenodo.\zid}}
+   \end{center}
 
-  \spacetop
-  \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}}
-  \ifdef{\subheading}{
-    \medskip
-    \par
-    \textcolor{white}{\Huge \subheading}
-  }{}
-  \spacedown
+   \vfill
 
-  \begin{center}
-    \LARGE Version \version\ -\ \today \\
-    \medskip
-    \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{badges/zenodo.\zid} }
-  \end{center}
+   \begin{minipage}{\autwd}
+      \raggedleft\input{authors}
+   \end{minipage}
+   \hspace{15pt} %% Don't insert void line between `minipage` envs
+   \begin{minipage}{0.02\linewidth}
+      \rule{1pt}{\lnlg}
+   \end{minipage}
+   \hspace{ 5pt} %%   "     ""    ""   ""     "        ""      ""
+   \begin{minipage}{\abswd}
+      \begin{abstract}
+         \input{abstract}
+      \end{abstract}
+   \end{minipage}
 
-  \vfill
+   \vfill
 
-  \begin{minipage}{\authorswidth}
-    \raggedleft
-    \input{authors}
-  \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth}
-    \rule{1pt}{\rulelenght}
-  \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth}
-    \begin{abstract}
-      \input{abstract}
-    \end{abstract}
-  \end{minipage}
-
-  \vfill
-
-  \begin{center}
-    \Large
-    \href{http://www.cmcc.it          }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm}
-    \href{http://www.cnrs.fr          }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm}
-    \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI}  } \hspace{0.25cm}
-    \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm}
-    \href{http://nerc.ukri.org        }{ \includegraphics[height=1cm]{logos/NERC} } \\
-    \medskip
-    \slshape
-    {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\
-  \end{center}
+   \begin{center}
+      \Large
+      \CMCC{\includegraphics[height=1cm]{CMCC}} \hspace{0.25cm}
+      \CNRS{\includegraphics[height=1cm]{CNRS}} \hspace{0.25cm}
+       \MOI{\includegraphics[height=1cm]{MOI} } \hspace{0.25cm}
+      \UKMO{\includegraphics[height=1cm]{UKMO}} \hspace{0.25cm}
+      \NERC{\includegraphics[height=1cm]{NERC}}                 \\
+      \medskip
+      \slshape
+         {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel
+   \end{center}
 
 \end{titlepage}
 
-\restoregeometry
+%\restoregeometry
Index: /NEMO/trunk/doc/latex/global/glossaries.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/glossaries.tex	(revision 14257)
+++ /NEMO/trunk/doc/latex/global/glossaries.tex	(revision 14257)
@@ -0,0 +1,11 @@
+%% =================================================================================================
+%% Glossaries
+%% =================================================================================================
+
+\usepackage[toc]{glossaries}
+
+%% \newglossaryentry{<label>}{<settings>}
+
+%% \newacronym{<label>}{<abbrv>}{<full>}
+
+\makeglossaries
Index: /NEMO/trunk/doc/latex/global/highlighting.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/highlighting.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/highlighting.tex	(revision 14257)
@@ -1,32 +1,38 @@
+%% =================================================================================================
 %% Syntax highlighting configuration
-%% ==============================================================================
-
-\usepackage[outputdir=../build, chapter, newfloat]{minted}
+%% =================================================================================================
 
 %% Global highlighting style
-\definecolor{bg}{HTML}{f8f8f8}
+\definecolor{bg}{HTML}{f8f8f8} %% ?
 \usemintedstyle{emacs}
-\setminted{bgcolor=bg, fontsize=\scriptsize, breaklines}
-\setminted[xml]{style=borland} %% Specific per language
+\setminted{bgcolor=bg,fontsize=\scriptsize,breaklines}
+\setminted[xml]{style=borland} %% Specific style for XML
+
+%% Inline
+\newmintinline[forcode]{fortran}{bgcolor=,fontsize=auto} %% \forcode{...}
+\newmintinline[xmlcode]{xml}{    bgcolor=,fontsize=auto} %% \xmlcode{...}
+\newmintinline[snippet]{console}{bgcolor=,fontsize=auto} %% \snippet{...}
 
 %% Oneliner
-\newmint[forline]{fortran}{}   % \forline|...|
-\newmint[xmlline]{xml}{}       % \xmlline|...|
-\newmint[cmd]{console}{}       % \cmd|...|
+\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}
+\newminted[forlines]{fortran}{} %% \begin{forlines}
+\newminted[xmllines]{xml    }{} %% \begin{xmllines}
+\newminted[cmds]{    console}{} %% \begin{cmds}
+\newminted[clines]{  c      }{} %% \begin{clines}
 
-%% File
+%% File (namelist or module)
 \newmintedfile[forfile]{fortran}{}
-
-%% Inline
-\newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto}   % \forcode{...}
-\newmintinline[xmlcode]{xml}{    bgcolor=, fontsize=auto}   % \xmlcode{...}
-\newmintinline[snippet]{console}{bgcolor=, fontsize=auto}   % \snippet{...}
 
 %% Namelists inclusion
 \newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
+%\newcommand{\nlst}[1]{
+%   \begin{listing}
+%      \newmintedfile{fortran}{../../../namelists/#1}
+%      \caption{\forcode{&#1}}
+%      \label{lst:#1}
+%   \end{listing}
+%}
Index: MO/trunk/doc/latex/global/index.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/index.tex	(revision 14256)
+++ 	(revision )
@@ -1,25 +1,0 @@
-
-\usepackage{imakeidx}
-
-%% Naming customization
-\renewcommand{\listingname}{namelist}
-\renewcommand{\listlistingname}{List of Namelists}
-
-%% Index entries (italic font for files, preformat for code)
-\newcommand{\hf}[1]{   \index{h90 files!#1}             \textit{#1.h90}          }
-\newcommand{\ifile}[1]{\index{Input NetCDF files!#1.nc} \textit{#1.nc}           }
-\newcommand{\jp}[1]{   \index{Model parameters!#1}      \texttt{#1}              }
-\newcommand{\key}[1]{  \index[keys]{#1@\texttt{\textbf{key\_#1}}} \texttt{\textbf{key\_#1}}}
-\newcommand{\mdl}[1]{  \index[modules]{#1@\textit{#1.F90}}        \textit{#1.F90}          }
-\newcommand{\nam}[2]{  \index[blocks]{#1@\texttt{\&nam#2}}        \forcode{&nam#1} (\autoref{lst:nam#1})}
-\newcommand{\np}[3][]{ \index[parameters]{#3@\texttt{#3}}         \forcode{#2#1}           }
-\newcommand{\rou}[1]{  \index[subroutines]{#1@\texttt{#1}}        \texttt{#1}              }
-
-
-\indexsetup{toclevel=section, othercode=\small}
-
-\makeindex[intoc=true, name=blocks     , title=Namelist blocks      , columns=3]
-\makeindex[intoc=true, name=keys       , title=CPP keys                        ]
-\makeindex[intoc=true, name=modules    , title=\fortran\ modules    , columns=3]
-\makeindex[intoc=true, name=parameters , title=Namelist parameters  , columns=3]
-\makeindex[intoc=true, name=subroutines, title=\fortran\ subroutines           ]
Index: /NEMO/trunk/doc/latex/global/indices.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/indices.tex	(revision 14257)
+++ /NEMO/trunk/doc/latex/global/indices.tex	(revision 14257)
@@ -0,0 +1,28 @@
+%% =================================================================================================
+%% Indices
+%% =================================================================================================
+
+%% Index entries (italic font for files, preformat for code)
+\newcommand{\key}[1]{
+   \index[keys]{       #1@\texttt{\textbf{key\_#1}}} \texttt{\textbf{key\_#1}}
+}             
+\newcommand{\mdl}[1]{
+   \index[modules]{    #1@\textit{#1.F90}          } \textit{#1.F90}
+}
+\newcommand{\nam}[2]{
+   \index[blocks]{     #1@\texttt{\&nam#2}         } \forcode{&nam#1} (\autoref{lst:nam#1})
+}
+\newcommand{\np}[3][]{
+   \index[parameters]{ #3@\texttt{#3}              } \forcode{#2#1}
+}
+\newcommand{\rou}[1]{
+   \index[subroutines]{#1@\texttt{#1}              } \texttt{#1}
+}
+
+\indexsetup{toclevel=section,othercode=\small}
+
+\makeindex[intoc=true,name=blocks     ,title=Namelist blocks      ,columns=3]
+\makeindex[intoc=true,name=keys       ,title=CPP keys                       ]
+\makeindex[intoc=true,name=modules    ,title=\fortran\ modules    ,columns=3]
+\makeindex[intoc=true,name=parameters ,title=Namelist parameters  ,columns=3]
+\makeindex[intoc=true,name=subroutines,title=\fortran\ subroutines          ]
Index: /NEMO/trunk/doc/latex/global/info_page.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/info_page.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/info_page.tex	(revision 14257)
@@ -1,12 +1,13 @@
+%% =================================================================================================
+%% Back cover
+%% =================================================================================================
 
-\thispagestyle{plain}
+%% Disclaimer
+%% =================================================================================================
 
-%% ================================================================
-%% Disclaimer
-%% ================================================================
 \subsubsection*{Disclaimer}
 
 Like all components of the modelling framework,
-the \engine\ core engine is developed under the \href{http://www.cecill.info}{CECILL license},
+the \eng\ core engine is developed under the \href{http://www.cecill.info}{CECILL license},
 which is a French adaptation of the GNU GPL (\textbf{G}eneral \textbf{P}ublic \textbf{L}icense).
 Anyone may use it freely for research purposes, and is encouraged to
@@ -20,32 +21,32 @@
 The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO.
 
-%% ================================================================
 %% External resources
-%% ================================================================
+%% =================================================================================================
+
 \subsubsection*{Other resources}
 \label{resources}
 
 Additional information can be found on:
+
 \begin{itemize}
-\item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing several
-  associated applications and an exhaustive users bibliography
-\item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of
-  the model with the code repository for the shared reference and some main resources
-  (wiki, ticket system, forums, \ldots) \\
-  \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples}
-  {repository of the demonstration cases} for research or training
-\item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive}
-  delivering the publications issued by the consortium (manuals, reports, datasets, \ldots)
-\item \faEnvelope\ two mailing lists:
-  the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for
-  top-down communications from the project
-  (announcements, calls, job opportunities, \ldots)
-  and the \href{http://listes.ipsl.fr/sympa/info/nemo-forge}{forge updates}
-  (commits, tickets and forums)
+   \item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing
+      several associated applications and an exhaustive users bibliography
+   \item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of
+      the model with the code repository for the shared reference and some main resources
+      (wiki, ticket system, forums, \ldots) \\
+      \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples}
+      {repository of the demonstration cases} for research or training
+   \item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive}
+      delivering the publications issued by the consortium (manuals, reports, datasets, \ldots)
+   \item \faEnvelope\ two mailing lists:
+      the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for
+      top-down communications from the project (announcements, calls, job opportunities, \ldots)
+      and the \href{http://listes.ipsl.fr/sympa/info/nemo-forge}{forge updates}
+      (commits, tickets and forums)
 \end{itemize}
 
-%% ================================================================
 %% Citation
-%% ================================================================
+%% =================================================================================================
+
 \subsubsection*{Citation}
 
@@ -55,22 +56,24 @@
 
 \begin{sloppypar}
-  ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'',
-  {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619,
-  Institut Pierre-Simon Laplace (IPSL),
-  \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid}
+   ``{\bfseries \hdg}\ifdef{\shdg}{ -- \shdg}{}'',
+   {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipsl} --- ISSN 1288-1619,
+   Institut Pierre-Simon Laplace (IPSL),
+   \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid}
 \end{sloppypar}
 
 \begin{figure}[b]
-  \begin{minipage}[c]{0.7\textwidth}
-    \small
-    \ttfamily{
-      Scientific Notes of Climate Modelling Center \\
-      ISSN 1288-1619                               \\
-      Institut Pierre-Simon Laplace (IPSL)
-    }
-  \end{minipage}
-  \hfill
-  \begin{minipage}[c]{0.25\textwidth}
-    \href{http://www.cmc.ipsl.fr}{\includegraphics[width=\textwidth]{logos/IPSL_master}}
-  \end{minipage}
+
+   \begin{minipage}[c]{0.7\textwidth}
+      \small
+      \ttfamily{
+         Scientific Notes of Climate Modelling Center \\
+         ISSN 1288-1619                               \\
+         Institut Pierre-Simon Laplace (IPSL)
+      }
+   \end{minipage}
+   \hfill %% Don't insert void line between `minipage` envs
+   \begin{minipage}[c]{0.25\textwidth}
+      \href{http://www.cmc.ipsl.fr}{\includegraphics[width=\textwidth]{IPSL_master}}
+   \end{minipage}
+
 \end{figure}
Index: /NEMO/trunk/doc/latex/global/latexmk.pl
===================================================================
--- /NEMO/trunk/doc/latex/global/latexmk.pl	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/latexmk.pl	(revision 14257)
@@ -1,13 +1,13 @@
+## Defaults
+#$silent   = 1;
+$pdf_mode = 5;
 
-## Defaults
-$do_cd    = 1;   ## Change to the directory of the main source file
-$silent   = 1;   ## Less verbosity
+## Using relative paths
+$ENV{'openout_any'} = 'a'       ;
+$do_cd              = 1         ;
+$out_dir            = '../build';
 
-## Use of 'build' relative directory
-$ENV{'openout_any'}='a';
-$out_dir = '../build';
-
-## Global option
-set_tex_cmds( '-shell-escape' );
-
-$makeindex = "makeindex %O -s ../../global/index -o $out_dir/%D $out_dir/%S";
+## Custom cmds
+set_tex_cmds('-shell-escape -interaction=batchmode');
+#set_tex_cmds('-shell-escape');
+$makeindex = 'makeindex -s %R.ist %O -o %D %S';
Index: /NEMO/trunk/doc/latex/global/nemo.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/nemo.tex	(revision 14257)
+++ /NEMO/trunk/doc/latex/global/nemo.tex	(revision 14257)
@@ -0,0 +1,23 @@
+%% =================================================================================================
+%% Common abstract
+%% =================================================================================================
+
+``Nucleus for European Modelling of the Ocean'' as \NEMO\ is a state-of-the-art modelling framework of
+ocean-related engines for research activities and forecasting services in oceanography and climatology,
+developed in a sustainable way since 2008 by a European consortium of 5 institutes
+(\CMCC{CMCC} | \CNRS{CNRS} | \MOI{Mercator Océan} | \UKMO{Met Office} | \NERC{NERC}).
+It is intended to be a flexible tool for studying the physical and biogeochemical phenomena in
+the ocean circulation, as well as its interactions with the components of the Earth climate system,
+over a wide range of space and time scales.
+
+Concerning the physics, the fundamental engine for the \textcolor{blue}{``blue ocean''} solves
+the primitive equations of the ocean \{thermo\}dynamics.
+It can be supplemented by the \textcolor{gray}{``white ocean''} for sea-ice \{thermo\}dynamics,
+brine inclusions and subgrid-scale thickness variations (\SIcube), and also by
+the \textcolor{green}{``green ocean''} for \{on,off\}line oceanic tracers transport and
+biogeochemical processes (\TOP-\PISCES).
+External alternative models can be used instead of the core engines (\eg\ \CICE\ and \BFM).
+Regarding the numerics, main features include versatile data assimilation interface,
+agile diagnostics generation thanks to \XIOS\ software,
+ocean-atmosphere coupling via the \OASIS\ library, and
+seamless embedded zooms with the \AGRIF\ 2-way nesting package.
Index: /NEMO/trunk/doc/latex/global/new_cmds.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 14257)
@@ -1,18 +1,27 @@
-%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
-%% ==============================================================================
+%% =================================================================================================
+%% Global custom commands
+%% =================================================================================================
 
-%% Same slanted font for NEMO and its core engines
-\newcommand{\NEMO  }{\textsl{NEMO}}
-\newcommand{\OPA   }{\textsl{OPA}}
-\newcommand{\SIcube}{\textsl{SI$^3$}}
-\newcommand{\TOP   }{\textsl{TOP}}
-\newcommand{\PISCES}{\textsl{PISCES}}
+%% \newcommand{<name>}[<args>][<first argument value>]{<code>}
+
+%% Same font for NEMO and its core engines
+\newcommand{\NEMO   }{\textsl{NEMO}}
+\newcommand{\OPA    }{\textsl{OPA}}
+\newcommand{\SIcube }{\textsl{SI$^3$}}
+\newcommand{\TOP    }{\textsl{TOP}}
+\newcommand{\PISCES }{\textsl{PISCES}}
 \newcommand{\NEMOVAR}{\textsl{NEMOVAR}}
 
-%% Links for external components
-\newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}}
+%% URL links for consortium institutes and external components
+\newcommand{\CMCC }{\href{http://www.cmcc.it}          }
+\newcommand{\CNRS }{\href{http://www.cnrs.fr}          }
+\newcommand{\MOI  }{\href{http://www.mercator-ocean.fr}}
+\newcommand{\UKMO }{\href{http://www.metoffice.gov.uk} }
+\newcommand{\NERC }{\href{http://nerc.ukri.org}        }
+\newcommand{\AGRIF}{\href{http://agrif.imag.fr                  }{AGRIF}}
+\newcommand{\BFM  }{\href{http://bfm-community.eu               }{BFM}}
 \newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}}
-\newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}}
-\newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}}
+\newcommand{\OASIS}{\href{http://portal.enes.org/oasis          }{OASIS}}
+\newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver }{XIOS}}
 
 %% Fortran in small capitals
@@ -22,48 +31,42 @@
 %% Common aliases
 \renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
+\newcommand{\eg    }{\ensuremath{e.g.}}
+\newcommand{\ie    }{\ensuremath{i.e.}}
 \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}
 
 %% Gurvan's comments
 \newcommand{\cmtgm}[1]{}
 
-%% Maths
+%% Maths: reduce equation
+\newcommand{\fractext}[2]{\textstyle\frac{#1}{#2}}
 \newcommand{\lt}{\left}
+\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
+\newcommand{\rdt}{\Delta t}
 \newcommand{\rt}{\right}
-\newcommand{\vect}[1]{\ensuremath{ \mathbf{#1} }}
-\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
-
-%% Convert chapter/section headings to lowercase
-\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
-\renewcommand{\sectionmark}[1]{\markright{#1}{}}
+\newcommand{\vect}[1][]{\ensuremath{\mathbf{#1}}}
 
 %% Retrieve month name
 \renewcommand{\today}{
-  \ifcase \month\or January\or February\or March\or
-                    April\or   May\or      June\or
-                    July\or    August\or   September\or
-                    October\or November\or December
+  \ifcase \month\or   January\or February\or    March\or    April\or
+                          May\or     June\or     July\or   August\or
+                    September\or  October\or November\or December
   \fi, \number \year
 }
 
-%% Link to orcid profile
-\newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}}
+%% Workaround for \listoffigures issue
+\DeclareRobustCommand{\triad}[6]{
+  \ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}
+}
 
-%% Workaround for \listoffigures
-\DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }}
-
-%% New command for ToC
-\newcommand{\chaptertoc}[1][Table of contents]{%
-  \thispagestyle{empty}
-  \etocsettocstyle{\addsec*{#1}}{}%
-  \localtableofcontents%
+%% New command for ToC (?)
+\newcommand{\chaptertoc}[1][Table of contents]{
+  \etocsettocstyle{\addsec*{#1}}{}
+  \localtableofcontents
   \vfill
 }
+
+%% ORCID links
+\newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidclr}\aiOrcidSquare}}
Index: /NEMO/trunk/doc/latex/global/packages.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/packages.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/packages.tex	(revision 14257)
@@ -1,46 +1,46 @@
+%% =================================================================================================
+%% Packages
+%% =================================================================================================
 
-%% LaTeX packages in use
-%% ==============================================================================
+%% Document class
+\usepackage[footsepline=0.25pt,headsepline=0.25pt]{scrlayer-scrpage} %% KOMA-script
 
-%% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility
-
-%% KOMA-script
-\usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage}
-
-%% customization (layout, header/footer styles & contents, background)
-\usepackage{draftwatermark}
-\usepackage[margin = 2cm]{geometry}
-\usepackage[pages = some]{background}   %% 'some' for title page
-\usepackage[Bjornstrup]{fncychap}
+%% Customisation (cover page, chapter headings and mark of draft copy)
+\usepackage[margin=2cm]{geometry} %% Why 2cm margin? Load geometry before background!
+\usepackage[pages=some]{background} %% 'some' for title page
+\usepackage[scale=15,color=pink]{draftwatermark}
+\usepackage[Bjornstrup]{fncychap} %% Chapter style
 
 %% Fonts
 \usepackage{fontspec}
-%% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded
-\defaultfontfeatures{
-    Path = /home/nicolas/.local/texlive/2020/texmf-dist/fonts/opentype/public/fontawesome/
-}
-\usepackage{academicons, fontawesome, newtxtext}
+%% Issue with path to 'FontAwesome.otf'
+\defaultfontfeatures{Path=/usr/local/texlive/2020/texmf-dist/fonts/opentype/public/fontawesome/}
+\usepackage{academicons,fontawesome}
 
 %% Formatting
 \usepackage[inline]{enumitem}
-\usepackage{etoc, tabularx, xcolor}
+\usepackage{etoc,tabularx,xcolor}
 
 %% Graphics
-\usepackage{caption, graphicx, grffile}
+\usepackage{caption}
+\graphicspath{{../../../badges/}{../figures/}{../../../logos/}}
 
 %% Labels
-\usepackage{lastpage, natbib}
+\usepackage{lastpage,natbib}
+%\usepackage{natbib,pageslts}
 
-%% Mathematics
-\usepackage{amsmath, amssymb, mathtools}
+%% Mathematics: 'amsmath' is loaded by 'mathtools'
+\usepackage{mathtools,amssymb}
 
 %% Versatility
 \usepackage{subfiles}
 
-%% Configuration
-\graphicspath{ {../../../} {../figures/} }
+%% Source code listings
+\usepackage[cachedir=cache,outputdir=../build,chapter,newfloat]{minted}
+%% chapter? newfloat?
+
+%% Indexing and cross-referencing, loaded at the end for higher compatibility
+\usepackage{hyperref,imakeidx}
 
 %% Missing utmr8a font
 \usepackage{times}
-
-\usepackage{hyperref}   %% links
Index: /NEMO/trunk/doc/latex/global/preamble.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/preamble.tex	(revision 14257)
+++ /NEMO/trunk/doc/latex/global/preamble.tex	(revision 14257)
@@ -0,0 +1,17 @@
+%% =================================================================================================
+%% Preamble
+%% =================================================================================================
+
+\def\ver{trunk}
+
+%% Specific configuration
+\input{../main/settings}
+
+%% Global configuration
+\input{../../global/packages} % First obviously
+\input{../../global/styles} % Color definitions
+\input{../../global/highlighting}
+\input{../../global/indices}
+\input{../../global/new_cmds}
+%\input{../../global/todonotes}
+%\input{../../global/glossaries}
Index: MO/trunk/doc/latex/global/prologue.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/prologue.tex	(revision 14256)
+++ 	(revision )
@@ -1,25 +1,0 @@
-
-%% Specific configuration
-\input{../main/settings}
-
-%% Global configuration
-\input{../../global/packages}
-\input{../../global/highlighting}
-\input{../../global/index}
-\input{../../global/styles}
-\input{../../global/new_cmds}
-%\input{../../global/todonotes}
-
-%% Load hyperref at the end of the preamble to make it work with other pkgs
-\usepackage{hyperref}   %% links
-\hypersetup{
-  colorlinks,
-  citecolor = manualcolor, linkcolor = manualcolor, urlcolor = manualcolor,
-  final   %% Links even in draft mode
-}
-
-%% `\autoref` uncapitalization
-\renewcommand{\appendixautorefname}{appendix}
-\renewcommand{\equationautorefname}{equation}
-\renewcommand{\figureautorefname}{figure}
-\renewcommand{\tableautorefname}{table}
Index: /NEMO/trunk/doc/latex/global/styles.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/styles.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/styles.tex	(revision 14257)
@@ -1,23 +1,56 @@
-
+%% =================================================================================================
 %% Styles
-%% ==============================================================================
+%% =================================================================================================
 
 %% Colors
-\setmanualcolor
-\colorlet{manualcolorshaded}{manualcolor!60}
-\definecolor{orcidcolor}{HTML}{A6CE39}
+\definecolor{orcidclr}{HTML}{A6CE39}
+\definecolor{manclr}{cmyk}{\clr} %% \clr defined for each manual from local settings.tex
+\colorlet{manclrshd}{manclr!60} %% Derived color for chapter heading, see below
+
+%% Cover page
+\backgroundsetup{
+   firstpage=true,scale  =1,
+   angle    =0   ,opacity=1,
+   contents ={
+      \begin{tikzpicture}[remember picture,overlay]
+         \path[fill=manclr] (-0.5\paperwidth,7) rectangle (0.5\paperwidth,10);
+      \end{tikzpicture}
+    }
+}
 
 %% Page layout
-\pagestyle{scrheadings}
+%\pagestyle{scrheadings}
+%\renewcommand{\chapterpagestyle}{empty}
+\renewcommand{\chaptermark}[1]{ \markboth{#1}{}} %% Convert mark to lowercase
+\renewcommand{\sectionmark}[1]{\markright{#1}{}} %%    "     ""  ""     "  
+\ohead{} %% Clear default headings
+\lohead{Chap. \thechapter\  \leftmark}
+\rehead{Sect. \thesection\ \rightmark}
+\ifoot{Page \thepage\ of \pageref*{LastPage}}
+%\ifoot[\pagemark]{Page \thepage\ of \lastpageref*{pagesLTS.arabic}}
+\ofoot{\eng\ Reference Manual}
 \addtokomafont{pagehead}{  \sffamily              }
 \addtokomafont{pagefoot}{  \sffamily \footnotesize}
 \addtokomafont{pagenumber}{\sffamily \slshape     }
-\addtokomafont{chapter}{\color{white}}
-\ohead{} \ofoot{}   %% Clear defaults
+%\addtokomafont{chapter}{\color{white}}
 
-%% Caption
-\captionsetup{font = footnotesize, justification = justified}
+%% Cross-referencing
+\hypersetup{
+   pdftitle=\hdg                                          ,
+   pdfauthor=Gurvan Madec and NEMO System Team            ,
+   pdfsubject=Reference manual of NEMO modelling framework,
+   pdfkeywords=ocean circulation modelling                ,
+   colorlinks                                             ,
+   allcolors=manclr
+}
+\renewcommand{\appendixautorefname}{appendix}          %% `\autoref` uncapitalization
+\renewcommand{\equationautorefname}{equation}          %%     ""            ""
+\renewcommand{\figureautorefname  }{figure}            %%     ""            ""
+\renewcommand{\listingname        }{namelist}          %%     ""            ""
+\renewcommand{\listlistingname    }{List of Namelists} %%     ""            ""
+\renewcommand{\tableautorefname   }{table}             %%     ""            ""
 
-%% Footnote
+%% Misc. (caption and footnote)
+\captionsetup{font=footnotesize,justification=justified}
 \renewcommand{\thefootnote}{\fnsymbol{footnote}}
 
@@ -28,58 +61,46 @@
 \renewcommand{\bibpostamble}{  \end{multicols}   }
 
-%% Catcodes
+%% Catcodes (between `\makeatletter` and `\makeatother`)
 \makeatletter
 
-%% Prevent error with tikz and namelist inclusion
-\global\let\tikz@ensure@dollar@catcode=\relax
+%\global\let\tikz@ensure@dollar@catcode=\relax %% Prevent error with tikz and namelist inclusion
 
-%% First page
-\backgroundsetup{
-  firstpage = true,
-  scale = 1, angle = 0, opacity = 1,
-  contents = {
-    \begin{tikzpicture}[remember picture, overlay]
-      \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10);
-    \end{tikzpicture}
-  }
+%% Apply manual color for chap. headings (original snippets from fncychap.sty)
+%% !!! Let trailing percent sign to avoid space insertion
+\renewcommand{\DOCH}{% %% Upper box with chapter number
+   \settowidth{\py}{\CNoV\thechapter}%
+   \addtolength{\py}{-10pt}% %% Amount of space by which the number is shifted right
+   \fboxsep=0pt%
+   \colorbox{manclr}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
+   \kern-\py\raise20pt%
+   \hbox{\color{manclrshd}\CNoV\thechapter}\\
+}
+\renewcommand{\DOTI}[1]{% %% Lower box with chapter title
+   \nointerlineskip\raggedright%
+   \fboxsep=\myhi%
+   \vskip-1ex%
+   \colorbox{manclr}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
+   \vskip 40\p@%
+}
+\renewcommand{\DOTIS}[1]{% %% Box for unumbered chapter
+   \fboxsep=0pt%
+   \colorbox{manclr}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\
+   \nointerlineskip\raggedright%
+   \fboxsep=\myhi%
+   \vskip-1ex% %% Remove white 1pt line
+   \colorbox{manclr}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
+   \vskip 40\p@%
 }
 
-%% Apply engine color for chapter headings: tweaking snippets from fncychap.sty
-\renewcommand{\DOCH}{%
-  \settowidth{\py}{\CNoV\thechapter}
-  \addtolength{\py}{-10pt}      % Amount of space by which the
-%                                  % number is shifted right
-  \fboxsep=0pt%
-  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
-  \kern-\py\raise20pt%
-  \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\%
-}
-\renewcommand{\DOTI}[1]{%
-  \nointerlineskip\raggedright%
-  \fboxsep=\myhi%
-  \vskip-1ex%
-  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
-  \vskip 40\p@%
-}
-\renewcommand{\DOTIS}[1]{%
-  \fboxsep=0pt
-  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%
-  \nointerlineskip\raggedright%
-  \fboxsep=\myhi%
-  \vskip-1ex% Remove white 1pt line
-  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
-  \vskip 40\p@%
-}
-
-%% Temporary fix
-\def\set@curr@file#1{%
-  \begingroup
-    \escapechar\m@ne
-    \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
-  \endgroup
-}
-\def\quote@name#1{"\quote@@name#1\@gobble""}
-\def\quote@@name#1"{#1\quote@@name}
-\def\unquote@name#1{\quote@@name#1\@gobble"}
+%% Temporary fix?
+%\def\set@curr@file#1{
+%  \begingroup
+%    \escapechar\m@ne
+%    \xdef\@curr@file{\expandafter\string\csname #1\endcsname}
+%  \endgroup
+%}
+%\def\quote@name#1{"\quote@@name#1\@gobble""}
+%\def\quote@@name#1"{#1\quote@@name}
+%\def\unquote@name#1{\quote@@name#1\@gobble"}
 
 \makeatother
Index: /NEMO/trunk/doc/latex/global/todonotes.tex
===================================================================
--- /NEMO/trunk/doc/latex/global/todonotes.tex	(revision 14256)
+++ /NEMO/trunk/doc/latex/global/todonotes.tex	(revision 14257)
@@ -1,24 +1,30 @@
-\usepackage[]{todonotes}
+%% =================================================================================================
+%% Notes
+%% =================================================================================================
+
+\usepackage{todonotes}
 
 \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{\ubcomment         }[2][]{
+\refstepcounter{ubcomment}
+{
+\todo[linecolor=black,       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}%
+\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,backgroundcolor={green!40!},size=\footnotesize,
+      caption={\textbf{{Fixme: UB} [\theubcomment] #1}}                     ]{
+\textbf{Fixme: UB [              \theubcomment]:}~#2}
 }}
 
Index: /NEMO/trunk/doc/manual_build.sh
===================================================================
--- /NEMO/trunk/doc/manual_build.sh	(revision 14256)
+++ /NEMO/trunk/doc/manual_build.sh	(revision 14257)
@@ -21,15 +21,8 @@
 
 ## LaTeX installation, find latexmk should be enough
-[ -z $( which latexmk ) ] && { echo 'latexmk not installed => QUIT'; exit 2; }
+[ -z "$( which latexmk )" ] && { echo 'latexmk not installed => QUIT'; exit 2; }
 
 ## Pygments package for syntax highlighting of source code (namelists & snippets)
 [ -n "$( ./tools/check_pkg.py pygments )" ] && { echo 'Python pygments is missing => QUIT'; exit 2; }
-
-## Retrieve figures if not already there
-#if [ ! -d latex/figures ]; then
-#    printf "Downloading of shared figures and logos\n\n"
-#    svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null
-#fi
-
 
 ## Loop on the models
Index: /NEMO/trunk/doc/tools/check_pkg.py
===================================================================
--- /NEMO/trunk/doc/tools/check_pkg.py	(revision 14256)
+++ /NEMO/trunk/doc/tools/check_pkg.py	(revision 14257)
@@ -1,3 +1,3 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import sys, importlib
@@ -7,4 +7,4 @@
 		importlib.import_module(argv)
 	except ImportError:
-		print("Package %s is missing in Python" % argv)
+		print("Package %s is missing in Python 3" % argv)
 
Index: /NEMO/trunk/doc/tools/shr_func.sh
===================================================================
--- /NEMO/trunk/doc/tools/shr_func.sh	(revision 14256)
+++ /NEMO/trunk/doc/tools/shr_func.sh	(revision 14257)
@@ -8,7 +8,7 @@
 
 build() {
-    printf "\t¤ Generation of the PDF format\n"
-    latexmk -r ./latex/global/latexmk.pl -pdfxe ./latex/$1/main/$1_manual \
-#	1> /dev/null
+    printf "\t¤ Generation of the PDF export of the manual\n"
+    latexmk -r ./latex/global/latexmk.pl ./latex/$1/main/$1_manual \
+	1> /dev/null
     [ -f ./latex/$1/build/$1_manual.pdf ] && mv ./latex/$1/build/$1_manual.pdf .
     echo
