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