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.
minted.sty in branches/2017/dev_merge_2017/DOC/tex_sub – NEMO

source: branches/2017/dev_merge_2017/DOC/tex_sub/minted.sty @ 9388

Last change on this file since 9388 was 9388, checked in by nicolasmartin, 6 years ago

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.

File size: 1.4 KB
Line 
1%% ==============================================================================
2%% minted.sty: syntax highlighting configuration
3%% ==============================================================================
4
5
6%% Global highlighting style
7%% ==============================================================================
8
9\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
10
11
12%% Specific per language
13
14\setminted[xml]{style=borland}
15
16
17%% Oneliner
18%% ==============================================================================
19
20\newmint[forline]{fortran}{}                          % \forline|...|
21\newmint[xmlline]{xml}{    }                          % \xmlline|...|
22\newmint[cmd]{console}{}                              % \cmd|...|
23
24
25%% Multi-lines
26%% ==============================================================================
27
28\newminted[forlines]{fortran}{}                       % \begin{forlines}
29\newminted[xmllines]{xml}{}                           % \begin{xmllines}
30\newminted[cmds]{console}{}                           % \begin{cmds}
31\newminted[clines]{c}{fontsize=\tiny}                    % \begin{clines}
32
33
34%% File
35
36\newmintedfile[forfile]{fortran}{fontsize=\tiny}         % \forfile{../namelists/nam...}
37
38
39%% Inline
40%% ==============================================================================
41
42\newmintinline[forcode]{fortran}{frame=lines}         % \forcode{...}
43\newmintinline[xmlcode]{xml}{    frame=lines}         % \xmlcode{...}
44\newmintinline[snippet]{console}{frame=lines}         % \snippet{...}
Note: See TracBrowser for help on using the repository browser.