source: trunk/DOC/TexFiles/Preamble.tex @ 7705

Last change on this file since 7705 was 7705, checked in by flavoni, 3 years ago

update NEMO documentation in trunk

File size: 7.9 KB
Line 
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
17labelsep=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,
24bookmarks=true,bookmarksopen=true,breaklinks=true,colorlinks=true,
25linkcolor=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\newcommand{\sfcomment}[1]{}     % command to "commented out" portions of
141%                                               % text that span line breaks
142%Red (NR) or Yellow(WARN)
143%\newcommand{\NR}   {\colorbox{red}   {#1}}
144%\newcommand{\WARN} {\colorbox{yellow}{#1}}
145
146
147
148%%% index commands......................
149\usepackage{makeidx}
150%\usepackage{showidx}            % show the index entry
151
152\newcommand{\mdl}[1]{\textit{#1.F90}\index{Modules!#1}}  %module (mdl)
153\newcommand{\rou}[1]{\textit{#1}\index{Routines!#1}}  %module (routine)
154\newcommand{\hf}[1]{\textit{#1.h90}\index{h90 file!#1}}  %module (h90 files)
155\newcommand{\ngn}[1]{\textit{#1}\index{Namelist Group Name!#1}}   %namelist name (nampar)
156\newcommand{\np}[1]{\textit{#1}\index{Namelist variables!#1}}        %namelist variable
157\newcommand{\jp}[1]{\textit{#1}\index{Model parameters!#1}} %model parameter (jp)
158\newcommand{\pp}[1]{\textit{#1}\index{Model parameters!#1}}    %namelist parameter (pp)
159\newcommand{\ifile}[1]{\textit{#1.nc  }\index{Input NetCDF files!#1.nc}}   %input NetCDF files (.nc)
160\newcommand{\key}[1]{\textbf{key\_#1}\index{CPP keys!key\_#1}} %key_cpp (key)
161\newcommand{\NEMO}{\textit{NEMO}\xspace}  %NEMO (nemo)
162
163%%%%   Bibliography   .............
164\usepackage[nottoc,notlof,notlot]{tocbibind}
165\usepackage[square,comma]{natbib}
166\bibpunct{[}{]}{,}{a}{}{;}                           %suppress "," after "et al."
167\providecommand{\bibfont}{\small}
168
169\usepackage{subfiles}                          % Separate compilation of chapters from whole manual
170%\newcommand{\onlyinsubfile}[1]{#1}             % New commands for printing parts according to
171%\newcommand{\notinsubfile}[1]{}                % the file being compiled
172% Commands to use in the documentfile
173%\renewcommand{\onlyinsubfile}[1]{}                      % Appears only if chapter   .tex file is compiled
174%\renewcommand{\notinsubfile}[1]{#1}                     %    "    ""   "" NEMO_book .tex file is compiled
175
176\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
Note: See TracBrowser for help on using the repository browser.