[6998] | 1 | \documentclass[a4paper,11pt]{book} |
---|
| 2 | %\documentclass[a4paper,11pt,makeidx]{book} <== may need this to generate index |
---|
| 3 | |
---|
| 4 | % makeindex NEMO_book <== to regenerate the index |
---|
| 5 | % bibtex NEMO_book <== to generate the bibliography |
---|
| 6 | |
---|
[9347] | 7 | %% Silence package: filter output messages and warnings |
---|
| 8 | \usepackage{silence} |
---|
| 9 | %%% package loading |
---|
| 10 | \WarningFilter*{latex}{Package} |
---|
| 11 | %%% minitoc hints |
---|
| 12 | \WarningFilter{minitoc(hints)}{W0023} |
---|
| 13 | \WarningFilter{minitoc(hints)}{W0028} |
---|
| 14 | \WarningFilter{minitoc(hints)}{W0030} |
---|
| 15 | %%% natbib citation warning "Citation ... multiply defined" |
---|
| 16 | \WarningFilter*{natbib}{Citation} |
---|
| 17 | %%% Filter all warnings |
---|
| 18 | %\WarningsOff* |
---|
| 19 | |
---|
[6998] | 20 | %\usepackage[french]{babel} |
---|
| 21 | %\usepackage{color} |
---|
| 22 | \usepackage{graphicx} % allows insertion of pictures |
---|
| 23 | %\usepackage{graphics} % allows insertion of pictures |
---|
| 24 | \graphicspath{{Figures/}} % Set global directory for pictures |
---|
| 25 | %\DeclareGraphicsExtensions{.pdf,.eps} % Use .eps for LaTeX2HTML |
---|
| 26 | %\usepackage{xcolor} % Incompatibility with color -> graphicx |
---|
| 27 | \usepackage[capbesideposition={top,center}]{floatrow} % allows captions |
---|
| 28 | \floatsetup[table]{style=plaintop} % beside pictures |
---|
| 29 | \usepackage[margin=10pt,font={small}, % Gives small font for captions |
---|
| 30 | labelsep=colon,labelfont={bf}]{caption} % |
---|
| 31 | \usepackage{enumitem} % allows non-bold description items |
---|
| 32 | \usepackage{longtable} % allows multipage tables |
---|
| 33 | %\usepackage{colortbl} % gives coloured panels behind table columns |
---|
| 34 | |
---|
| 35 | %hyperref |
---|
| 36 | \usepackage[pdftitle={NEMO ocean engine},pdfauthor={Gurvan Madec},pdfstartview=FitH, |
---|
| 37 | bookmarks=true,bookmarksopen=true,breaklinks=true,colorlinks=true, |
---|
| 38 | linkcolor=blue,anchorcolor=blue,citecolor=blue,filecolor=blue,menucolor=blue,urlcolor=blue]{hyperref} |
---|
| 39 | % pdfsubject={The preprint document class |
---|
| 40 | % elsart},% pdfkeywords={diapycnal diffusion,numerical mixing,z-level models},%% usage of exteranl hyperlink : \href{mailto:my_address@wikibooks.org}{my\_address@wikibooks.org} |
---|
| 41 | % \url{http://www.wikibooks.org} |
---|
| 42 | % or \href{http://www.wikibooks.org}{wikibooks home} |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | %%%% page styles etc................ |
---|
| 46 | \usepackage{fancyhdr} |
---|
| 47 | \pagestyle{fancy} |
---|
| 48 | % with this we ensure that the chapter and section |
---|
| 49 | % headings are in lowercase. |
---|
| 50 | \renewcommand{\chaptermark}[1]{\markboth{#1}{}} |
---|
| 51 | \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} |
---|
| 52 | \fancyhf{} % delete current setting for header and footer |
---|
| 53 | \fancyhead[LE,RO]{\bfseries\thepage} |
---|
| 54 | \fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} |
---|
| 55 | \fancyhead[RE]{\bfseries\leftmark} |
---|
| 56 | \renewcommand{\headrulewidth}{0.5pt} |
---|
| 57 | \renewcommand{\footrulewidth}{0pt } |
---|
| 58 | \addtolength{\headheight}{2.6pt} % make space for the rule |
---|
| 59 | %\addtolength{\headheight}{1.6pt} % make space for the rule |
---|
| 60 | % get rid of headers on plain pages |
---|
| 61 | \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | %%%% Section number in Margin....... |
---|
| 65 | % typeset the number of each section in the left margin, with the start of each instance of |
---|
| 66 | % sectional heading text aligned with the left hand edge of the body text. |
---|
| 67 | \makeatletter |
---|
| 68 | \def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} |
---|
| 69 | \makeatother |
---|
| 70 | |
---|
| 71 | % Leave blank pages completely empty, w/o header |
---|
| 72 | \makeatletter |
---|
| 73 | \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else |
---|
| 74 | \hbox{} |
---|
| 75 | \vspace*{\fill} |
---|
| 76 | \vspace{\fill} |
---|
| 77 | \thispagestyle{empty} |
---|
| 78 | \newpage |
---|
| 79 | \if@twocolumn\hbox{}\newpage\fi\fi\fi} |
---|
| 80 | \makeatother |
---|
| 81 | |
---|
| 82 | %%%% define the chapter style ................ |
---|
| 83 | \usepackage{minitoc} %In French : \usepackage[french]{minitoc} |
---|
| 84 | %\usepackage{mtcoff} % invalidate the use of minitocs |
---|
| 85 | \usepackage{fancybox} |
---|
| 86 | |
---|
| 87 | \makeatletter |
---|
| 88 | \def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} |
---|
| 89 | \def\LignesVerticales{% |
---|
| 90 | \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} |
---|
| 91 | \def\GrosCarreAvecUnChiffre#1{% |
---|
| 92 | \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}% |
---|
| 93 | \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}% |
---|
| 94 | \vrule height 0pt width 1cm depth 0pt} |
---|
| 95 | \def\GrosCarreAvecTroisChiffre#1{% |
---|
| 96 | \rlap{\vrule height 0.8cm width 1.6cm depth 0.2cm}% |
---|
| 97 | \rlap{\hbox to 1.5cm{\hss\mbox{\color{white} #1}\hss}}% |
---|
| 98 | \vrule height 0pt width 1cm depth 0pt} |
---|
| 99 | |
---|
| 100 | \def\@makechapterhead#1{\hbox{% |
---|
| 101 | \huge |
---|
| 102 | \LignesVerticales |
---|
| 103 | \hspace{-0.5cm}% |
---|
| 104 | \GrosCarreAvecUnChiffre{\thechapter} |
---|
| 105 | \hspace{0.2cm}\hbox{#1}% |
---|
| 106 | % \GrosCarreAvecTroisChiffre{\thechapter} |
---|
| 107 | % \hspace{1cm}\hbox{#1}% |
---|
| 108 | %}\par\vskip 2cm} |
---|
| 109 | }\par\vskip 1cm} |
---|
| 110 | \def\@makeschapterhead#1{\hbox{% |
---|
| 111 | \huge |
---|
| 112 | \LignesVerticales |
---|
| 113 | %\hspace{0.5cm}% |
---|
| 114 | \hbox{#1}% |
---|
| 115 | }\par\vskip 2cm} |
---|
| 116 | \makeatother |
---|
| 117 | |
---|
| 118 | %\def\thechapter{\Roman{chapter}} % chapter number to be Roman |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | %%%% Mathematics............... |
---|
| 122 | %\documentclass{amsart} |
---|
| 123 | \usepackage{xspace} % helpd ensure correct spacing after macros |
---|
| 124 | \usepackage{latexsym,amssymb,amsmath} |
---|
| 125 | \allowdisplaybreaks[1] % allow page breaks in the middle of equations |
---|
| 126 | \usepackage{TexFiles/Styles/math_abbrev} % use maths shortcuts |
---|
| 127 | |
---|
| 128 | \usepackage{times} % use times font for text |
---|
| 129 | %\usepackage{mathtime} % font for illustrator to work (belleek fonts ) |
---|
| 130 | %\usepackage[latin1]{inputenc} % allows some unicode removed (agn) |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | %%% essai commande |
---|
| 134 | \newcommand{\nl}[1]{\texttt{\small{\textcolor{blue}{#1}}}} |
---|
| 135 | \newcommand{\nlv}[1]{\texttt{\footnotesize#1}\xspace} |
---|
| 136 | \newcommand{\smnlv}[1]{\texttt{\scriptsize#1}\xspace} |
---|
| 137 | |
---|
| 138 | %%%% namelist & code display................................ |
---|
| 139 | \usepackage{alltt,verbatim} %% alltt & verbatim for namelist |
---|
| 140 | % namelists |
---|
| 141 | \newcommand{\namdisplay}[1]{\begin{alltt}{\tiny\verbatiminput{Namelists/#1}}\end{alltt}\vspace{-10pt}} |
---|
| 142 | \newcommand{\namtools}[1]{\begin{alltt}{\tiny\verbatiminput{Namelists/#1}}\end{alltt}\vspace{-10pt}} |
---|
| 143 | % code display |
---|
[9346] | 144 | \newcommand{\codedisplay} [1] {\begin{alltt}{\tiny {\begin{verbatim} {#1}} \end{verbatim}} \end{alltt} } |
---|
[6998] | 145 | |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | %%%% commands for working with text................................ |
---|
| 149 | % command to "comment out" portions of text ({} argument) or not ({#1} argument) |
---|
| 150 | \newcommand{\amtcomment}[1]{} % command to "commented out" portions of text or not (#1 in argument) |
---|
| 151 | \newcommand{\sgacomment}[1]{} % command to "commented out" portions of |
---|
| 152 | \newcommand{\gmcomment}[1]{} % command to "commented out" portions of |
---|
[7705] | 153 | \newcommand{\sfcomment}[1]{} % command to "commented out" portions of |
---|
[6998] | 154 | % % text that span line breaks |
---|
| 155 | %Red (NR) or Yellow(WARN) |
---|
| 156 | %\newcommand{\NR} {\colorbox{red} {#1}} |
---|
| 157 | %\newcommand{\WARN} {\colorbox{yellow}{#1}} |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | %%% index commands...................... |
---|
| 162 | \usepackage{makeidx} |
---|
| 163 | %\usepackage{showidx} % show the index entry |
---|
| 164 | |
---|
| 165 | \newcommand{\mdl}[1]{\textit{#1.F90}\index{Modules!#1}} %module (mdl) |
---|
| 166 | \newcommand{\rou}[1]{\textit{#1}\index{Routines!#1}} %module (routine) |
---|
| 167 | \newcommand{\hf}[1]{\textit{#1.h90}\index{h90 file!#1}} %module (h90 files) |
---|
| 168 | \newcommand{\ngn}[1]{\textit{#1}\index{Namelist Group Name!#1}} %namelist name (nampar) |
---|
| 169 | \newcommand{\np}[1]{\textit{#1}\index{Namelist variables!#1}} %namelist variable |
---|
| 170 | \newcommand{\jp}[1]{\textit{#1}\index{Model parameters!#1}} %model parameter (jp) |
---|
| 171 | \newcommand{\pp}[1]{\textit{#1}\index{Model parameters!#1}} %namelist parameter (pp) |
---|
| 172 | \newcommand{\ifile}[1]{\textit{#1.nc }\index{Input NetCDF files!#1.nc}} %input NetCDF files (.nc) |
---|
| 173 | \newcommand{\key}[1]{\textbf{key\_#1}\index{CPP keys!key\_#1}} %key_cpp (key) |
---|
| 174 | \newcommand{\NEMO}{\textit{NEMO}\xspace} %NEMO (nemo) |
---|
| 175 | |
---|
| 176 | %%%% Bibliography ............. |
---|
| 177 | \usepackage[nottoc,notlof,notlot]{tocbibind} |
---|
| 178 | \usepackage[square,comma]{natbib} |
---|
| 179 | \bibpunct{[}{]}{,}{a}{}{;} %suppress "," after "et al." |
---|
| 180 | \providecommand{\bibfont}{\small} |
---|
| 181 | |
---|
| 182 | \usepackage{subfiles} % Separate compilation of chapters from whole manual |
---|
| 183 | %\newcommand{\onlyinsubfile}[1]{#1} % New commands for printing parts according to |
---|
| 184 | %\newcommand{\notinsubfile}[1]{} % the file being compiled |
---|
| 185 | % Commands to use in the documentfile |
---|
| 186 | %\renewcommand{\onlyinsubfile}[1]{} % Appears only if chapter .tex file is compiled |
---|
| 187 | %\renewcommand{\notinsubfile}[1]{#1} % " "" "" NEMO_book .tex file is compiled |
---|
| 188 | |
---|
| 189 | \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} |
---|