Index: /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty	(revision 9389)
@@ -39,4 +39,7 @@
 %% ==============================================================================
 
+\pagestyle{fancy}
+\bibliographystyle{../tex_sub/ametsoc}
+
 %% Additionnal fonts
 
@@ -62,15 +65,13 @@
 \def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
 \def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
-\def\GrosCarreAvecUnChiffre#1{%
-	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
-	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}%
- 	\vrule height 0pt width 1cm depth 0pt%
+\def\GrosCarreAvecUnChiffre#1{
+	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
+	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
+ 	\vrule height 0pt width 1cm depth 0pt
 }
 \def\@makechapterhead#1{
 	\hbox{
-		\huge\LignesVerticales
-		\hspace{-0.5cm}
-		\GrosCarreAvecUnChiffre{\thechapter}
-		\hspace{0.2cm}
+		\huge\LignesVerticales\hspace{-0.5cm}
+		\GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
 		\hbox{#1}
 	}
@@ -127,13 +128,13 @@
 \newcommand{\NEMO}{\textit{NEMO}\xspace}
 
-\newcommand{\ifile}[1]{\textit{  #1.nc}\index{Input NetCDF files!#1.nc}}
-\newcommand{   \jp}[1]{\textit{     #1}\index{     Model parameters!#1}}
-\newcommand{   \hf}[1]{\textit{ #1.h90}\index{             h90 file!#1}}
-\newcommand{  \key}[1]{\textbf{key\_#1}\index{        CPP keys!key\_#1}}
-\newcommand{  \mdl}[1]{\textit{ #1.F90}\index{              Modules!#1}}
-\newcommand{  \ngn}[1]{\textit{     #1}\index{  Namelist Group Name!#1}}
-\newcommand{   \np}[1]{\textit{     #1}\index{   Namelist variables!#1}}
-\newcommand{   \pp}[1]{\textit{     #1}\index{     Model parameters!#1}}
-\newcommand{  \rou}[1]{\textit{     #1}\index{             Routines!#1}}
+\newcommand{\ifile}[1]{\textit{   #1.nc}\index{Input NetCDF files!#1.nc}}
+\newcommand{   \hf}[1]{\textit{  #1.h90}\index{             h90 file!#1}}
+\newcommand{  \key}[1]{\textbf{ key\_#1}\index{        CPP keys!key\_#1}}
+\newcommand{  \mdl}[1]{\textit{  #1.F90}\index{              Modules!#1}}
+\newcommand{  \ngn}[1]{\textit{      #1}\index{  Namelist Group Name!#1}}
+\newcommand{  \rou}[1]{\textit{      #1}\index{             Routines!#1}}
+
+\newcommand{\jp}[1]{\forcode{#1}\index{  Model parameters!#1}}
+\newcommand{\np}[1]{\forcode{#1}\index{Namelist variables!#1}}
 
 \newcommand{\grad}{\nabla}
Index: /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.tex	(revision 9389)
@@ -16,7 +16,5 @@
 
 \usepackage{../tex_main/NEMO_manual}
-\usepackage{../tex_sub/minted}
-\pagestyle{fancy}
-\bibliographystyle{../tex_sub/ametsoc}
+\usepackage{../tex_sub/NEMO_minted}
 
 \makeindex
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/NEMO_minted.sty
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/NEMO_minted.sty	(revision 9389)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/NEMO_minted.sty	(revision 9389)
@@ -0,0 +1,44 @@
+%% ==============================================================================
+%% minted.sty: syntax highlighting configuration
+%% ==============================================================================
+
+
+%% Global highlighting style
+%% ==============================================================================
+
+\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
+
+
+%% Specific per language
+
+\setminted[xml]{style=borland}
+
+
+%% Oneliner
+%% ==============================================================================
+
+\newmint[forline]{fortran}{}			% \forline|...|
+\newmint[xmlline]{xml}{}			% \xmlline|...|
+\newmint[cmd]{console}{}			% \cmd|...|
+
+
+%% Multi-lines
+%% ==============================================================================
+
+\newminted[forlines]{fortran}{}			% \begin{forlines}
+\newminted[xmllines]{xml}{}			% \begin{xmllines}
+\newminted[cmds]{console}{}			% \begin{cmds}
+\newminted[clines]{c}{fontsize=\tiny}			% \begin{clines}
+
+
+%% File
+
+\newmintedfile[forfile]{fortran}{fontsize=\tiny}			% \forfile{../namelists/nam...}
+
+
+%% Inline
+%% ==============================================================================
+
+\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}			% \forcode{...}
+\newmintinline[xmlcode]{xml}{ 	fontsize=auto, frame=lines}			% \xmlcode{...}
+\newmintinline[snippet]{console}{fontsize=auto, frame=lines}			% \snippet{...}
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/abstract_foreword.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/abstract_foreword.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/abstract_foreword.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
@@ -257,5 +257,5 @@
 Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations 
 pages on the NEMO web site (Using NEMO\/Configurations) .
-In the vertical, GYRE uses the default 30 ocean levels (\pp{jpk}=31) (Fig.~\ref{Fig_zgr}).
+In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}=31) (Fig.~\ref{Fig_zgr}).
 
 The GYRE configuration is also used in benchmark test as it is very simple to increase 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
@@ -309,5 +309,5 @@
 ie1e2u\_v is a flag to flag set u and  v surfaces are neither read nor computed.\\
  
-These fields can be read in an domain input file which name is setted in \np{cn\_domcfg} parameter specified in \ngn{namcfg}.
+These fields can be read in an domain input file which name is setted in \np{cn_domcfg} parameter specified in \ngn{namcfg}.
 \forfile{../namelists/namcfg}
 or they can be defined in an analytical way in MY\_SRC directory of the configuration.
@@ -413,5 +413,5 @@
 
 All the arrays relating to a particular ocean model configuration (grid-point 
-position, scale factors, masks) can be saved in files if $\np{nn\_msh} \not= 0$ 
+position, scale factors, masks) can be saved in files if $nn\_msh \not= 0$ 
 (namelist variable in \ngn{namdom}). This can be particularly useful for plots and off-line 
 diagnostics. In some cases, the user may choose to make a local modification 
@@ -420,5 +420,5 @@
 happens to be too wide due to insufficient model resolution). An example 
 is Gibraltar Strait in the ORCA2 configuration. When such modifications are done, 
-the output grid written when $\np{nn\_msh} \not=0$ is no more equal to the input grid.
+the output grid written when $nn\_msh \not= 0$ is no more equal to the input grid.
 
 $\ $\newline    % force a new line
@@ -454,5 +454,5 @@
 (d) hybrid $s-z$ coordinate, 
 (e) hybrid $s-z$ coordinate with partial step, and 
-(f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}=false). 
+(f) same as (e) but in the non-linear free surface (\protect\np{ln_linssh}=false). 
 Note that the non-linear free surface can be used with any of the 
 5 coordinates (a) to (e).}
@@ -464,14 +464,14 @@
 option which can be enabled or disabled in the middle of an experiment. Three main 
 choices are offered (Fig.~\ref{Fig_z_zps_s_sps}a to c): $z$-coordinate with full step 
-bathymetry (\np{ln\_zco}~=~true), $z$-coordinate with partial step bathymetry 
-(\np{ln\_zps}~=~true), or generalized, $s$-coordinate (\np{ln\_sco}~=~true). 
+bathymetry (\np{ln_zco}~=~true), $z$-coordinate with partial step bathymetry 
+(\np{ln_zps}~=~true), or generalized, $s$-coordinate (\np{ln_sco}~=~true). 
 Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate 
 (Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used:
 the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 
-$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}=true), 
+$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln_linssh}=true), 
 the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface 
 (in other words, the top of the ocean in not a rigid-lid). 
 The last choice in terms of vertical coordinate concerns the presence (or not) in the model domain 
-of ocean cavities beneath ice shelves. Setting \np{ln\_isfcav} to true allows to manage ocean cavities, 
+of ocean cavities beneath ice shelves. Setting \np{ln_isfcav} to true allows to manage ocean cavities, 
 otherwise they are filled in. This option is currently only available in $z$- or $zps$-coordinate,
 and partial step are also applied at the ocean/ice shelf interface. 
@@ -483,5 +483,5 @@
 \ifile{bathy\_meter} file, so that the computation of the number of wet ocean point 
 in each water column is by-passed}. 
-If \np{ln\_isfcav}~=~true, an extra file input file describing the ice shelf draft 
+If \np{ln_isfcav}~=~true, an extra file input file describing the ice shelf draft 
 (in meters) (\ifile{isf\_draft\_meter}) is needed.
 
@@ -503,10 +503,10 @@
 %%%
 
-Unless a linear free surface is used (\np{ln\_linssh}=false), the arrays describing 
+Unless a linear free surface is used (\np{ln_linssh}=false), the arrays describing 
 the grid point depths and vertical scale factors are three set of three dimensional arrays $(i,j,k)$ 
 defined at \textit{before}, \textit{now} and \textit{after} time step. The time at which they are
 defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. They are updated at each model time step
 using a fixed reference coordinate system which computer names have a $\_0$ suffix. 
-When the linear free surface option is used (\np{ln\_linssh}=true), \textit{before}, \textit{now} 
+When the linear free surface option is used (\np{ln_linssh}=true), \textit{before}, \textit{now} 
 and \textit{after} arrays are simply set one for all to their reference counterpart. 
 
@@ -519,13 +519,13 @@
 
 Three options are possible for defining the bathymetry, according to the 
-namelist variable \np{nn\_bathy} (found in \ngn{namdom} namelist): 
+namelist variable \np{nn_bathy} (found in \ngn{namdom} namelist): 
 \begin{description}
-\item[\np{nn\_bathy} = 0] a flat-bottom domain is defined. The total depth $z_w (jpk)$ 
+\item[\np{nn_bathy} = 0] a flat-bottom domain is defined. The total depth $z_w (jpk)$ 
 is given by the coordinate transformation. The domain can either be a closed 
 basin or a periodic channel depending on the parameter \np{jperio}. 
-\item[\np{nn\_bathy} = -1] a domain with a bump of topography one third of the 
+\item[\np{nn_bathy} = -1] a domain with a bump of topography one third of the 
 domain width at the central latitude. This is meant for the "EEL-R5" configuration, 
 a periodic or open boundary channel with a seamount. 
-\item[\np{nn\_bathy} = 1] read a bathymetry and ice shelf draft (if needed).
+\item[\np{nn_bathy} = 1] read a bathymetry and ice shelf draft (if needed).
  The \ifile{bathy\_meter} 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 
@@ -535,5 +535,5 @@
 
 The \ifile{isfdraft\_meter} 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{ln\_isfcav}~=~true. 
+ at each grid point of the model grid. This file is only needed if \np{ln_isfcav}~=~true. 
 Defining the ice shelf draft will also define the ice shelf edge and the grounding line position.
 \end{description}
@@ -550,6 +550,6 @@
 %        z-coordinate  and reference coordinate transformation
 % -------------------------------------------------------------------------------------------------------------
-\subsection[$z$-coordinate (\protect\np{ln\_zco}]
-	  	  {$z$-coordinate (\protect\np{ln\_zco}=true) and reference coordinate}
+\subsection[$z$-coordinate (\protect\np{ln_zco}]
+	  	  {$z$-coordinate (\protect\np{ln_zco}=true) and reference coordinate}
 \label{DOM_zco}
 
@@ -593,5 +593,5 @@
 (Fig.~\ref{Fig_zgr}).
 
-If the ice shelf cavities are opened (\np{ln\_isfcav}=~true~), the definition of $z_0$ is the same. 
+If the ice shelf cavities are opened (\np{ln_isfcav}=~true~), the definition of $z_0$ is the same. 
 However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to:
 \begin{equation} \label{DOM_zgr_ana}
@@ -688,6 +688,6 @@
 %        z-coordinate with partial step
 % -------------------------------------------------------------------------------------------------------------
-\subsection   [$z$-coordinate with partial step (\protect\np{ln\_zps})]
-			{$z$-coordinate with partial step (\protect\np{ln\_zps}=.true.)}
+\subsection   [$z$-coordinate with partial step (\protect\np{ln_zps})]
+			{$z$-coordinate with partial step (\protect\np{ln_zps}=.true.)}
 \label{DOM_zps}
 %--------------------------------------------namdom-------------------------------------------------------
@@ -712,6 +712,6 @@
 Two variables in the namdom namelist are used to define the partial step 
 vertical grid. The mimimum water thickness (in meters) allowed for a cell 
-partially filled with bathymetry at level jk is the minimum of \np{rn\_e3zps\_min} 
-(thickness in meters, usually $20~m$) or $e_{3t}(jk)*\np{rn\_e3zps\_rat}$ (a fraction, 
+partially filled with bathymetry at level jk is the minimum of \np{rn_e3zps_min} 
+(thickness in meters, usually $20~m$) or $e_{3t}(jk)*rn\_e3zps\_rat$ (a fraction, 
 usually 10\%, of the default thickness $e_{3t}(jk)$).
 
@@ -721,6 +721,6 @@
 %        s-coordinate
 % -------------------------------------------------------------------------------------------------------------
-\subsection   [$s$-coordinate (\protect\np{ln\_sco})]
-		     {$s$-coordinate (\protect\np{ln\_sco}=true)}
+\subsection   [$s$-coordinate (\protect\np{ln_sco})]
+		     {$s$-coordinate (\protect\np{ln_sco}=true)}
 \label{DOM_sco}
 %------------------------------------------nam_zgr_sco---------------------------------------------------
@@ -728,5 +728,5 @@
 %--------------------------------------------------------------------------------------------------------------
 Options are defined in \ngn{namzgr\_sco}.
-In $s$-coordinate (\np{ln\_sco}~=~true), the depth and thickness of the model 
+In $s$-coordinate (\np{ln_sco}~=~true), the depth and thickness of the model 
 levels are defined from the product of a depth field and either a stretching 
 function or its derivative, respectively:
@@ -744,7 +744,7 @@
 depth, since a mixed step-like and bottom-following representation of the 
 topography can be used (Fig.~\ref{Fig_z_zps_s_sps}d-e) or an envelop bathymetry can be defined (Fig.~\ref{Fig_z_zps_s_sps}f).
-The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects 
+The namelist parameter \np{rn_rmax} determines the slope at which the terrain-following coordinate intersects 
 the sea bed and becomes a pseudo z-coordinate. 
-The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} 
+The coordinate can also be hybridised by specifying \np{rn_sbot_min} and \np{rn_sbot_max} 
 as the minimum and maximum depths at which the terrain-following vertical coordinate is calculated.
 
@@ -753,5 +753,5 @@
 
 The original default NEMO s-coordinate stretching is available if neither of the other options 
-are specified as true (\np{ln\_s\_SH94}~=~false and \np{ln\_s\_SF12}~=~false). 
+are specified as true (\np{ln_s_SH94}~=~false and \np{ln_s_SF12}~=~false). 
 This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}:
 
@@ -779,5 +779,5 @@
 
 A stretching function, modified from the commonly used \citet{Song_Haidvogel_JCP94} 
-stretching (\np{ln\_s\_SH94}~=~true), is also available and is more commonly used for shelf seas modelling:
+stretching (\np{ln_s_SH94}~=~true), is also available and is more commonly used for shelf seas modelling:
 
 \begin{equation}
@@ -796,11 +796,11 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from 
-pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) 
+where $H_c$ is the critical depth (\np{rn_hc}) at which the coordinate transitions from 
+pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn_theta}) and $b$ (\np{rn_bb}) 
 are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and 
 $0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom 
 increase of the vertical resolution (Fig.~\ref{Fig_sco_function}).
 
-Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows 
+Another example has been provided at version 3.5 (\np{ln_s_SF12}) that allows 
 a fixed surface resolution in an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}. 
 In this case the a stretching function $\gamma$ is defined such that:
@@ -823,6 +823,6 @@
 
 This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of 
-the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards 
-the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn\_zs}) 
+the user prescribed stretching parameter $\alpha$ (\np{rn_alpha}) that stretches towards 
+the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn_zs}) 
 and bottom depths. The bottom cell depth in this example is given as a function of water depth:
 
@@ -831,5 +831,5 @@
 \end{equation}
 
-where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively.
+where the namelist parameters \np{rn_zb_a} and \np{rn_zb_b} are $a$ and $b$ respectively.
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -843,5 +843,5 @@
 This gives a smooth analytical stretching in computational space that is constrained to given specified surface and bottom grid cell thicknesses in real space. This is not to be confused with the hybrid schemes that superimpose geopotential coordinates on terrain following coordinates thus creating a non-analytical vertical coordinate that therefore may suffer from large gradients in the vertical resolutions. This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching, but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes.
 
-As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than the critical depth $h_c$. In this example two options are available in depths shallower than $h_c$, with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$.
+As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than the critical depth $h_c$. In this example two options are available in depths shallower than $h_c$, with pure sigma being applied if the \np{ln_sigcrit} is true and pure z-coordinates if it is false (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$.
 
 Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as large slopes lead to hydrostatic consistency. A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented, and is output as part of the model mesh file at the start of the run.
@@ -850,5 +850,5 @@
 %        z*- or s*-coordinate
 % -------------------------------------------------------------------------------------------------------------
-\subsection{$z^*$- or $s^*$-coordinate (\protect\np{ln\_linssh}=false) }
+\subsection{$z^*$- or $s^*$-coordinate (\protect\np{ln_linssh}=false) }
 \label{DOM_zgr_star}
 
@@ -881,5 +881,5 @@
 In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into 
 the cavities are performed in the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked. 
-All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked). 
+All the locations where the isf cavity is thinnest than \np{rn_isfhmin} meters are grounded ($i.e.$ masked). 
 If only one cell on the water column is opened at $t$-, $u$- or $v$-points, the bathymetry or the ice shelf draft is dug to fit this constrain.
 If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.\\ 
@@ -921,10 +921,10 @@
 Options are defined in \ngn{namtsd}.
 By default, the ocean start from rest (the velocity field is set to zero) and the initialization of 
-temperature and salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter.
+temperature and salinity fields is controlled through the \np{ln_tsd_ini} namelist parameter.
 \begin{description}
 \item[ln\_tsd\_init = .true.]  use a T and S input files that can be given on the model grid itself or 
 on their native input data grid. In the latter case, the data will be interpolated on-the-fly both in the 
 horizontal and the vertical to the model grid (see \S~\ref{SBC_iof}). The information relative to the 
-input files are given in the \np{sn\_tem} and \np{sn\_sal} structures. 
+input files are given in the \np{sn_tem} and \np{sn_sal} structures. 
 The computation is done in the \mdl{dtatsd} module.
 \item[ln\_tsd\_init = .false.] use constant salinity value of 35.5 psu and an analytical profile of temperature
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
@@ -965,5 +965,5 @@
 
 	\item[\np{nn\_gammablk~=~1~}]
-	The salt and heat exchange coefficients are velocity dependent and defined as $\np{rn\_gammas0} \times u_{*}$ and $\np{rn\_gammat0} \times u_{*}$
+	The salt and heat exchange coefficients are velocity dependent and defined as $rn\_gammas0 \times u_{*}$ and $rn\_gammat0 \times u_{*}$
         where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters).
         See \citet{Jenkins2010} for all the details on this formulation.
@@ -1164,5 +1164,5 @@
 ($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter).
 Furthermore, it is recommended to have a least 8 surface module time step per day,
-that is  $\rdt \ \np{nn\_fsbc} < 10,800~s = 3~h$. An example of recontructed SWF 
+that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF 
 is given in Fig.\ref{Fig_SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours 
 (from 1am to 11pm).
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 % ================================================================
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: /branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex	(revision 9388)
+++ /branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex	(revision 9389)
@@ -1,3 +1,3 @@
-\documentclass[NEMO_book]{subfiles}
+\documentclass[../tex_main/NEMO_manual]{subfiles}
 \begin{document}
 
Index: anches/2017/dev_merge_2017/DOC/tex_sub/minted.sty
===================================================================
--- /branches/2017/dev_merge_2017/DOC/tex_sub/minted.sty	(revision 9388)
+++ 	(revision )
@@ -1,44 +1,0 @@
-%% ==============================================================================
-%% minted.sty: syntax highlighting configuration
-%% ==============================================================================
-
-
-%% Global highlighting style
-%% ==============================================================================
-
-\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
-
-
-%% Specific per language
-
-\setminted[xml]{style=borland}
-
-
-%% Oneliner
-%% ==============================================================================
-
-\newmint[forline]{fortran}{}									% \forline|...|
-\newmint[xmlline]{xml}{    }									% \xmlline|...|
-\newmint[cmd]{console}{}										% \cmd|...|
-
-
-%% Multi-lines
-%% ==============================================================================
-
-\newminted[forlines]{fortran}{}								% \begin{forlines}
-\newminted[xmllines]{xml}{}									% \begin{xmllines}
-\newminted[cmds]{console}{}									% \begin{cmds}
-\newminted[clines]{c}{fontsize=\tiny}							% \begin{clines}
-
-
-%% File
-
-\newmintedfile[forfile]{fortran}{fontsize=\tiny}			% \forfile{../namelists/nam...}
-
-
-%% Inline
-%% ==============================================================================
-
-\newmintinline[forcode]{fortran}{frame=lines}			% \forcode{...}
-\newmintinline[xmlcode]{xml}{ 	frame=lines}			% \xmlcode{...}
-\newmintinline[snippet]{console}{frame=lines}			% \snippet{...}
