New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9388 for branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty – NEMO

Ignore:
Timestamp:
2018-03-08T17:57:24+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Global reorganisation of DOC directory: implementation and configuration of syntax highlighting with 'minted' LaTeX package
New macros have been created to insert different source codes (fortran, xml, c and shell-session) in the document.
Pygments Python package is now required to compile the documentation.

Location:
branches/2017/dev_merge_2017/DOC/tex_main
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.sty

    r9387 r9388  
    11%% ============================================================================== 
    2 %% macros.sty:  
     2%% NEMO_manual.sty: all customizations (packages, ) 
    33%% ============================================================================== 
    44 
     5 
     6%% LaTeX packages 
     7%% ============================================================================== 
     8 
     9\usepackage{natbib}     % bib 
     10\usepackage{caption}    % caption 
     11\usepackage{xcolor}     % color 
     12\usepackage{silence}    % compilation 
     13\usepackage{times}      % font 
     14\usepackage{hyperref}   % hyper 
     15\usepackage{enumitem}   % list 
     16\usepackage{minted}     % listing 
     17\usepackage{amsmath}    % maths 
     18\usepackage{fancyhdr}   % page 
     19\usepackage{minitoc}    % toc 
     20\usepackage{subfiles}   % subdocs 
     21 
     22 
     23%% Extensions in bundle package 
     24 
     25\usepackage{amssymb, graphicx, longtable, makeidx, xspace} 
     26 
     27 
     28%% Configuration 
     29 
     30\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}} 
     31\graphicspath{{../figures/}} 
     32\hypersetup{ 
     33   pdftitle={NEMO ocean engine}, pdfauthor={Gurvan Madec, and the NEMO team}, 
     34   colorlinks 
     35} 
     36 
     37 
     38%% Styles 
     39%% ============================================================================== 
     40 
     41%% Additionnal fonts 
     42 
     43\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} 
     44 
     45 
     46%% Page layout 
     47 
     48\fancyhf{} 
     49\fancyhead[LE,RO]{\bfseries\thepage} 
     50\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} 
     51\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} 
     52\fancyhead[RE]{\bfseries\leftmark} 
     53\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
     54\renewcommand{\headrulewidth}{0.5pt} 
     55\renewcommand{\footrulewidth}{0pt  } 
     56\addtolength{\headheight}{2.6pt} 
     57 
     58 
     59%% Catcodes 
     60 
     61\makeatletter 
     62\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} 
     63\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} 
     64\def\GrosCarreAvecUnChiffre#1{% 
     65   \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}% 
     66   \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}% 
     67   \vrule height 0pt width 1cm depth 0pt% 
     68} 
     69\def\@makechapterhead#1{ 
     70   \hbox{ 
     71      \huge\LignesVerticales 
     72      \hspace{-0.5cm} 
     73      \GrosCarreAvecUnChiffre{\thechapter} 
     74      \hspace{0.2cm} 
     75      \hbox{#1} 
     76   } 
     77   \par\vskip 
     781cm 
     79} 
     80\def\@makeschapterhead#1{ 
     81   \hbox{ 
     82      \huge\LignesVerticales 
     83      \hbox{#1} 
     84   } 
     85   \par\vskip 
     862cm 
     87} 
     88\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else 
     89  \hbox{} 
     90  \vspace*{\fill} 
     91  \vspace{\fill} 
     92  \thispagestyle{empty} 
     93  \newpage 
     94  \if@twocolumn\hbox{}\newpage\fi\fi\fi} 
     95\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} 
     96\makeatother 
     97 
     98 
     99%% Macros (to check) 
    5100 
    6101\def\deg{$^{\circ}$} 
     
    22117\def\rdt{\Delta t} 
    23118 
     119 
     120%% New commands 
     121 
    24122\newcommand{ \gmcomment}[1]{} 
    25123\newcommand{ \sfcomment}[1]{} 
     
    29127\newcommand{\NEMO}{\textit{NEMO}\xspace} 
    30128 
    31 \newcommand{    \ifile}[1]{\textit{  #1.nc}\index{Input NetCDF files!#1.nc}} 
    32 \newcommand{       \jp}[1]{\textit{     #1}\index{     Model parameters!#1}} 
    33 \newcommand{       \hf}[1]{\textit{ #1.h90}\index{             h90 file!#1}} 
    34 \newcommand{      \key}[1]{\textbf{key\_#1}\index{        CPP keys!key\_#1}} 
    35 \newcommand{      \mdl}[1]{\textit{ #1.F90}\index{              Modules!#1}} 
    36 \newcommand{      \ngn}[1]{\textit{     #1}\index{  Namelist Group Name!#1}} 
    37 \newcommand{       \np}[1]{\textit{     #1}\index{   Namelist variables!#1}} 
    38 \newcommand{       \pp}[1]{\textit{     #1}\index{     Model parameters!#1}} 
    39 \newcommand{      \rou}[1]{\textit{     #1}\index{             Routines!#1}} 
     129\newcommand{\ifile}[1]{\textit{  #1.nc}\index{Input NetCDF files!#1.nc}} 
     130\newcommand{   \jp}[1]{\textit{     #1}\index{     Model parameters!#1}} 
     131\newcommand{   \hf}[1]{\textit{ #1.h90}\index{             h90 file!#1}} 
     132\newcommand{  \key}[1]{\textbf{key\_#1}\index{        CPP keys!key\_#1}} 
     133\newcommand{  \mdl}[1]{\textit{ #1.F90}\index{              Modules!#1}} 
     134\newcommand{  \ngn}[1]{\textit{     #1}\index{  Namelist Group Name!#1}} 
     135\newcommand{   \np}[1]{\textit{     #1}\index{   Namelist variables!#1}} 
     136\newcommand{   \pp}[1]{\textit{     #1}\index{     Model parameters!#1}} 
     137\newcommand{  \rou}[1]{\textit{     #1}\index{             Routines!#1}} 
    40138 
    41139\newcommand{\grad}{\nabla} 
Note: See TracChangeset for help on using the changeset viewer.