title | subtitle | author | date | lang |
---|---|---|---|---|
README |
docbook52pdf - universal markup to pdf converter |
Jens Getreu |
2020-04-01 |
en_GB.UTF-8 |
docbook52pdf is an universal markup-language to pdf converter. It comes as small Bash-script that combines different products to a rendering-tool-chain.
-
The script uses
pandoc
to convert: commonmark, creole, csv, docbook, docx, dokuwiki, epub, fb2, gfm, haddock, html, ipynb, jats, jira, json, latex, man, markdown, markdown_github, markdown_mmd, markdown_phpextra, markdown_strict, mediawiki, muse, native, odt, opml, org, rst, t2t, textile, tikiwiki, twiki and vimwiki into Docbook 5.In case the input is available as Docbook 5 xml-file, this stage is skipped.
-
The resulting Docbook 5 is validated with
xmlstarlet
and converted into formatting objects withxsltproc
. The styles are based onasciidoctor-fopub
. -
The final pdf-file is generated with Apache
fop
.
-
Install dependencies:
sudo apt install pandoc docbook5-xml docbook-xsl-ns xsltproc fop xmlto libxml2-utils xmlstarlet
-
Download the template:
git clone git@gitlab.com:getreu/docbook52pdf.git
-
Copy and rename the template directory:
cp -r docbook52pdf/template . mv template my_document
-
Edit the template:
vi my_document/source/main.md
-
Render:
./my_document/make
This generates the file
./my_document/build/pdf/main.pdf
.