Index: NEMO/branches/2019/ENHANCE-03_closea/doc/latex/global/styles.tex
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/doc/latex/global/styles.tex	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/doc/latex/global/styles.tex	(revision 12149)
@@ -3,59 +3,83 @@
 %% ==============================================================================
 
-%\pagestyle{fancy}
-\bibliographystyle{../../global/ametsoc}
-\renewcommand{\bibpreamble}{\begin{multicols}{2}}
-\renewcommand{\bibpostamble}{\end{multicols}}
-
-%% Additionnal fonts
-\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
+%% Colors
+\setmanualcolor
+\colorlet{manualcolorshaded}{manualcolor!60}
+\definecolor{orcidcolor}{HTML}{A6CE39}
 
 %% Page layout
-%\fancyhf{}
-%\fancyhead[LE,RO]{\bfseries\thepage}
-%\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
-%\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
-%\fancyhead[RE]{\bfseries\leftmark}
-%\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
-%\renewcommand{\headrulewidth}{0.5pt}
-%\renewcommand{\footrulewidth}{0pt  }
-%\addtolength{\headheight}{2.6pt}
+\pagestyle{scrheadings}
+\addtokomafont{pagehead}{  \sffamily              }
+\addtokomafont{pagefoot}{  \sffamily \footnotesize}
+\addtokomafont{pagenumber}{\sffamily \slshape     }
+\addtokomafont{chapter}{\color{white}}
+\ohead{} \ofoot{}   %% Clear defaults
 
+%% Caption
+\captionsetup{font = footnotesize, justification = justified}
+
+%% Footnote
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%% Bibliography
+\bibliographystyle{../../global/ametsoc}
+\renewcommand{\bibfont}{\small}
+\renewcommand{\bibpreamble }{\begin{multicols}{2}}
+\renewcommand{\bibpostamble}{  \end{multicols}   }
 
 %% Catcodes
-%\makeatletter
-%\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
-%\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
-%\def\GrosCarreAvecUnChiffre#1{
-%	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
-%	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
-% 	\vrule height 0pt width 1cm depth 0pt
-%}
-%\def\@makechapterhead#1{
-%	\hbox{
-%		\huge\LignesVerticales\hspace{-0.5cm}
-%		\GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
-%		\hbox{#1}
-%	}
-%	\par\vskip
-%1cm
-%}
-%\def\@makeschapterhead#1{
-%	\hbox{
-%		\huge\LignesVerticales
-%		\hbox{#1}
-%	}
-%	\par\vskip
-%2cm
-%}
-%\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
-%  \hbox{}
-%  \vspace*{\fill}
-%  \vspace{\fill}
-%  \thispagestyle{empty}
-%  \newpage
-%  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
-%\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
-%\makeatother
+\makeatletter
 
+%% Prevent error with tikz and namelist inclusion
+\global\let\tikz@ensure@dollar@catcode=\relax
 
+%% 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 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"}
+
+\makeatother
