Commit beeb7a7e authored by Ingo Heimbach's avatar Ingo Heimbach

Adopted new corporate design + minor improvements

- Adopted fzj colors and the new logo
- Reformatted the license file
- Added a Makefile for HTML and PDF generation
- Overworked patched `rst2latex` file to support Python tracebacks
  (pytb)
- Improved style file to support umlauts in lstlistings
parent 5086ec2d
Copyright 2017 Forschungszentrum Jülich GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
PANDOC = pandoc
RST2HTML = rst2html.py
RST2LATEX = rst2latex.py
SHELL := /bin/bash
MDFILES := $(wildcard *.md)
RSTFILES := $(wildcard *.rst)
HTMLFILES := $(patsubst %.rst,%.html,$(RSTFILES)) $(patsubst %.md,%.html,$(MDFILES))
PDFFILES := $(patsubst %.rst,%.pdf,$(RSTFILES)) $(patsubst %.md,%.pdf,$(MDFILES))
all: html pdf
html: $(HTMLFILES)
pdf: $(PDFFILES)
%.html: %.rst .rst2html_github.css
$(RST2HTML) --stylesheet=.rst2html_github.css --syntax-highlight=short $< > $@
rm .rst2html_github.css
%.pdf: %.rst .fz_logo_schutzzone.pdf
TEX_FILENAME="$$(basename $< .rst).tex" && \
TEMP_TEX_DIR="$$(mktemp -d)" && \
$(RST2LATEX) --documentclass=scrartcl \
--hyperref-options=hidelinks \
--stylesheet=rst2latex_fzj.sty \
--stylesheet-dirs="$$(pwd)" \
--no-section-numbering \
--use-latex-docinfo \
--latex-preamble="\usepackage[ngerman]{babel}" \
$< > "$${TEMP_TEX_DIR}/$${TEX_FILENAME}" && \
cp .fz_logo_schutzzone.pdf "$${TEMP_TEX_DIR}/fz_logo_schutzzone.pdf" && \
pushd "$${TEMP_TEX_DIR}" && \
latexmk -pdf -halt-on-error "$${TEX_FILENAME}" && \
popd && \
mv "$${TEMP_TEX_DIR}/$@" ./ && \
rm -rf "$${TEMP_TEX_DIR}"
%.rst: %.md
$(PANDOC) --from=markdown --to=rst -o $@ $<
.rst2html_github.css:
curl -o $@ -L https://iffgit.fz-juelich.de/doc-utils/doc-utils/raw/master/rst2html_githublike_fzj.css
.fz_logo_schutzzone.pdf:
curl -o $@ -L https://iffwww.iff.kfa-juelich.de/pub/downloads/fz_logo/fz_logo_schutzzone.pdf
clean:
rm -f *.html *.pdf .rst2html_github.css $(patsubst %.md,%.rst,$(MDFILES))
.PHONY: all clean html pdf
......@@ -153,7 +153,7 @@ small {
strong {
font-weight: bold;
color: #005B82;
color: #023d6b;
}
em {
......
......@@ -30,6 +30,7 @@ class CodeBlock(Directive):
has_content = True
rstlang_to_listingslang = {
'pytb': '{}',
'text': '{}'
}
......@@ -50,4 +51,4 @@ description = ('Generates LaTeX documents from standalone reStructuredText '
for directive_name in ('code', 'code-block'):
directives.register_directive(directive_name, CodeBlock)
publish_cmdline(writer_name='latex', description=description)
\ No newline at end of file
publish_cmdline(writer_name='latex', description=description)
......@@ -10,27 +10,37 @@
\usepackage{tikz}
\usetikzlibrary{calc}
\definecolor{fzjblue}{RGB}{0,91,130}
\definecolor{fzjblue}{RGB}{2,61,107}
\renewcommand{\textbf}[1]{{\bfseries\color{fzjblue}#1}}
\lstset{
basicstyle=\ttfamily\color{black}\footnotesize,
keywordstyle=\color[RGB]{215, 58, 73},
emphstyle=\color[RGB]{0, 92, 197},
commentstyle=\color[RGB]{106, 115, 125},
stringstyle=\color[RGB]{0, 114, 0},
numbers=left,
numberstyle=\tiny\color{gray},
stepnumber=1,
tabsize=2,
breaklines,
breakatwhitespace,
showspaces=false,
showstringspaces=false,
backgroundcolor=\color[RGB]{252, 252, 255},
frame=single,
language=bash
basicstyle=\ttfamily\color{black}\footnotesize,
keywordstyle=\color[RGB]{215, 58, 73},
emphstyle=\color[RGB]{0, 92, 197},
commentstyle=\color[RGB]{106, 115, 125},
stringstyle=\color[RGB]{0, 114, 0},
numbers=left,
numberstyle=\tiny\color{gray},
stepnumber=1,
tabsize=2,
breaklines,
breakatwhitespace,
showspaces=false,
showstringspaces=false,
backgroundcolor=\color[RGB]{252, 252, 255},
frame=single,
language=bash
}
\lstset{literate=%
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
{~}{{\textasciitilde}}1
}
\renewcommand{\maketitle}{
......@@ -69,7 +79,7 @@ language=bash
}%
};%
\node[anchor=south east] at (current page.south east) {
\includegraphics[scale=0.35]{logo_fzj_schutzzone}%
\includegraphics[height=0.1769\paperwidth]{fz_logo_schutzzone}%
};%
\end{tikzpicture}
\makeatother
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment