]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2023/11/11.rss
Generated.
[homepage.git] / blog / archive / 2023 / 11 / 11.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from November 2023</title>
5 <description>Entries from November 2023</description>
6 <link>https://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>Test framework for DocBook processors / formatters</title>
11 <link>https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html</link>
12 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html</guid>
13 <pubDate>Sun, 5 Nov 2023 13:00:00 +0100</pubDate>
14 <description>&lt;p&gt;All the books I have published so far has been using
15 &lt;a href=&quot;https://docbook.org/&quot;&gt;DocBook&lt;/a&gt; somewhere in the process.
16 For the first book, the source format was DocBook, while for every
17 later book it was an intermediate format used as the stepping stone to
18 be able to present the same manuscript in several formats, on paper,
19 as ebook in ePub format, as a HTML page and as a PDF file either for
20 paper production or for Internet consumption. This is made possible
21 with a wide variety of free software tools with DocBook support in
22 Debian. The source format of later books have been docx via rst,
23 Markdown, Filemaker and Asciidoc, and for all of these I was able to
24 generate a suitable DocBook file for further processing using pandoc,
25 a2x and asciidoctor, as well as rendering using
26 &lt;a href=&quot;https://tracker.debian.org/pkg/xmlto&quot;&gt;xmlto&lt;/a&gt;,
27 &lt;a href=&quot;https://tracker.debian.org/pkg/dbtoepub&quot;&gt;dbtoepub&lt;/a&gt;,
28 &lt;a href=&quot;https://tracker.debian.org/pkg/dblatex&quot;&gt;dblatex&lt;/a&gt;,
29 &lt;a href=&quot;https://tracker.debian.org/pkg/dblatex&quot;&gt;docbook-xsl&lt;/a&gt; and
30 &lt;a href=&quot;https://tracker.debian.org/pkg/fop&quot;&gt;fop&lt;/a&gt;.&lt;/p&gt;
31
32 &lt;p&gt;Most of the &lt;a href=&quot;http://www.hungry.com/~pere/publisher/&quot;&gt;books I
33 have published&lt;/a&gt; are translated books, with English as the source
34 language. The use of
35 &lt;a href=&quot;https://tracker.debian.org/pkg/po4a&quot;&gt;po4a&lt;/a&gt; to
36 handle translations using the gettext PO format has been a blessing,
37 but publishing translated books had triggered the need to ensure the
38 DocBook tools handle relevant languages correctly. For every new
39 language I have published, I had to submit patches dblatex, dbtoepub
40 and docbook-xsl fixing incorrect language and country specific issues
41 in the framework themselves. Typically this has been missing keywords
42 like &#39;figure&#39; or sort ordering of index entries. After a while it
43 became tiresome to only discover issues like this by accident, and I
44 decided to write a DocBook &quot;test framework&quot; exercising various
45 features of DocBook and allowing me to see all features exercised for
46 a given language. It consist of a set of DocBook files, a version 4
47 book, a version 5 book, a v4 book set, a v4 selection of problematic
48 tables, one v4 testing sidefloat and finally one v4 testing a book of
49 articles. The DocBook files are accompanied with a set of build rules
50 for building PDF using dblatex and docbook-xsl/fop, HTML using xmlto
51 or docbook-xsl and epub using dbtoepub. The result is a set of files
52 visualizing footnotes, indexes, table of content list, figures,
53 formulas and other DocBook features, allowing for a quick review on
54 the completeness of the given locale settings. To build with a
55 different language setting, all one need to do is edit the lang= value
56 in the .xml file to pick a different ISO 639 code value and run
57 &#39;make&#39;.&lt;/p&gt;
58
59 &lt;p&gt;The &lt;a href=&quot;https://codeberg.org/pere/docbook-example/&quot;&gt;test framework
60 source code&lt;/a&gt; is available from Codeberg, and a generated set of
61 presentations of the various examples is available as Codeberg static
62 web pages at
63 &lt;a href=&quot;https://pere.codeberg.page/docbook-example/&quot;&gt;https://pere.codeberg.page/docbook-example/&lt;/a&gt;.
64 Using this test framework I have been able to discover and report
65 several bugs and missing features in various tools, and got a lot of
66 them fixed. For example I got Northern Sami keywords added to both
67 docbook-xsl and dblatex, fixed several typos in Norwegian bokmål and
68 Norwegian Nynorsk, support for non-ascii title IDs added to pandoc,
69 Norwegian index sorting support fixed in xindy and initial Norwegian
70 Bokmål support added to dblatex. Some issues still remains, though.
71 Default index sorting rules are still broken in several tools, so the
72 Norwegian letters æ, ø and å are more often than not sorted properly
73 in the book index.&lt;/p&gt;
74
75 &lt;p&gt;The test framework recently received some more polish, as part of
76 publishing my latest book. This book contained a lot of fairly
77 complex tables, which exposed bugs in some of the tools. This made me
78 add a new test file with various tables, as well as spend some time to
79 brush up the build rules. My goal is for the test framework to
80 exercise all DocBook features to make it easier to see which features
81 work with different processors, and hopefully get them all to support
82 the full set of DocBook features. Feel free to send patches to extend
83 the test set, and test it with your favorite DocBook processor.
84 Please visit these two URLs to learn more:&lt;/p&gt;
85
86 &lt;ul&gt;
87 &lt;li&gt;&lt;a href=&quot;https://codeberg.org/pere/docbook-example/&quot;&gt;https://codeberg.org/pere/docbook-example/&lt;/a&gt;&lt;/li&gt;
88 &lt;li&gt;&lt;a href=&quot;https://pere.codeberg.page/docbook-example/&quot;&gt;https://pere.codeberg.page/docbook-example/&lt;/a&gt;&lt;/li&gt;
89 &lt;/ul&gt;
90
91 &lt;p&gt;If you want to learn more on Docbook and translations, I recommend
92 having a look at the &lt;a href=&quot;https://docbook.org/&quot;&gt;the DocBook
93 web site&lt;/a&gt;,
94 &lt;a href=&quot;https://doccookbook.sourceforge.net/html/en/&quot;&gt;the DoCookBook
95 site&lt;a/&gt; and my earlier blog post on
96 &lt;a href=&quot;https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html&quot;&gt;how
97 the Skolelinux project process and translate documentation&lt;/a&gt;, a talk I gave earlier this year on
98 &lt;a href=&quot;https://www.nuug.no/aktiviteter/20230314-oversetting-og-publisering-av-b%c3%b8ker-med-fri-programvare/&quot;&gt;how
99 to translate and publish books using free software&lt;/a&gt; (Norwegian
100 only).&lt;/p&gt;
101
102 &lt;!--
103
104 https://github.com/docbook/xslt10-stylesheets/issues/205 (docbook-xsl: sme support)
105 https://bugs.debian.org/968437 (xindy: index sorting rules for nb/nn)
106 https://bugs.debian.org/856123 (pandoc: markdown to docbook with non-english titles)
107 https://bugs.debian.org/864813 (dblatex: missing nb words)
108 https://bugs.debian.org/756386 (dblatex: index sorting rules for nb/nn)
109 https://bugs.debian.org/796871 (dbtoepub: index sorting rules for nb/nn)
110 https://bugs.debian.org/792616 (dblatex: PDF metadata)
111 https://bugs.debian.org/686908 (docbook-xsl: index sorting rules for nb/nn)
112 https://sourceforge.net/tracker/?func=detail&amp;atid=373747&amp;aid=3556630&amp;group_id=21935 (docbook-xsl: nb/nn support)
113 https://bugs.debian.org/684391 (dblatex: initial nb support)
114
115 --&gt;
116
117 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
118 activities, please send Bitcoin donations to my address
119 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
120 </description>
121 </item>
122
123 </channel>
124 </rss>