Index: NEMO/trunk/doc/latex/global/citation.tex
===================================================================
--- NEMO/trunk/doc/latex/global/citation.tex	(revision 11174)
+++ 	(revision )
@@ -1,7 +1,0 @@
-%% \sloppy: workaround for breaking DOI URL
-\sloppy
-``{\bfseries \heading}'', 
-\1stauthor and \2ndauthor, 
-{\em Scientific Notes of Climate Modelling Center (\ipslnum)} --- ISSN 1288-1619, 
-Institut Pierre-Simon Laplace (IPSL), 
-\href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid}
Index: NEMO/trunk/doc/latex/global/document.tex
===================================================================
--- NEMO/trunk/doc/latex/global/document.tex	(revision 11174)
+++ NEMO/trunk/doc/latex/global/document.tex	(revision 11176)
@@ -1,8 +1,9 @@
+
 %% ==============================================================================
-%% Reference Manual
+%% Template structure for reference manual
 %% ==============================================================================
 
 %% NEMO release version
-\def\version{4.0rc~}
+\def \version{4.0rc~}
 
 %% Preamble
@@ -12,25 +13,26 @@
 \documentclass[draft]{scrreport}
 
-%% Load manual definitions
-\input{definitions}
+%% Load the configuration of the manual
+\input{../main/definitions}
 
-%% Load all *.tex files from './latex/global' directory
-\input{../../global/packages}
-\input{../../global/highlighting}
-\input{../../global/new_cmds}
-\input{../../global/styles}
-\input{../../global/todonotes}
+%% Load global *.tex files
+\input{../../global/preamble}
 
-%% Include references and index for single subfile compilation
-\newcommand{\biblio}{\bibliography{../main/bibliography}}
-\newcommand{\pindex}{\printindex}
+\dominitoc
 
-\makeindex
+%% Launch the creation of the indexes
+\input{../../global/indexes}
+
 
 %% End of common preamble between main and sub-files
