rst2latex_fzj.sty 2.71 KB
Newer Older
1
2
3
4
5
6
7
% Author: Ingo Heimbach
% Contact: i.heimbach@fz-juelich.de
%
% Style for use with Docutils/rst2latex.

\PassOptionsToPackage{warn}{textcomp}
\usepackage{lmodern}
8
\usepackage{amssymb}
9
\usepackage{minted}
10
\usepackage{xcolor}
Ingo Meyer's avatar
Ingo Meyer committed
11
\usepackage{iflang}
12
13
14
\usepackage{tikz}
\usetikzlibrary{calc}

15
\definecolor{fzjblue}{RGB}{2,61,107}
16
\definecolor{mintedbg}{RGB}{252, 252, 255}
17
18
19

\renewcommand{\textbf}[1]{{\bfseries\color{fzjblue}#1}}

20
21
22
23
\setminted{
    bgcolor=mintedbg,
    breaklines=true,
    fontsize=\footnotesize,
24
    frame=single,
25
26
27
28
    linenos=true,
    python3=true,
    style=friendly,
    tabsize=2
29
}
30
31
32
% Set minted line number style
\renewcommand{\theFancyVerbLine}{%
    \sffamily\textcolor{gray}{\scriptsize\arabic{FancyVerbLine}}
33
34
35
}

\renewcommand{\maketitle}{
Ingo Meyer's avatar
Ingo Meyer committed
36
\providecommand{\documenttype}{\IfLanguageName{ngerman}{Technische Dokumentation}{Technical Documentation}}%
37
38
39
40
\begin{titlepage}
    \sffamily
    \makeatletter
    \begin{tikzpicture}[remember picture, overlay]
Ingo Meyer's avatar
Ingo Meyer committed
41
        \node[anchor=north] at ($ (current page.center) + (0, 0.5\textheight) $) {%
42
            \LARGE\scshape%
Ingo Meyer's avatar
Ingo Meyer committed
43
            \parbox{\textwidth}{\centering\documenttype}%
44
        };%
Ingo Meyer's avatar
Ingo Meyer committed
45
46
        \fill[ultra thick, fill=fzjblue] ($ (current page.north west) - (0, 0.25\paperheight) $) rectangle +(\paperwidth, -0.1\paperheight);
        \node at ($ (current page.north) - (0, 0.3\paperheight) $) {%
47
48
49
            \LARGE\bfseries%
            \parbox{\textwidth}{\centering \color{white}\@title}
        };%
Ingo Meyer's avatar
Ingo Meyer committed
50
        \node at ($ (current page.center) + (0, 0.05\textheight) $) {%
51
52
53
            \Large%
            \parbox{\textwidth}{\centering \@author}
        };
Ingo Meyer's avatar
Ingo Meyer committed
54
        \node at ($ (current page.center) + (0, -0.05\textheight) $) {%
55
56
57
58
59
60
61
62
            \large%
            \ifthenelse{\equal{\@date}{}} {
                \today
            }{
                \@date
            }

        };
Ingo Meyer's avatar
Ingo Meyer committed
63
        \node[anchor=south] at ($ (current page.center) + (0, -0.5\textheight) $) {%
64
65
66
67
68
69
70
            \parbox{\textwidth}{\centering
                Forschungszentrum Jülich GmbH \\[1ex]
                Peter Grünberg Institut / Jülich Centre for Neutron Science \\
                Technische Administration \\
                (PGI/JCNS-TA)
            }%
        };%
Ingo Meyer's avatar
Ingo Meyer committed
71
72
73
74
        \node[anchor=south west, inner sep=0, outer sep=0] at ($ (current page.south west) + (0.05\paperwidth, 1.0631) $) {%
            \sffamily\color{fzjblue}\IfLanguageName{ngerman}{Mitglied der Helmholtz-Gemeinschaft}{Member of the Helmholtz Association}%
        };
        \node[anchor=south east, inner sep=0, outer sep=0] at (current page.south east) {
75
            \includegraphics[height=0.1769\paperwidth]{fz_logo_schutzzone}%
76
77
78
79
80
        };%
    \end{tikzpicture}
    \makeatother
\end{titlepage}
}
81
82
83
84
85

\IfFileExists{custom.sty}{%
    \usepackage{custom}
}{%
}