1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries tagged docbook
</title>
5 <description>Entries tagged docbook
</description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
10 <title>Typesetting DocBook footnotes as endnotes with dblatex
</title>
11 <link>http://people.skolelinux.org/pere/blog/Typesetting_DocBook_footnotes_as_endnotes_with_dblatex.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Typesetting_DocBook_footnotes_as_endnotes_with_dblatex.html
</guid>
13 <pubDate>Thu,
16 Jul
2015 18:
10:
00 +
0200</pubDate>
14 <description><p
>I
'm still working on the Norwegian version of the
15 <a href=
"http://free-culture.cc/
">Free Culture book by Lawrence
16 Lessig
</a
>, and is now working on the final typesetting and layout.
17 One of the features I want to get the structure similar to the
18 original book is to typeset the footnotes as endnotes in the notes
20 <a href=
"https://bugs.debian.org/
685063">feedback from the Debian
21 maintainer and the dblatex developer
</a
>, I came up with this recipe I
22 would like to share with you. The proposal was to create a new LaTeX
23 class file and add the LaTeX code there, but this is not always
24 practical, when I want to be able to replace the class using a make
25 file variable. So my proposal misuses the latex.begindocument XSL
26 parameter value, to get a small fragment into the correct location in
27 the generated LaTeX File.
</p
>
29 <p
>First, decide where in the DocBook document to place the endnotes,
30 and add this text there:
</p
>
33 &lt;?latex \theendnotes ?
&gt;
36 <p
>Next, create a xsl stylesheet file dblatex-endnotes.xsl to add the
37 code needed to add the endnote instructions in the preamble of the
38 generated LaTeX document, with content like this:
</p
>
41 &lt;?xml version=
'1.0'?
&gt;
42 &lt;xsl:stylesheet xmlns:xsl=
"http://www.w3.org/
1999/XSL/Transform
" version=
'1.0'&gt;
43 &lt;xsl:param name=
"latex.begindocument
"&gt;
44 &lt;xsl:text
&gt;
46 \let\footnote=\endnote
47 \def\enoteheading{\mbox{}\par\vskip-\baselineskip }
49 &lt;/xsl:text
&gt;
50 &lt;/xsl:param
&gt;
51 &lt;/xsl:stylesheet
&gt;
54 <p
>Finally, load this xsl file when running dblatex, for example like
58 dblatex --xsl-user=dblatex-endnotes.xsl freeculture.nb.xml
61 <p
>The end result can be seen on github, where
62 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">my
63 book project
</a
> is located.
</p
>
68 <title>Proof reading the Norwegian translation of Free Culture by Lessig
</title>
69 <link>http://people.skolelinux.org/pere/blog/Proof_reading_the_Norwegian_translation_of_Free_Culture_by_Lessig.html
</link>
70 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Proof_reading_the_Norwegian_translation_of_Free_Culture_by_Lessig.html
</guid>
71 <pubDate>Sat,
4 Apr
2015 09:
30:
00 +
0200</pubDate>
72 <description><p
>During eastern I had some time to continue working on the Norwegian
73 <a href=
"http://www.docbook.org/
">docbook
</a
> version of the
2004 book
74 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig.
75 At the moment I am proof reading the finished text, looking for typos,
76 inconsistent wordings and sentences that do not flow as they should.
77 I
'm more than two thirds done with the text, and welcome others to
78 check the text up to chapter
13. The current status is available on the
79 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>
80 project pages. You can also check out the
81 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.pdf?raw=true
">PDF
</a
>,
82 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.epub?raw=true
">EPUB
</a
>
83 and HTML version available in the
84 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/tree/master/archive
">archive
85 directory
</a
>.
</p
>
87 <p
>Please report typos, bugs and improvements to the github project if
88 you find any.
</p
>
93 <title>98.6 percent done with the Norwegian draft translation of Free Culture
</title>
94 <link>http://people.skolelinux.org/pere/blog/
98_6_percent_done_with_the_Norwegian_draft_translation_of_Free_Culture.html
</link>
95 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/
98_6_percent_done_with_the_Norwegian_draft_translation_of_Free_Culture.html
</guid>
96 <pubDate>Wed,
23 Jul
2014 22:
40:
00 +
0200</pubDate>
97 <description><p
>This summer I finally had time to continue working on the Norwegian
98 <a href=
"http://www.docbook.org/
">docbook
</a
> version of the
2004 book
99 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig,
100 to get a Norwegian text explaining the problems with todays copyright
101 law. Yesterday, I finally completed translated the book text. There
102 are still some foot/end notes left to translate, the colophon page
103 need to be rewritten, and a few words and phrases still need to be
104 translated, but the Norwegian text is ready for the first proof
105 reading. :) More spell checking is needed, and several illustrations
106 need to be cleaned up. The work stopped up because I had to give
107 priority to other projects the last year, and the progress graph of
108 the translation show this very well:
</p
>
110 <p
><img width=
"80%
" align=
"center
" src=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/progress.png
"></p
>
112 <p
>If you want to read the result, check out the
113 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>
114 project pages and the
115 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.pdf?raw=true
">PDF
</a
>,
116 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.epub?raw=true
">EPUB
</a
>
117 and HTML version available in the
118 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/tree/master/archive
">archive
119 directory
</a
>.
</p
>
121 <p
>Please report typos, bugs and improvements to the github project if
122 you find any.
</p
>
127 <title>From English wiki to translated PDF and epub via Docbook
</title>
128 <link>http://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html
</link>
129 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html
</guid>
130 <pubDate>Tue,
17 Jun
2014 11:
30:
00 +
0200</pubDate>
131 <description><p
>The
<a href=
"http://www.skolelinux.org/
">Debian Edu / Skolelinux
132 project
</a
> provide an instruction manual for teachers, system
133 administrators and other users that contain useful tips for setting up
134 and maintaining a Debian Edu installation. This text is about how the
135 text processing of this manual is handled in the project.
</p
>
137 <p
>One goal of the project is to provide information in the native
138 language of its users, and for this we need to handle translations.
139 But we also want to make sure each language contain the same
140 information, so for this we need a good way to keep the translations
141 in sync. And we want it to be easy for our users to improve the
142 documentation, avoiding the need to learn special formats or tools to
143 contribute, and the obvious way to do this is to make it possible to
144 edit the documentation using a web browser. We also want it to be
145 easy for translators to keep the translation up to date, and give them
146 help in figuring out what need to be translated. Here is the list of
147 tools and the process we have found trying to reach all these
150 <p
>We maintain the authoritative source of our manual in the
151 <a href=
"https://wiki.debian.org/DebianEdu/Documentation/Wheezy/
">Debian
152 wiki
</a
>, as several wiki pages written in English. It consist of one
153 front page with references to the different chapters, several pages
154 for each chapter, and finally one
"collection page
" gluing all the
155 chapters together into one large web page (aka
156 <a href=
"https://wiki.debian.org/DebianEdu/Documentation/Wheezy/AllInOne
">the
157 AllInOne page
</a
>). The AllInOne page is the one used for further
158 processing and translations. Thanks to the fact that the
159 <a href=
"http://moinmo.in/
">MoinMoin
</a
> installation on
160 wiki.debian.org support exporting pages in
161 <a href=
"http://www.docbook.org/
">the Docbook format
</a
>, we can fetch
162 the list of pages to export using the raw version of the AllInOne
163 page, loop over each of them to generate a Docbook XML version of the
164 manual. This process also download images and transform image
165 references to use the locally downloaded images. The generated
166 Docbook XML files are slightly broken, so some post-processing is done
167 using the
<tt
>documentation/scripts/get_manual
</tt
> program, and the
168 result is a nice Docbook XML file (debian-edu-wheezy-manual.xml) and
169 a handfull of images. The XML file can now be used to generate PDF, HTML
170 and epub versions of the English manual. This is the basic step of
171 our process, making PDF (using dblatex), HTML (using xsltproc) and
172 epub (using dbtoepub) version from Docbook XML, and the resulting files
173 are placed in the debian-edu-doc-en binary package.
</p
>
175 <p
>But English documentation is not enough for us. We want translated
176 documentation too, and we want to make it easy for translators to
177 track the English original. For this we use the
178 <a href=
"http://packages.qa.debian.org/p/poxml.html
">poxml
</a
> package,
179 which allow us to transform the English Docbook XML file into a
180 translation file (a .pot file), usable with the normal gettext based
181 translation tools used by those translating free software. The pot
182 file is used to create and maintain translation files (several .po
183 files), which the translations update with the native language
184 translations of all titles, paragraphs and blocks of text in the
185 original. The next step is combining the original English Docbook XML
186 and the translation file (say debian-edu-wheezy-manual.nb.po), to
187 create a translated Docbook XML file (in this case
188 debian-edu-wheezy-manual.nb.xml). This translated (or partly
189 translated, if the translation is not complete) Docbook XML file can
190 then be used like the original to create a PDF, HTML and epub version
191 of the documentation.
</p
>
193 <p
>The translators use different tools to edit the .po files. We
195 <a href=
"http://www.kde.org/applications/development/lokalize/
">lokalize
</a
>,
196 while some use emacs and vi, others can use web based editors like
197 <a href=
"http://pootle.translatehouse.org/
">Poodle
</a
> or
198 <a href=
"https://www.transifex.com/
">Transifex
</a
>. All we care about
199 is where the .po file end up, in our git repository. Updated
200 translations can either be committed directly to git, or submitted as
201 <a href=
"https://bugs.debian.org/src:debian-edu-doc
">bug reports
202 against the debian-edu-doc package
</a
>.
</p
>
204 <p
>One challenge is images, which both might need to be translated (if
205 they show translated user applications), and are needed in different
206 formats when creating PDF and HTML versions (epub is a HTML version in
207 this regard). For this we transform the original PNG images to the
208 needed density and format during build, and have a way to provide
209 translated images by storing translated versions in
210 images/$LANGUAGECODE/. I am a bit unsure about the details here. The
211 package maintainers know more.
</p
>
213 <p
>If you wonder what the result look like, we provide
214 <a href=
"http://maintainer.skolelinux.org/debian-edu-doc/
">the content
215 of the documentation packages on the web
</a
>. See for example the
216 <a href=
"http://maintainer.skolelinux.org/debian-edu-doc/it/debian-edu-wheezy-manual.pdf
">Italian
217 PDF version
</a
> or the
218 <a href=
"http://maintainer.skolelinux.org/debian-edu-doc/de/debian-edu-wheezy-manual.html
">German
219 HTML version
</a
>. We do not yet build the epub version by default,
220 but perhaps it will be done in the future.
</p
>
222 <p
>To learn more, check out
223 <a href=
"http://packages.qa.debian.org/d/debian-edu-doc.html
">the
224 debian-edu-doc package
</a
>,
225 <a href=
"https://wiki.debian.org/DebianEdu/Documentation/Wheezy/
">the
226 manual on the wiki
</a
> and
227 <a href=
"https://wiki.debian.org/DebianEdu/Documentation/Wheezy/Translations
">the
228 translation instructions
</a
> in the manual.
</p
>
233 <title>90 percent done with the Norwegian draft translation of Free Culture
</title>
234 <link>http://people.skolelinux.org/pere/blog/
90_percent_done_with_the_Norwegian_draft_translation_of_Free_Culture.html
</link>
235 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/
90_percent_done_with_the_Norwegian_draft_translation_of_Free_Culture.html
</guid>
236 <pubDate>Fri,
2 Aug
2013 10:
40:
00 +
0200</pubDate>
237 <description><p
>It has been a while since my last update. Since last summer, I
238 have worked on a Norwegian
239 <a href=
"http://www.docbook.org/
">docbook
</a
> version of the
2004 book
240 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig,
241 to get a Norwegian text explaining the problems with the copyright
242 law. Yesterday, I finally broken the
90% mark, when counting the
243 number of strings to translate. Due to real life constraints, I have
244 not had time to work on it since March, but when the summer broke out,
245 I found time to work on it again. Still lots of work left, but the
246 first draft is nearing completion. I created a graph to show the
247 progress of the translation:
</p
>
249 <p
><img width=
"80%
" align=
"center
" src=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/progress.png
"></p
>
251 <p
>When the first draft is done, the translated text need to be
252 proof read, and the remaining formatting problems with images and SVG
253 drawings need to be fixed. There are probably also some index entries
254 missing that need to be added. This can be done by comparing the
255 index entries listed in the SiSU version of the book, or comparing the
256 English docbook version with the paper version. Last, the colophon
257 page with ISBN numbers etc need to be wrapped up before the release is
258 done. I should also figure out how to get correct Norwegian sorting
259 of the index pages. All docbook tools I have tried so far (xmlto,
260 docbook-xsl, dblatex) get the order of symbols and the special
261 Norwegian letters ÆØÅ wrong.
</p
>
263 <p
>There is still need for translators and people with docbook
264 knowledge, to be able to get a good looking book (I still struggle
265 with dblatex, xmlto and docbook-xsl) as well as to do the draft
266 translation and proof reading. And I would like the figures to be
267 redrawn as SVGs to make it easy to translate them. Any SVG master
268 around? There are also some legal terms that are unfamiliar to me.
269 If you want to help, please get in touch with me, and check out the
270 project files currently available from
271 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
</p
>
273 <p
>If you are curious what the translated book currently look like,
275 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.pdf?raw=true
">PDF
</a
>
277 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.epub?raw=true
">EPUB
</a
>
278 are published on github. The HTML version is published as well, but
279 github hand it out with MIME type text/plain, confusing browsers, so I
280 saw no point in linking to that version.
</p
>
285 <title>EFN nyutgir novellen Kodémus av Tor Åge Bringsværd
</title>
286 <link>http://people.skolelinux.org/pere/blog/EFN_nyutgir_novellen_Kod_mus_av_Tor__ge_Bringsv_rd.html
</link>
287 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/EFN_nyutgir_novellen_Kod_mus_av_Tor__ge_Bringsv_rd.html
</guid>
288 <pubDate>Wed,
27 Mar
2013 09:
50:
00 +
0100</pubDate>
289 <description><p
>For noen dager siden nevnte jeg at vi jobbet med å typesette en
290 novelle med
<a href=
"http://www.docbook.org/
">DocBook
</a
>. I dag ble
291 utgivelsen annonsert med følgende pressemelding fra Elektronisk
292 Forpost Norge), som jeg gjengir i sin helhet:
</p
>
294 <p
><blockquote
>
296 <p
><strong
>EFN nyutgir Kodémus:
</strong
></p
>
298 <p
><strong
>Tor Åge Bringsværd-novelle om IT og overvåkning fra
299 informasjonsteknologiens spedbarndom får nytt liv
</strong
></p
>
301 <p
>Elektronisk Forpost Norge (EFN) er veldig glad for anledningen til
302 å nyutgi Tor Åge Bringsværds novelle Kodémus i digitalt format for nye
303 (og gamle) generasjoner. Novellen ble skrevet så tidlig som vinteren
304 1968, og første gang trykt i novellesamlingen Probok på Gyldendal
307 <p
>Informasjonsteknologi spiller en sentral rolle i Kodémus, og det er
308 spennende å sammenligne beskrivelsen av IT fra
1968 med dagens IT i
309 2013. Forskjellene er mange -- men det er jammen likhetene også. Ikke
310 minst det at idag går jo nesten alle rundt med lillebrødre på seg!
</p
>
312 <p
>"Riktignok er det ikke påbudt å ha mobil,
" sier Thomas Gramstad,
313 leder i EFN.
"Men vi holder på å lage et samfunn der det blir så
314 upraktisk eller tungvint å ikke ha det, at man i praksis ikke slipper
315 unna. Og disse lillebrødrene sladrer hele tiden til staten (og til
316 mange andre) om hvor vi er, hva vi gjør, hva vi bryr oss om, hva vi
317 liker...
"</p
>
319 <p
>Det at Kodémus åpenbart er skrevet i en annen tid med en annen type
320 IT og likevel virker så relevant idag, er i seg selv et hardtslående
323 <p
>Tross sitt IT-tema fantes ikke Kodémus i elektronisk form, og
324 frivillige i EFN har skannet inn, OCR-tolket og korrekturlest
325 novellen, og deretter kodet den i en rekke digitale formater.
</p
>
327 <p
>Forfatteren har gitt tillatelse til publisering av Kodémus under ny
328 lisens, og novellen utgis av EFN med en Creative Commons (CC)
329 fribrukslisens (nærmere bestemt lisensen CC-BY-NC-ND). For leserne
330 eller brukerne innebærer dette at de får en klar og standardisert
331 beskjed om hvilke rettigheter de har til å dele novellen videre med
332 andre. For forfatteren innebærer dette økt synlighet og
333 tilgjengelighet for verket, slik at det ikke blir glemt, da
334 søkemotorer og nettlesere inneholder egne søkevalg for CC-lisenser, og
335 mange brukere søker etter verk som de vet de kan dele og bruke på
336 lovlig vis.
</p
>
338 <p
>EFN oppfordrer andre forfattere om å gi ut sine gamle tekster med
339 en fribrukslisens, slik at tekstene ikke blir glemt og for å stimulere
340 lovlig deling på nettet. EFN kan være behjelpelig med digitalisering
341 og utlegging på nett, i den grad det finnes kapasitet blant EFNs
342 medlemmer til dette. Vi mener at nyutgivelser av tekster under frie
343 lisenser kan øke interessen rundt forfatterskapet, og vil gjerne bidra
346 <p
>EFN utgir og deler med dette en novelle fra den digitale
347 informasjonsteknologiens tidligste barndom. En novelle som fortsatt er
348 full av vitalitet og aktualitet, og som derfor kan bidra til, og gi
349 ettertanke i dagens debatter om IT, personvern, overvåkning og
350 individets frihet og integritet.
</p
>
352 <p
>Du finner novellen her:
353 <br
><a href=
"http://efn.no/kodemus/
">http://efn.no/kodemus/
</a
></p
>
355 <p
>i flere forskjellige formater, for ulike plattformer. Per idag
356 finnes novellen i disse formatene: EPUB, MOBI, XML, HTML, PDF og
357 txt. Det kan bli flere formater senere, og evt. frivillige
358 bidragsytere til dette er velkommen.
</p
>
360 <p
>Kontaktperson for denne pressemeldingen,
</p
>
362 <p
>Thomas Gramstad
363 <br
>thomas@efn.no
364 <br
>4817 6875</p
>
368 <p
>EFN arbeider for dine borgerrettigheter i IT-samfunnet, for
369 nettverks- og delingskultur, personvern og frihet fra overvåkning,
370 åpne standarder, brukerstyrt programvare, retten til å kopiere, og
371 styrking av det digitale sivilsamfunnet m.m.
372 <br
><a href=
"http://efn.no/
">www.efn.no
</a
></p
>
374 </blockquote
></p
>
376 <p
>Jeg håper flere forfattere ser verdien av å gjøre kulturen
377 tilgjengelig for flere, og slår følge med Hr. Bringsværd i å gi ut
378 sine verker med bruksvilkår med færre bruksbegrensinger enn
379 opphavsretten legger opp til. Selv om jeg gjerne skulle sett at han
380 hadde brukt en Creative Commons-lisens som tillot avledede verker og
381 kommersiell bruk.
</p
>
386 <title>Typesetting a short story using docbook for PDF, HTML and EPUB
</title>
387 <link>http://people.skolelinux.org/pere/blog/Typesetting_a_short_story_using_docbook_for_PDF__HTML_and_EPUB.html
</link>
388 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Typesetting_a_short_story_using_docbook_for_PDF__HTML_and_EPUB.html
</guid>
389 <pubDate>Sun,
24 Mar
2013 17:
30:
00 +
0100</pubDate>
390 <description><p
>A few days ago, during a discussion in
391 <a href=
"http://www.efn.no/
">EFN
</a
> about interesting books to read
392 about copyright and the data retention directive, a suggestion to read
393 the
1968 short story Kodémus by
394 <a href=
"http://web2.gyldendal.no/toraage/
">Tore Åge Bringsværd
</a
>
395 came up. The text was only available in old paper books, and thus not
396 easily available for current and future generations. Some of the
397 people participating in the discussion contacted the author, and
398 reported back
2013-
03-
19 that the author was OK with releasing the
399 short story using a
<a href=
"http://www.creativecommons.org/
">Creative
400 Commons
</a
> license. The text was quickly scanned and OCR-ed, and we
401 were ready to start on the editing and typesetting.
</p
>
403 <p
>As I already had some experience formatting text in my project to
404 provide a Norwegian version of the Free Culture book by Lawrence
405 Lessig, I chipped in and set up a
406 <a href=
"http://www.docbook.org/
">DocBook
</a
> processing framework to
407 generate PDF, HTML and EPUB version of the short story. The tools to
408 transform DocBook to different formats are already in my Linux
409 distribution of choice,
<a href=
"http://www.debian.org/
">Debian
</a
>, so
410 all I had to do was to use the
411 <a href=
"http://dblatex.sourceforge.net/
">dblatex
</a
>,
412 <a href=
"http://docbook.sourceforge.net/release/xsl/current/epub/README
">dbtoepub
</a
>
413 and
<a href=
"https://fedorahosted.org/xmlto/
">xmlto
</a
> tools to do the
414 conversion. After a few days, we decided to replace dblatex with
416 <a href=
"http://wiki.docbook.org/DocBookXslStylesheets
">docbook-xsl
</a
>),
417 to get the copyright information to show up in the PDF and to get a
418 nicer
&lt;variablelist
&gt; typesetting, but that is just a minor
419 technical detail.
</p
>
421 <p
>There were a few challenges, of course. We want to typeset the
422 short story to look like the original, and that require fairly good
423 control over the layout. The original short story have three
424 parts/scenes separated by a single horizontally centred star (*), and
425 the paragraphs do not contain only flowing text, but dialogs and text
426 that started on a new line in the middle of the paragraph.
</p
>
428 <p
>I initially solved the first challenge by using a paragraph with a
429 single star in it, ie
&lt;para
&gt;*
&lt;/para
&gt;, but it made sure a
430 placeholder indicated where the scene shifted. This did not look too
431 good without the centring. The next approach was to create a new
432 preprocessor directive
&lt;?newscene?
&gt;, mapping to
"&lt;hr/
&gt;
"
433 for HTML and
"&lt;fo:block text-align=
"center
"&gt;
&lt;fo:leader
434 leader-pattern=
"rule
" rule-thickness=
"0.5pt
"/
&gt;
&lt;/fo:block
&gt;
"
435 for FO/PDF output (did not try to implement this in dblatex, as we had
436 switched at this time). The HTML XSL file looked like this:
</p
>
438 <p
><blockquote
><pre
>
439 &lt;?xml version=
'1.0'?
&gt;
440 &lt;xsl:stylesheet xmlns:xsl=
"http://www.w3.org/
1999/XSL/Transform
" version=
'1.0'&gt;
441 &lt;xsl:template match=
"processing-instruction(
'newscene
')
"&gt;
443 &lt;/xsl:template
&gt;
444 &lt;/xsl:stylesheet
&gt;
445 </pre
></blockquote
></p
>
447 <p
>And the FO/PDF XSL file looked like this:
</p
>
449 <p
><blockquote
><pre
>
450 &lt;?xml version=
'1.0'?
&gt;
451 &lt;xsl:stylesheet xmlns:xsl=
"http://www.w3.org/
1999/XSL/Transform
" version=
'1.0'&gt;
452 &lt;xsl:template match=
"processing-instruction(
'newscene
')
"&gt;
453 &lt;fo:block text-align=
"center
"&gt;
454 &lt;fo:leader leader-pattern=
"rule
" rule-thickness=
"0.5pt
"/
&gt;
455 &lt;/fo:block
&gt;
456 &lt;/xsl:template
&gt;
457 &lt;/xsl:stylesheet
&gt;
458 </pre
></blockquote
></p
>
460 <p
>Finally, I came across the
&lt;bridgehead
&gt; tag, which seem to be
461 a good fit for the task at hand, and I replaced
&lt;?newscene?
&gt;
462 with
&lt;bridgehead
&gt;*
&lt;/bridgehead
&gt;. It isn
't centred, but we
463 can fix it with some XSL rule if the current visual layout isn
't
466 <p
>I did not find a good DocBook compliant way to solve the
467 linebreak/paragraph challenge, so I ended up creating a new processor
468 directive
&lt;?linebreak?
&gt;, mapping to
&lt;br/
&gt; in HTML, and
469 &lt;fo:block/
&gt; in FO/PDF. I suspect there are better ways to do
470 this, and welcome ideas and patches on github. The HTML XSL file now
471 look like this:
</p
>
473 <p
><blockquote
><pre
>
474 &lt;?xml version=
'1.0'?
&gt;
475 &lt;xsl:stylesheet xmlns:xsl=
"http://www.w3.org/
1999/XSL/Transform
" version=
'1.0'&gt;
476 &lt;xsl:template match=
"processing-instruction(
'linebreak)
"&gt;
478 &lt;/xsl:template
&gt;
479 &lt;/xsl:stylesheet
&gt;
480 </pre
></blockquote
></p
>
482 <p
>And the FO/PDF XSL file looked like this:
</p
>
484 <p
><blockquote
><pre
>
485 &lt;?xml version=
'1.0'?
&gt;
486 &lt;xsl:stylesheet xmlns:xsl=
"http://www.w3.org/
1999/XSL/Transform
" version=
'1.0'
487 xmlns:fo=
"http://www.w3.org/
1999/XSL/Format
"&gt;
488 &lt;xsl:template match=
"processing-instruction(
'linebreak)
"&gt;
489 &lt;fo:block/
&gt;
490 &lt;/xsl:template
&gt;
491 &lt;/xsl:stylesheet
&gt;
492 </pre
></blockquote
></p
>
494 <p
>One unsolved challenge is our wish to expose different ISBN numbers
495 per publication format, while keeping all of them in some conditional
496 structure in the DocBook source. No idea how to do this, so we ended
497 up listing all the ISBN numbers next to their format in the colophon
500 <p
>If you want to check out the finished result, check out the
501 <a href=
"https://github.com/sickel/kodemus
">source repository at
503 (
<a href=
"https://github.com/EFN/kodemus
">future/new/official
504 repository
</a
>). We expect it to be ready and announced in a few
510 <title>Seventy percent done with Norwegian docbook version of Free Culture
</title>
511 <link>http://people.skolelinux.org/pere/blog/Seventy_percent_done_with_Norwegian_docbook_version_of_Free_Culture.html
</link>
512 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Seventy_percent_done_with_Norwegian_docbook_version_of_Free_Culture.html
</guid>
513 <pubDate>Sun,
23 Sep
2012 09:
30:
00 +
0200</pubDate>
514 <description><p
>Since this summer, I have worked in my spare time on a Norwegian
<a
515 href=
"http://www.docbook.org/
">docbook
</a
> version of the
2004 book
<a
516 href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig.
517 The reason is that this book is a great primer on what problems exist
518 in the current copyright laws, and I want it to be available also for
519 those that are reluctant do read an English book.
522 <a href=
"http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
">called
523 for volunteers
</a
> to help me, but too few have volunteered so far,
524 and progress is a bit slow. Anyway, today I broken the
70 percent
525 mark for the first rough translation. At the moment, less than
700
526 strings (paragraphs, index terms, titles) are left to translate. With
527 my current progress of
10-
20 strings per day, it will take a while to
528 complete the translation. This graph show the updated progress:
</p
>
530 <img width=
"80%
" align=
"center
" src=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/progress.png
">
532 <p
>Progress have slowed down lately due to family and work
533 commitments. If you want to help, please get in touch, and check out
534 the project files currently available from
535 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
</p
>
537 <p
>If you are curious what the translated book currently look like,
539 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.pdf?raw=true
">PDF
</a
>
541 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.epub?raw=true
">EPUB
</a
>
542 are published on github. The HTML version is published as well, but
543 github hand it out with MIME type text/plain, confusing browsers, so I
544 saw no point in linking to that version.
</p
>
549 <title>Half way there with translated docbook version of Free Culture
</title>
550 <link>http://people.skolelinux.org/pere/blog/Half_way_there_with_translated_docbook_version_of_Free_Culture.html
</link>
551 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Half_way_there_with_translated_docbook_version_of_Free_Culture.html
</guid>
552 <pubDate>Fri,
17 Aug
2012 21:
50:
00 +
0200</pubDate>
553 <description><p
>In my spare time, I currently work on a Norwegian
554 <a href=
"http://www.docbook.org/
">docbook
</a
> version of the
2004 book
555 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig,
556 to get a Norwegian text explaining the problems with the copyright law
557 I can give to my parents and others that are reluctant to read an
558 English book. It is a marvellous set of examples on how the ever
559 expanding copyright regulations hurt culture and society. When the
560 translation is done, I hope to find funding to print and ship a copy
561 to all the members of the Norwegian parliament, before they sit down
562 to debate the latest revisions to the Norwegian copyright law. This
564 <a href=
"http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
">called
565 for volunteers
</a
> to help me, and I have been able to secure the
566 valuable contribution from at least one other Norwegian.
</p
>
568 <p
>Two days ago, we finally broke the
50% mark. Then more than
50% of
569 the number of strings to translate (normally paragraphs, but also
570 titles and index entries are also counted). All parts from the
571 beginning up to and including chapter four is translated. So is
572 chapters six, seven and the conclusion. I created a graph to show the
575 <img width=
"80%
" align=
"center
" src=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/progress.png
">
577 <p
>The number of strings to translate increase as I insert the index
578 entries into the docbook. They were missing with the docbook version
579 I initially started with. There are still quite a few index entries
580 missing, but everyone starting with A, B, O, Z and Y are done. I
581 currently focus on completing the index entries, to get a complete
582 english version of the docbook source.
</p
>
584 <p
>There is still need for translators and people with docbook
585 knowledge, to be able to get a good looking book (I still struggle
586 with dblatex, xmlto and docbook-xsl) as well as to do the draft
587 translation and proof reading. And I would like the figures to be
588 redrawn as SVGs to make it easy to translate them. Any SVG master
589 around? I am sure there are some legal terms that are unfamiliar to
590 me. If you want to help, please get in touch, and check out the
591 project files currently available from
<a
592 href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
</p
>
594 <p
>If you are curious what the translated book currently look like,
596 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.pdf?raw=true
">PDF
</a
>
598 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/blob/master/archive/freeculture.nb.epub?raw=true
">EPUB
</a
>
599 are published on github. The HTML version is published as well, but
600 github hand it out with MIME type text/plain, confusing browsers, so I
601 saw no point in linking to that version.
</p
>
606 <title>Notes on language codes for Norwegian docbook processing...
</title>
607 <link>http://people.skolelinux.org/pere/blog/Notes_on_language_codes_for_Norwegian_docbook_processing___.html
</link>
608 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Notes_on_language_codes_for_Norwegian_docbook_processing___.html
</guid>
609 <pubDate>Fri,
10 Aug
2012 21:
00:
00 +
0200</pubDate>
610 <description><p
>In
<a href=
"http://www.docbook.org/
">docbook
</a
> one can specify
611 the language used at the top, and the processing pipeline will use
612 this information to pick the correct translations for
'chapter
',
'see
613 also
',
'index
' etc. And for most languages used with docbook, I guess
614 this work just fine. For example a German user can start the document
615 with
&lt;book lang=
"de
"&gt;, and the document will show up with the
616 correct content with any of the docbook processors. This is not the
617 case for the language
618 <a href=
"http://people.skolelinux.org/pere/blog/Free_Culture_in_Norwegian___5_chapters_done__74_percent_left_to_do.html
">I
619 am working with at the moment
</a
>, Norwegian Bokmål.
</p
>
621 <p
>For a while, I was confused about which language code to use,
622 because I was unable to find any language code that would work across
623 all tools. I am currently testing dblatex, xmlto, docbook-xsl, and
624 dbtoepub, and they do not handle Norwegian Bokmål the same way. Some
625 of them do not handle it at all.
</p
>
627 <p
>A bit of background information is probably needed to understand
628 this mess. Norwegian is not one, but two written variants. The
629 variants are Norwegian Nynorsk and Norwegian Bokmål. There are three
630 two letter language codes associated with these languages, Norwegian
631 is
'no
', Norwegian Nynorsk is
'nn
' and Norwegian Bokmål is
'nb
'.
632 Historically the
'no
' language code was used for Norwegian Bokmål, but
633 many years ago this was found to be å bad idea, and the recommendation
634 is to use the most specific language code instead, to avoid confusion.
635 In the transition period it is a good idea to make sure
'no
' was an
636 alias for
'nb
'.
</p
>
638 <p
>Back to docbook processing tools in Debian. The dblatex tool only
639 understand
'nn
'. There are translations for
'no
', but not
'nb
' (BTS
640 <a href=
"http://bugs.debian.org/
684391">#
684391</a
>), but due to a bug
641 (BTS
<a href=
"http://bugs.debian.org/
682936">#
682936</a
>) the
'no
'
642 language code is not recognised. The docbook-xsl tool chain only
643 recognise
'nn
' and
'nb
', but not
'no
'. The xmlto tool only recognise
644 'nn
' and
'nb
', but not
'no
'. The end result that there is no language
645 code I can use to get the docbook file working with all of these tools
646 at the same time. :(
</p
>
648 <p
>The correct solution is to use
&lt;book lang=
"nb
"&gt;, but it will
649 take time before that will work with all the free software docbook
650 processors. :(
</p
>
652 <p
>Oh, the joy of well integrated tools. :/
</p
>
657 <title>Best way to create a docbook book?
</title>
658 <link>http://people.skolelinux.org/pere/blog/Best_way_to_create_a_docbook_book_.html
</link>
659 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Best_way_to_create_a_docbook_book_.html
</guid>
660 <pubDate>Tue,
31 Jul
2012 22:
00:
00 +
0200</pubDate>
661 <description><p
>I tried to send this text to the
662 <a href=
"https://lists.oasis-open.org/archives/docbook-apps/
">docbook-apps
663 mailing list at lists.oasis-open.org
</a
>, but it only accept messages
664 from subscribers and rejected my post, and I completely lack the
665 bandwidth required to subscribe to another mailing list, so instead I
666 try to post my message here and hope my blog readers can help me
669 <p
>I am quite new to docbook processing, and am climbing a steep
670 learning curve at the moment.
</p
>
672 <p
>To give you some background, I am working on a Norwegian
673 translation of the book Free Culture by Lawrence Lessig, and I use
674 docbook to handle the process. The files to build the book are
676 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
677 The book got around
400 pages with parts, images, footnotes, tables,
678 index entries etc, which has proven to be a challenge for the free
679 software docbook processors. My build platform is Debian GNU/Linux
682 <p
>I want to build PDF, EPUB and HTML version of the book, and have
683 tried different tool chains to do the conversion from docbook to these
684 formats. I am currently focusing on the PDF version, and have a few
689 <li
>Using dblatex, the
&lt;part
&gt; handling is not the way I want to,
690 as
&lt;/part
&gt; do not really end the
&lt;part
&gt;. (See
691 <a href=
"http://bugs.debian.org/
683166">BTS report #
683166</a
>), the
692 xetex backend (needed to process UTF-
8) give incorrect hyphens in
693 index references spanning several pages (See
694 <a href=
"http://bugs.debian.org/
682901">BTS report #
682901</a
>), and
695 I am unable to get the norwegian template texts (See
696 <a href=
"http://bugs.debian.org/
682936">BTS report #
682936</a
>).
</li
>
698 <li
>Using straight xmlto fail with some latex error (See
699 <a href=
"http://bugs.debian.org/
683163">BTS report
700 #
683163</a
>).
</li
>
702 <li
>Using xmlto with the fop backend fail to handle images (do not
703 show up in the PDF), fail to handle a long footnote (overlap
704 footnote and text body, see
705 <a href=
"http://bugs.debian.org/
683197">BTS report #
683197</a
>), and
706 fail to create a correct index (some lack page ref, and the page
707 refs listed are not right).
</li
>
709 <li
>Using xmlto with the dblatex backend behave like dblatex.
</li
>
711 <li
>Using docbook-xls with xsltproc + fop have the same footnote and
712 index problems the xmlto + fop processing.
</li
>
716 <p
>So I wonder, what would be the best way to create the PDF version
717 of this book? Are some of the bugs found above solved in new or
718 experimental versions of some docbook tool chain?
</p
>
720 <p
>What about HTML and EPUB versions?
</p
>
725 <title>Free Culture in Norwegian -
5 chapters done,
74 percent left to do
</title>
726 <link>http://people.skolelinux.org/pere/blog/Free_Culture_in_Norwegian___5_chapters_done__74_percent_left_to_do.html
</link>
727 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Free_Culture_in_Norwegian___5_chapters_done__74_percent_left_to_do.html
</guid>
728 <pubDate>Sat,
21 Jul
2012 20:
00:
00 +
0200</pubDate>
729 <description><p
>I reported earlier that I am working on
730 <a href=
"http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
">a
731 norwegian version
</a
> of the book
732 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig.
733 Progress is good, and yesterday I got a major contribution from Anders
734 Hagen Jarmund completing chapter six. The source files as well as a
735 PDF and EPUB version of this book are available from
736 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
</p
>
738 <p
>I am happy to report that the draft for the first two chapters
739 (preface, introduction) is complete, and three other chapters are also
740 completely translated. This completes
26 percent of the number of
741 strings (equivalent to paragraphs) in the book, and there is thus
74
742 percent left to translate. A graph of the progress is present at the
743 bottom of the github project page. There is still room for more
744 contributors. Get in touch or send github pull requests with fixes if
745 you got time and are willing to help make this book make it to
748 <p
>The book translation framework could also be a good basis for other
749 translations, if you want the book to be available in your
755 <title>Call for help from docbook expert to tag Free Culture by Lawrence Lessig
</title>
756 <link>http://people.skolelinux.org/pere/blog/Call_for_help_from_docbook_expert_to_tag_Free_Culture_by_Lawrence_Lessig.html
</link>
757 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Call_for_help_from_docbook_expert_to_tag_Free_Culture_by_Lawrence_Lessig.html
</guid>
758 <pubDate>Mon,
16 Jul
2012 22:
50:
00 +
0200</pubDate>
759 <description><p
>I am currently working on a
760 <a href=
"http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
">project
761 to translate
</a
> the book
762 <a href=
"http://free-culture.cc/
">Free Culture
</a
> by Lawrence Lessig
763 to Norwegian. And the source we base our translation on is the
764 <a href=
"http://en.wikipedia.org/wiki/DocBook
">docbook
</a
> version, to
765 allow us to use po4a and .po files to handle the translation, and for
766 this to work well the docbook source document need to be properly
767 tagged. The source files of this project is available from
768 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">github
</a
>.
</p
>
770 <p
>The problem is that the docbook source have flaws, and we have
771 no-one involved in the project that is a docbook expert. Is there a
772 docbook expert somewhere that is interested in helping us create a
773 well tagged docbook version of the book, and adjust our build process
774 for the PDF, EPUB and HTML version of the book? This will provide a
775 well tagged English version (our source document), and make it a lot
776 easier for us to create a good Norwegian version. If you can and want
777 to help, please get in touch with me or fork the github project and
778 send pull requests with fixes. :)
</p
>
783 <title>Dugnad for å sende norsk versjon av Free Culture til stortingets representanter!
</title>
784 <link>http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
</link>
785 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Dugnad_for___sende_norsk_versjon_av_Free_Culture_til_stortingets_representanter_.html
</guid>
786 <pubDate>Wed,
11 Jul
2012 09:
00:
00 +
0200</pubDate>
787 <description><p
>Da opphavsrettsloven ble revidert i forrige runde rundt
2005, var
788 det skummelt å se hvor lite stortingsrepresentantene forsto hvordan
789 Internet påvirket folks forhold til kulturuttrykk, og min venn Vidar
790 og jeg spekulert på at det hadde kanskje vært fornuftig om samtlige
791 representanter fikk en norsk utgave av boken
792 <a href=
"http://free-culture.cc/
">Free Culture
</a
> av Lawrence Lessig
793 som forklarte litt om problemstillingene. Vi endte opp med å
794 prioritere utvikling i
795 <a href=
"http://www.skolelinux.org/
">Skolelinux
</a
>-prosjektet i
796 stedet, så den oversatte boken så aldri dagens lys. Men i forrige uke
797 ble jeg inspirert til å ta opp tråden og se om det er mulig å få til
798 bokprosjektet denne gang, da det er tydelig at kulturdepartementet i
799 sitt nye forsøk på å gjøre opphavsrettsloven enda mer ubalansert til
800 fordel for forlag og store mediehus fortsatt trenger en annen vinkling
801 i debatten.
</p
>
803 <p
>Planen min er å oversette boka på dugnad, sette den opp for
804 trykking med en av de mange
805 <a href=
"http://no.wikipedia.org/wiki/Trykk_på_forespørsel
">trykk på
806 forespørsel
</a
>-tjenestene, skaffe sponsor til å finansiere trykking
807 til stortingsrepresentantene og alle som har bidratt med
808 oversettelser. Kanskje vi også kan få en avtale med et forlag om
809 publisering når boka er ferdig? Kommentarene til
810 <a href=
"http://newth.net/eirik/
2011/
04/
01/e-selvpublisering/
">Eirik
812 <a href=
"http://www.espen.com/norskblogg/archives/
2008/
09/erfaringer_med_publishing_on_demand.html
">Espen
813 Andersen
</a
> om erfaringene med selvpublisering og trykk på
814 forespørsel er interessante og ikke avskrekkende, og jeg mistenker at
815 <a href=
"http://www.lulu.com/
">Lulu
</a
> er en grei leverandør av
816 trykketjenester til prosjektet.
</p
>
818 <p
>Jeg har satt opp
819 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig
">et
820 Github-prosjekt
</a
> for a lage boken, basert på Docbook-utgaven jeg
821 fant fra Hans Schou. Skolelinux har hatt byggesystem for å lage
822 oversatt HTML og PDF-utgave av Docbook-bøker i en årrekke, så jeg har
823 kopiert og utvidet dette oppsettet. Originalteksten er i Docbook, og
824 oversettelsen gjøres i .po-filer med hjelp av vanlige
825 oversetterverktøy brukt i fri programvareverden. Dernest tar
826 byggesystemet over og lager PDF og EPUB-utgave av den oversatte
827 teksten. Resultatet kan ses i Github-prosjektet. For å komme raskt
828 igang har jeg brukt maskinoversettelse av alle tekstbitene fra engelsk
829 til norsk, noe som grovoversatte ca.
1300 av de ca.
1700 tekstbitene
830 boken består av. Jeg håper nå at flere kan bidra med å få
831 oversettelsen på plass, slik at teksten kan være klar i løpet av
832 høsten. Når alt er oversatt må teksten gjennomgås for feil og
833 konsistent språk. Totalt er det nok mange timer som trengs for å
834 gjennomføre oversettelsen.
</p
>
836 <p
>Økonomien i dette er ikke avskrekkende.
169
837 stortingsrepresentanter og nesten like mange varamedlemmer bør få
838 bøker, og estimert produduksjonskostnad for hver bok er rundt
6 EURO i
839 følge et raskt estimat fra Lulu. Jeg vet ennå ikke hvor mange sider
840 det blir i størrelsen
5,
5" x
8.5" (det er ca.
140 sider i A4-format),
841 så jeg gjettet på
400 sider. Jeg tror originalutgaven har nesten
400
842 sider. For
169*
2 eksemplarer snakker vi om en trykkekostnad på
843 ca.
2000 EURO, dvs. ca
15 000 NOK. Det burde være mulig å finne en
844 sponsor for å dekke en slik sum. I tillegg kommer distribusjon og
845 porto, som antagelig kommer på like mye.
</p
>
847 <p
>Kan du bidra med oversettelse og docbook-typesetting? Ta kontakt
848 og send patcher i github. Jeg legger gjerne inn folk i prosjektet
849 slik at du kan oppdatere direkte.
</p
>