Add styling to PDF manual
This uses the xelatex engine and a few style settings to make the PDF manual look more like the HTML manual.
This commit is contained in:
parent
f11a089141
commit
60362ce8cd
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue