Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/doc/latex/global/document.tex
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/doc/latex/global/document.tex	(revision 14197)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/doc/latex/global/document.tex	(revision 14644)
@@ -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}
