Merge pull request #2722 from skirridsystems/main

Add GitHub styling to the PDF manual too
This commit is contained in:
Daniel Marjamäki 2020-07-24 07:48:12 +02:00 committed by GitHub
commit f82207cce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 1 deletions

2
.gitignore vendored
View File

@ -108,3 +108,5 @@ man/manual.tex
.idea
/.metadata/
cmake-*
man/manual.pdf
man/manual.html

View File

@ -2,7 +2,8 @@
# To install required tools in debian:
# sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-latex-extra
pandoc manual.md -o manual.pdf -s --number-sections --toc --css manual.css
pandoc manual.md -o manual.pdf -s --number-sections --toc -f markdown --pdf-engine=xelatex --listings -V mainfont="Segoe UI" -V monofont="Consolas" -V geometry:a4paper -V geometry:margin=2.4cm -H manual-style.tex
pandoc manual.md -o manual.html -s --number-sections --toc --css manual.css
pandoc reference-cfg-format.md -o reference-cfg-format.pdf -s --number-sections --toc

32
man/manual-style.tex Normal file
View File

@ -0,0 +1,32 @@
\usepackage{titlesec}
\usepackage{fancyvrb,newverbs,xcolor}
\usepackage{xcolor}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{-20pt}{20pt}
\definecolor{Light}{HTML}{EEEEEE}
\let\oldtexttt\texttt
\renewcommand{\texttt}[1]{
\colorbox{Light}{\oldtexttt{#1}}
}
\lstset{
basicstyle=\ttfamily,
backgroundcolor=\color{Light},
xleftmargin=10pt,
frame=lrtb,
framesep=10pt,
framerule=0pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}