mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-02-08 05:57:33 +03:00
use custom dblatex style (add logo to pdf)
This commit is contained in:
parent
e96f8d0119
commit
72470ed634
6
Makefile
6
Makefile
@ -224,8 +224,10 @@ pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_SOURCES}
|
||||
a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc
|
||||
|
||||
pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
|
||||
inkscape -z -D --export-pdf=logo.pdf images/proxmox-logo.svg
|
||||
grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
|
||||
a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc
|
||||
a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" --dblatex-opts "-P doc.publisher.show=0 -s asciidoc-dblatex-custom.sty" pve-admin-guide.adoc
|
||||
rm logo.pdf
|
||||
|
||||
pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
|
||||
a2x -f epub pve-admin-guide.adoc
|
||||
@ -281,5 +283,5 @@ update: clean
|
||||
make all
|
||||
|
||||
clean:
|
||||
rm -rf *.tmp.xml *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked
|
||||
rm -rf logo.pdf *.tmp.xml *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked
|
||||
find . -name '*~' -exec rm {} ';'
|
||||
|
58
asciidoc-dblatex-custom.sty
Normal file
58
asciidoc-dblatex-custom.sty
Normal file
@ -0,0 +1,58 @@
|
||||
%%
|
||||
%% This style is derived from the docbook one.
|
||||
%%
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{asciidoc-proxmox}[2016/10/30 AsciiDoc DocBook Style]
|
||||
|
||||
% this will set letterpaper, because docbook.sty honors page layout
|
||||
% made by geometry package
|
||||
%\usepackage[letterpaper,total={7.25in,9.25in}, top=1in]{geometry}
|
||||
%\usepackage[a4paper]{geometry}
|
||||
|
||||
\usepackage[a4paper, left=2cm, right=1cm, top=2.5cm, bottom=2cm ]{geometry}
|
||||
|
||||
%% Just use the original package and pass the options.
|
||||
\RequirePackageWithOptions{docbook}
|
||||
|
||||
% Sidebar is a boxed minipage that can contain verbatim.
|
||||
% Changed shadow box to double box.
|
||||
\renewenvironment{sidebar}[1][0.95\textwidth]{
|
||||
\hspace{0mm}\newline%
|
||||
\noindent\begin{Sbox}\begin{minipage}{#1}%
|
||||
\setlength\parskip{\medskipamount}%
|
||||
}{
|
||||
\end{minipage}\end{Sbox}\doublebox{\TheSbox}%
|
||||
}
|
||||
|
||||
% For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`.
|
||||
\usepackage{alltt}
|
||||
|
||||
\definecolor{proxmoxred}{RGB}{229, 112, 0}
|
||||
|
||||
\newlength\mylength
|
||||
\def\redribbon{
|
||||
\setlength\mylength{0.3\paperheight}
|
||||
\AddToShipoutPicture*{
|
||||
\put(0,\LenToUnit{\mylength}){%
|
||||
{\color{proxmoxred}\rule{\paperwidth}{2cm}}}
|
||||
}
|
||||
}
|
||||
|
||||
% custom cover page
|
||||
\def\DBKcover{
|
||||
\thispagestyle{empty}
|
||||
\begin{flushright}
|
||||
\includegraphics[width=0.5\textwidth]{logo} \\
|
||||
\vspace*{1in}
|
||||
\bfseries
|
||||
\sffamily
|
||||
{\Huge \DBKtitle \\[1ex]\large ~~~ \\}
|
||||
{\Huge \DBKsubtitle \\[1ex]\large ~~~ \\}
|
||||
\vspace*{4.1in}
|
||||
{\Large \DBKdate \\}
|
||||
\vfill
|
||||
{\Large \bfseries \sffamily Proxmox Server Solutions Gmbh}
|
||||
\end{flushright}
|
||||
\redribbon
|
||||
\pagebreak[4]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user