A DocBook article in four languages. The same stylesheet, docbook.css, formats all of them.
The Arabic, Japanese and Russian files were translated automatically with DeepL. The goal of the samples is to test typesetting, not to provide perfect localization.
| Language | XML | |
|---|---|---|
| English | xml_gap.xml | xml_gap.pdf |
| Arabic | xml_gap_ar.xml | xml_gap_ar.pdf |
| Japanese | xml_gap_ja.xml | xml_gap_ja.pdf |
| Russian | xml_gap_ru.xml | xml_gap_ru.pdf |
Run the command from the samples folder, the parent of this one:
cssmedia -x xml_gap/xml_gap.xml -c docbook.css -p xml_gap/xml_gap.pdfThe files declare a DocBook DTD. Without a catalog, CSSMedia prints the warning External subset not found: docbook/docbookx.dtd and still generates the PDF. To avoid the warning, pass a catalog that resolves the DTD with -g.
- Right-to-left text in the Arabic file, with the photo at the start side of the text.
- Japanese text with its own font and line breaking.
- Links, a footer with the document title and the page number, and code listings in a monospace font.
- The stylesheet is short, so you can read it in full. The main README lists the techniques it uses.