use custom dblatex style (add logo to pdf)
[pve-docs.git] / asciidoc-dblatex-custom.sty
1 %%
2 %% This style is derived from the docbook one.
3 %%
4 \NeedsTeXFormat{LaTeX2e}
5 \ProvidesPackage{asciidoc-proxmox}[2016/10/30 AsciiDoc DocBook Style]
6
7 % this will set letterpaper, because docbook.sty honors page layout
8 % made by geometry package
9 %\usepackage[letterpaper,total={7.25in,9.25in}, top=1in]{geometry}
10 %\usepackage[a4paper]{geometry}
11
12 \usepackage[a4paper, left=2cm, right=1cm, top=2.5cm, bottom=2cm ]{geometry}
13
14 %% Just use the original package and pass the options.
15 \RequirePackageWithOptions{docbook}
16
17 % Sidebar is a boxed minipage that can contain verbatim.
18 % Changed shadow box to double box.
19 \renewenvironment{sidebar}[1][0.95\textwidth]{
20 \hspace{0mm}\newline%
21 \noindent\begin{Sbox}\begin{minipage}{#1}%
22 \setlength\parskip{\medskipamount}%
23 }{
24 \end{minipage}\end{Sbox}\doublebox{\TheSbox}%
25 }
26
27 % For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`.
28 \usepackage{alltt}
29
30 \definecolor{proxmoxred}{RGB}{229, 112, 0}
31
32 \newlength\mylength
33 \def\redribbon{
34 \setlength\mylength{0.3\paperheight}
35 \AddToShipoutPicture*{
36 \put(0,\LenToUnit{\mylength}){%
37 {\color{proxmoxred}\rule{\paperwidth}{2cm}}}
38 }
39 }
40
41 % custom cover page
42 \def\DBKcover{
43 \thispagestyle{empty}
44 \begin{flushright}
45 \includegraphics[width=0.5\textwidth]{logo} \\
46 \vspace*{1in}
47 \bfseries
48 \sffamily
49 {\Huge \DBKtitle \\[1ex]\large ~~~ \\}
50 {\Huge \DBKsubtitle \\[1ex]\large ~~~ \\}
51 \vspace*{4.1in}
52 {\Large \DBKdate \\}
53 \vfill
54 {\Large \bfseries \sffamily Proxmox Server Solutions Gmbh}
55 \end{flushright}
56 \redribbon
57 \pagebreak[4]
58 }