+%% Override custom cmds for full manual compilation
+\newcommand{\onlyinsubfile}[1]{#1}
+\newcommand{\notinsubfile}[1]{}
+
 \begin{document}
-\pagenumbering{gobble}
 
-%% Override custom cmds for full manual compilation
+\renewcommand{\onlyinsubfile}[1]{}
+\renewcommand{\notinsubfile}[1]{#1}
+
 \renewcommand{\biblio}{}
 \renewcommand{\pindex}{}
@@ -40,20 +42,24 @@
 %% ==============================================================================
 
-%% Title and information pages
-\input{../../global/frontpages}
+\pagenumbering{gobble}
 
-%% Engine citation
-\input{../../global/citation}
+%% Title page
+\input{../../global/frontpage}
+
+\maketitle
+\emptythanks
+
+%% Information page (2nd page)
+\input{../../global/info_page}
 
 %% Foreword
-\newpage
 %\frontmatter   %% Chapter numbering off and Roman numerals for page numbers
 \pagenumbering{roman}
-\subfile{../subfiles/foreword}
+\input{foreword}
 
-%% ToC i.e. Table of Contents
-\newpage
-\dominitoc
+%% Table of Contents
 \tableofcontents
+%\listoffigures
+\listoftables
 
 \clearpage
@@ -67,5 +73,4 @@
 \pagenumbering{arabic}
 
-\graphicspath{{../../figures/\engine/}}
 \input{chapters}
 
@@ -93,6 +98,11 @@
 \clearpage
 \phantomsection
-\addcontentsline{toc}{chapter}{Index}
-\printindex
+\addcontentsline{toc}{chapter}{Indexes}
+\printindex[keys]
+\printindex[modules]
+\printindex[blocks]
+\printindex[parameters]
+\printindex[subroutines]
 
 \end{document}
+
Index: NEMO/trunk/doc/latex/global/frontpage.tex
===================================================================
--- NEMO/trunk/doc/latex/global/frontpage.tex	(revision 11176)
+++ NEMO/trunk/doc/latex/global/frontpage.tex	(revision 11176)
@@ -0,0 +1,49 @@
+
+\title{\heading}
+\author{\firstauthor \and \secondauthor\thanks{\protect\input{thanks}}}
+\date{\today}
+
+\pretitle{
+  \begin{center}
+\begin{figure}[H]
+  \begin{minipage}[c]{0.35\textwidth}
+    \href{http://www.nemo-ocean.eu}{\includegraphics[width=0.7\textwidth]{logos/NEMO_grey}}
+  \end{minipage}
+  \hfill
+  \begin{minipage}[c]{0.65\textwidth}
+    \centering
+    \large{\em{{N}ucleus for {E}uropean {M}odelling of the {O}cean}}
+  \end{minipage}
+\end{figure}
+\vfill
+    \Huge
+}
+\posttitle{\par\end{center}\vskip 0.5em}
+\preauthor{\begin{center}\Large\lineskip0.5em\begin{tabular}[t]{c}}
+\postauthor{\end{tabular}\par\end{center}}
+\predate{
+  \vfill
+  \begin{center}
+    \large Version \version ---
+}
+\postdate{
+    \par~\\
+    \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{{badges/zenodo.\zid}.pdf}}
+  \end{center}
+  \vfill
+  \begin{center}
+    \href{http://www.cmcc.it}{          \includegraphics[height=0.055\textheight]{logos/CMCC}}
+    \hspace{0.5em}
+    \href{http://www.cnrs.fr}{          \includegraphics[height=0.055\textheight]{logos/CNRS}}
+    \hspace{0.9em}
+    \href{http://www.mercator-ocean.fr}{\includegraphics[height=0.055\textheight]{logos/MOI} }
+    \hspace{0.45em}
+    \href{http://www.metoffice.gov.uk}{ \includegraphics[height=0.055\textheight]{logos/UKMO}}
+    \hspace{0.5em}
+    \href{http://nerc.ukri.org}{        \includegraphics[height=0.055\textheight]{logos/NERC}} \\
+    \large{{\em{C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel}}
+  \end{center}
+}
+
+\thanksmarkseries{fnsymbol}
+
Index: NEMO/trunk/doc/latex/global/frontpages.tex
===================================================================
--- NEMO/trunk/doc/latex/global/frontpages.tex	(revision 11174)
+++ 	(revision )
@@ -1,112 +1,0 @@
-\title{\heading}
-\author{\1stauthor \and \2ndauthor\thanks{\protect\input{thanks}}}
-\date{\today}
-
-\graphicspath{{../../figures/}}
-
-\pretitle{
-  \begin{center}
-\begin{figure}[H]
-  \begin{minipage}[c]{0.35\textwidth}
-    \href{http://www.nemo-ocean.eu}{\includegraphics[width=0.7\textwidth]{logos/NEMO_grey}}
-  \end{minipage}
-  \hfill
-  \begin{minipage}[c]{0.65\textwidth}
-    \centering
-    \large{\em{{N}ucleus for {E}uropean {M}odelling of the {O}cean}}
-  \end{minipage}
-\end{figure}
-\vfill
-    \Huge
-}
-\posttitle{\par\end{center}\vskip 0.5em}
-\preauthor{\begin{center}\Large\lineskip0.5em\begin{tabular}[t]{c}}
-\postauthor{\end{tabular}\par\end{center}}
-\predate{
-  \vfill
-  \begin{center}
-    \large Version \version ---
-}
-\postdate{
-    \par~\\
-    \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{{badges/zenodo.\zid}.pdf}}
-  \end{center}
-  \vfill
-  \begin{center}
-    \href{http://www.cmcc.it}{          \includegraphics[height=0.055\textheight]{logos/CMCC}}
-    \hspace{0.5em}
-    \href{http://www.cnrs.fr}{          \includegraphics[height=0.055\textheight]{logos/CNRS}}
-    \hspace{0.9em}
-    \href{http://www.mercator-ocean.fr}{\includegraphics[height=0.055\textheight]{logos/MOI} }
-    \hspace{0.45em}
-    \href{http://www.metoffice.gov.uk}{ \includegraphics[height=0.055\textheight]{logos/UKMO}}
-    \hspace{0.5em}
-    \href{http://nerc.ukri.org}{        \includegraphics[height=0.055\textheight]{logos/NERC}} \\
-    \large{{\em{C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel}}
-  \end{center}
-}
-\thanksmarkseries{fnsymbol}
-\maketitle
-\emptythanks
-
-\thispagestyle{plain}
-
-% ================================================================
-% 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},
-which is a French adaptation of the GNU GPL (General Public License).
-Anyone may use it freely for research purposes, and is encouraged to
-communicate back to the NEMO team its own developments and improvements.
-
-The model and the present document have been made available as a service to the community.
-We cannot certify that the code and its manual are free of errors.
-Bugs are inevitable and some have undoubtedly survived the testing phase.
-Users are encouraged to bring them to our attention.
-
-The authors assume no responsibility for problems, errors, or incorrect usage of NEMO.
-
-% ================================================================
-% External resources
-% ================================================================
-\subsubsection*{Other resources}
-
-Additional information can be found on:
-\begin{itemize}
-\item the \href{http://www.nemo-ocean.eu}{website} of the project detailing several
-  associated applications and an exhaustive users bibliography
-\item the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of the model with
-  the code repository and some main resources (wiki, ticket system, forums, \ldots)
-\item the \href{http://zenodo.org/communities/nemo-ocean}{online archive}
-  delivering the publications issued by the consortium
-\item 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}
-
-Reference for papers and other publications is as follows:
-\vspace{0.5cm}
-
-\begin{figure}[b]
-  \begin{minipage}[c]{0.72\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_upright}}
-  \end{minipage}
-\end{figure}
Index: NEMO/trunk/doc/latex/global/highlighting.tex
===================================================================
--- NEMO/trunk/doc/latex/global/highlighting.tex	(revision 11174)
+++ NEMO/trunk/doc/latex/global/highlighting.tex	(revision 11176)
@@ -1,4 +1,6 @@
-%% Minted package: syntax highlighting configuration
+%% Syntax highlighting configuration
 %% ==============================================================================
+
+\usepackage[outputdir=../build]{minted}
 
 %% Global highlighting style
Index: NEMO/trunk/doc/latex/global/index.ist
===================================================================
--- NEMO/trunk/doc/latex/global/index.ist	(revision 11176)
+++ NEMO/trunk/doc/latex/global/index.ist	(revision 11176)
@@ -0,0 +1,8 @@
+headings_flag 1
+heading_prefix "{\\medskip\\hfill\\large\\textsf{\\textbf{"
+heading_suffix "}}\\hfill}\\medskip\\nopagebreak\n"
+
+delim_0 "\\dotfill~"
+delim_1 "\\dotfill~"
+delim_2 "\\dotfill~"
+
Index: NEMO/trunk/doc/latex/global/indexes.tex
===================================================================
--- NEMO/trunk/doc/latex/global/indexes.tex	(revision 11176)
+++ NEMO/trunk/doc/latex/global/indexes.tex	(revision 11176)
@@ -0,0 +1,21 @@
+
+\usepackage{imakeidx}
+
+%% Index entries (italic font for files, preformat for code)
+\newcommand{\hf}[1]{\textit{#1.h90}   \index{h90 files!#1}}
+\newcommand{\ifile}[1]{\textit{#1.nc} \index{Input NetCDF files!#1.nc}}
+\newcommand{\jp}[1]{\texttt{#1}       \index{Model parameters!#1}}
+\newcommand{\key}[1]{\index[keys]{#1}       \texttt{\textbf{key\_#1}}}
+\newcommand{\mdl}[1]{\index[modules]{#1}    \textit{#1.F90}          }
+\newcommand{\ngn}[1]{\index[blocks]{#1}     \texttt{#1}              }
+\newcommand{\np}[1]{ \index[parameters]{#1} \texttt{#1}              }
+\newcommand{\rou}[1]{\index[subroutines]{#1}   \texttt{#1}              }
+
+\indexsetup{toclevel=section, othercode=\small}
+
+\makeindex[intoc=true, name=keys       , title=CPP keys                      ]
+\makeindex[intoc=true, name=modules    , title=Modules                       ]
+\makeindex[intoc=true, name=blocks     , title=Namelist blocks               ]
+\makeindex[intoc=true, name=parameters , title=Namelist parameters, columns=3]
+\makeindex[intoc=true, name=subroutines, title=Subroutines                   ]
+
Index: NEMO/trunk/doc/latex/global/info_page.tex
===================================================================
--- NEMO/trunk/doc/latex/global/info_page.tex	(revision 11176)
+++ NEMO/trunk/doc/latex/global/info_page.tex	(revision 11176)
@@ -0,0 +1,72 @@
+
+\thispagestyle{plain}
+
+% ================================================================
+% 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},
+which is a French adaptation of the GNU GPL (General Public License).
+Anyone may use it freely for research purposes, and is encouraged to
+communicate back to the NEMO team its own developments and improvements.
+
+The model and the present document have been made available as a service to the community.
+We cannot certify that the code and its manual are free of errors.
+Bugs are inevitable and some have undoubtedly survived the testing phase.
+Users are encouraged to bring them to our attention.
+
+The authors assume no responsibility for problems, errors, or incorrect usage of NEMO.
+
+% ================================================================
+% External resources
+% ================================================================
+\subsubsection*{Other resources}
+
+Additional information can be found on:
+\begin{itemize}
+\item the \href{http://www.nemo-ocean.eu}{website} of the project detailing several
+  associated applications and an exhaustive users bibliography
+\item the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of the model with
+  the code repository and some main resources (wiki, ticket system, forums, \ldots)
+\item the \href{http://zenodo.org/communities/nemo-ocean}{online archive}
+  delivering the publications issued by the consortium
+\item 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}
+
+Reference for papers and other publications is as follows:
+
+\vspace{0.5cm}
+
+%% \sloppy: workaround for breaking DOI URL
+\sloppy
+``{\bfseries \heading}'', 
+\firstauthor and \secondauthor, 
+{\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}
+
+\begin{figure}[b]
+  \begin{minipage}[c]{0.72\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_upright}}
+  \end{minipage}
+\end{figure}
+
Index: NEMO/trunk/doc/latex/global/new_cmds.tex
===================================================================
--- NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 11174)
+++ NEMO/trunk/doc/latex/global/new_cmds.tex	(revision 11176)
@@ -2,8 +2,13 @@
 %% ==============================================================================
 
+%% Include references and index for compilation of single subfile 
+\newcommand{\mtoc}{\minitoc}
+\newcommand{\biblio}{\bibliography{../main/bibliography}}
+\newcommand{\pindex}{\printindex}
+
 %% NEMO and Fortran in small capitals
-\newcommand{\NEMO}{\textsc{nemo}}
-\newcommand{\fortran}{\textsc{Fortran}}
-\newcommand{\fninety}{\textsc{Fortran 90}}
+\newcommand{\NEMO}{\textsc{nemo}~}
+\newcommand{\fortran}{\textsc{Fortran}~}
+\newcommand{\fninety}{\textsc{Fortran 90}~}
 
 %% Common aliases
@@ -13,6 +18,6 @@
 \newcommand{\ztilde}{\ensuremath{\tilde z}}
 \newcommand{\stilde}{\ensuremath{\tilde s}}
-\newcommand{\ie}{\ensuremath{i.e.}}
-\newcommand{\eg}{\ensuremath{e.g.}}
+\newcommand{\ie}{\ensuremath{i.e.}~}
+\newcommand{\eg}{\ensuremath{e.g.}~}
 
 %% Inline maths
@@ -22,14 +27,4 @@
 %% Text env. for Gurvan
 \newcommand{\gmcomment}[1]{}
-
-%% Index entries (italic font for files, preformat for code)
-\newcommand{\hf}[1]{\textit{#1.h90}            \index{h90 files!#1}}
-\newcommand{\ifile}[1]{\textit{#1.nc}          \index{Input NetCDF files!#1.nc}}
-\newcommand{\jp}[1]{\texttt{#1}                \index{Model parameters!#1}}
-\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
-\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
-\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Names!#1}}
-\newcommand{\np}[1]{\texttt{#1}                \index{Namelist parameters!#1}}
-\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}
 
 %% Maths
Index: NEMO/trunk/doc/latex/global/packages.tex
===================================================================
--- NEMO/trunk/doc/latex/global/packages.tex	(revision 11174)
+++ NEMO/trunk/doc/latex/global/packages.tex	(revision 11176)
@@ -7,7 +7,5 @@
 \usepackage{times}                       %% font
 \usepackage{hyperref}                    %% hyper
-%\usepackage{idxlayout}                   %% index
 \usepackage{enumitem}                    %% list
-\usepackage[outputdir=../build]{minted}  %% listing
 \usepackage{amsmath}                     %% maths
 %\usepackage{fancyhdr}                    %% page
@@ -18,10 +16,11 @@
 
 %% Extensions in bundle package
-\usepackage{amssymb, graphicx, makeidx, tabularx, textcomp}
+\usepackage{amssymb, graphicx, tabularx, textcomp}
 \usepackage[utf8]{inputenc}              %% input encoding
 
 %% Configuration
-\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
-%\idxlayout{font=footnotesize, columns=3}
-%\renewcommand{\bibfont}{\footnotesize}
+\graphicspath{ {../../figures/} {../../figures/\engine/} }
+%\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
+\renewcommand{\bibfont}{\small}
 %\renewcommand{\bibsep}{3pt}
+
Index: NEMO/trunk/doc/latex/global/preamble.tex
===================================================================
--- NEMO/trunk/doc/latex/global/preamble.tex	(revision 11176)
+++ NEMO/trunk/doc/latex/global/preamble.tex	(revision 11176)
@@ -0,0 +1,7 @@
+
+\input{../../global/packages}
+\input{../../global/highlighting}
+\input{../../global/new_cmds}
+\input{../../global/styles}
+\input{../../global/todonotes}
+
Index: NEMO/trunk/doc/latex/global/styles.tex
===================================================================
--- NEMO/trunk/doc/latex/global/styles.tex	(revision 11174)
+++ NEMO/trunk/doc/latex/global/styles.tex	(revision 11176)
@@ -11,5 +11,5 @@
 \hypersetup{
 %  pdftitle={\heading},
-%  pdfauthor={\1stauthor and \2ndauthor},
+%  pdfauthor={\firstauthor and \secondauthor},
   colorlinks
 }
