1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" dir=
"ltr">
5 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen
</title>
7 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel=
"alternate" title=
"RSS Feed" href=
"http://people.skolelinux.org/pere/blog/index.rss" type=
"application/rss+xml" />
14 <a href=
"http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen
</a>
23 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/EU_domstolen_konkluderer_motsatt_av_Skatteetaten_n_r_det_gjelder_Bitcoin.html">EU-domstolen konkluderer motsatt av Skatteetaten når det gjelder Bitcoin
</a></div>
24 <div class=
"date">22nd October
2015</div>
25 <div class=
"body"><p>Bitcoin er i litt vinden i Norge for tiden, med
26 <a href=
"http://www.nrk.no/ytring/en-digital-robin-hood-1.12604681">kronikk
27 om bitcoin-overføringer på tvers av landegrensene
</A> hos NRK Ytring
29 <a href=
"https://tv.nrk.no/program/KOID25009815/kapital-bitcoin-en-digital-pengebinge">dokumentar
30 om bitcoin
</a> på NRK
2 i forgårs og i går. I den sammenhengen er det
31 spesielt hyggelig med en gladnyhet fra EU om Bitcoin.
</p>
33 <p>I dag konkluderte EU-domstolen at
34 <a href=
"http://curia.europa.eu/juris/document/document.jsf?text=&docid=170305&pageIndex=0&doclang=en&mode=req&dir=&occ=first&part=1&cid=604079">Bitcoin-kjøp
35 fra Bitcoin-børser ikke er MVA-pliktig
</a> (sak C‑
264/
14). Fant
36 <a href=
"http://www.reuters.com/article/2015/10/22/us-bitcoin-tax-eu-idUSKCN0SG0X920151022">nyheten
37 først hos Reuters
</a>, etter tips fra innehaveren av
38 <a href=
"http://www.bitmynt.no/">Bitmynt
</a>. EU-domstolens avgjørelse
40 <a href=
"http://www.skatteetaten.no/no/Radgiver/Rettskilder/Uttalelser/Prinsipputtalelser/Bruk-av-bitcoins--skatte--og-avgiftsmessige-konsekvenser/">annonseringen
41 fra Skatteetaten i
2013</a>, der de konkluderte med at bitcoin er et
42 «formuesobjekter» som det skulle betales mva på ved kjøp og salg.
43 Dermed la Skatteetaten opp til dobbel MVA-betaling hvis en kjøpte noe
44 med Bitcoin fra Norge (først mva på kjøp av Bitcoin, deretter mva på
45 det en kjøper med Bitcoin). Jeg lurer på om denne avgjørelsen får
46 Skatteetaten til å bytte mening. Gleder meg til fortsettelsen.
</p>
51 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk
</a>.
56 <div class=
"padding"></div>
59 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Lawrence_Lessig_interviewed_Edward_Snowden_a_year_ago.html">Lawrence Lessig interviewed Edward Snowden a year ago
</a></div>
60 <div class=
"date">19th October
2015</div>
61 <div class=
"body"><p>Last year,
<a href=
"https://lessig2016.us/">US president candidate
62 in the Democratic Party
</a> Lawrence interviewed Edward Snowden. The
63 one hour interview was
64 <a href=
"https://www.youtube.com/watch?v=o_Sr96TFQQE">published by
65 Harvard Law School
2014-
10-
23 on Youtube
</a>, and the meeting took
68 <p>The questions are very good, and there is lots of useful
69 information to be learned and very interesting issues to think about
70 being raised. Please check it out.
</p>
72 <iframe width=
"560" height=
"315" src=
"https://www.youtube.com/embed/o_Sr96TFQQE" frameborder=
"0" allowfullscreen
></iframe>
74 <p>I find it especially interesting to hear again that Snowden did try
75 to bring up his reservations through the official channels without any
76 luck. It is in sharp contrast to the answers made
2013-
11-
06 by the
77 Norwegian prime minister Erna Solberg to the Norwegian Parliament,
78 <a href=
"https://tale.holderdeord.no/speeches/s131106/68">claiming
79 Snowden is no Whistle-Blower
</a> because he should have taken up his
80 concerns internally and using official channels. It make me sad
81 that this is the political leadership we have here in Norway.
</p>
86 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance
</a>.
91 <div class=
"padding"></div>
94 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/The_Story_of_Aaron_Swartz___Let_us_all_weep_.html">The Story of Aaron Swartz - Let us all weep!
</a></div>
95 <div class=
"date"> 8th October
2015</div>
96 <div class=
"body"><p>The movie "
<a href=
"http://www.takepart.com/internets-own-boy">The
97 Internet's Own Boy: The Story of Aaron Swartz
</a>" is both inspiring
98 and depressing at the same time. The work of Aaron Swartz has
99 inspired me in my work, and I am grateful of all the improvements he
100 was able to initiate or complete. I wish I am able to do as much good
101 in my life as he did in his. Every minute of this 1:45 long movie is
102 inspiring in documenting how much impact a single person can have on
103 improving the society and this world. And it is depressing in
104 documenting how the law enforcement of USA (and other countries) is
105 corrupted to a point where they can push a bright kid to his death for
106 downloading too many scientific articles. Aaron is dead. Let us all
109 <p>The movie is also available on
110 <a href="https://www.youtube.com/watch?v=vXr-
2hwTk58
">Youtube</a>. I
111 wish there were Norwegian subtitles available, so I could show it to
117 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english
">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett
">opphavsrett</a>.
122 <div class="padding
"></div>
125 <div class="title
"><a href="http://people.skolelinux.org/pere/blog/Alle_Stortingets_mobiltelefoner_kontrolleres_fra_USA___.html
">Alle Stortingets mobiltelefoner kontrolleres fra USA...</a></div>
126 <div class="date
"> 7th October 2015</div>
127 <div class="body
"><p>Jeg lot meg fascinere av
128 <a href="http://www.aftenposten.no/nyheter/iriks/politikk/Stortinget-har-tilgang-til-a-fjernstyre-
600-mobiler-
8192692.html
">en
129 artikkel i Aftenposten</a> der det fortelles at «over 600 telefoner som
130 benyttes av stortingsrepresentanter, rådgivere og ansatte på
131 Stortinget, kan «fjernstyres» ved hjelp av
132 <a href="https://play.google.com/store/apps/details?id=com.airwatch.androidagent
">programvaren
133 Airwatch</a>, et såkalte MDM-program (Mobile Device Managment)». Det
134 hele bagatelliseres av Stortingets IT-stab, men det er i hovedsak på
135 grunn av at journalisten ikke stiller de relevante spørsmålene. For
136 meg er det relevante spørsmålet hvem som har lovlig tilgang (i henhold
137 til lokal lovgiving, dvs. i hvert fall i Norge, Sverige, UK og USA)
138 til informasjon om og på telefonene, og hvor enkelt det er å skaffe
139 seg tilgang til hvor mobilene befinner seg og informasjon som befinner
140 seg på telefonene ved hjelp av utro tjenere, trusler, innbrudd og
141 andre ulovlige metoder.</p>
143 <p>Bruken av AirWatch betyr i realiteten at USAs etteretning og
144 politimyndigheter har full tilgang til stortingets mobiltelefoner,
145 inkludert posisjon og innhold, takket være
146 <a href="https://en.wikipedia.org/wiki/Foreign_Intelligence_Surveillance_Act_of_1978_Amendments_Act_of_2008
">FISAAA-loven</a>
148 "<a href=
"https://en.wikipedia.org/wiki/National_security_letter">National
149 Security Letters
</a>" og det enkle faktum at selskapet
150 <a href="http://www.airwatch.com/
">AirWatch</a> er kontrollert av et
151 selskap i USA. I tillegg er det kjent at flere lands
152 etterretningstjenester kan lytte på trafikken når den passerer
155 <p>Jeg har bedt om mer informasjon
156 <a href="https://www.mimesbronn.no/request/saksnummer_for_saker_anganede_br
">fra
157 Stortinget om bruken av AirWatch</a> via Mimes brønn så får vi se hva
158 de har å fortelle om saken. Fant ingenting om 'airwatch' i
159 postjournalen til Stortinget, så jeg trenger hjelp før jeg kan be om
160 innsyn i konkrete dokumenter.</p>
162 <p>Oppdatering 2015-10-07: Jeg er blitt spurt hvorfor jeg antar at
163 AirWatch-agenten rapporterer til USA og ikke direkte til Stortingets
164 egen infrastruktur. Det stemmer at det er teknisk mulig å sette
165 opp mobiltelefonene til å rapportere til datamaskiner som eies av
166 Stortinget. Jeg antar det rapporteres til AirWatch sine sentrale
167 tjenester basert på det jeg leste fra beskrivelsen av
168 <a href="http://www.airwatch.com/solutions/mobile-device-management/
">Mobile
169 Device Management</A> på AirWatch sine egne nettsider, koblet med at
170 det brukes en standard app som kan hentes fra "app-butikkene" for å få
171 tilgang. Enten må app-en settes opp individuelt hos Stortinget, eller
172 så får den beskjed fra AirWatch i USA om hvor den skal koble seg opp.
173 I det første tilfellet vil den ikke rapportere direkte til USA, men
174 til programvare utviklet av AirWatch som kjører på en maskin under
175 Stortingets kontroll. Det er litt bedre, men fortsatt vil det være
176 umulig for Stortinget å være sikker på hva programvaren som tar imot
177 forbindelser gjør. Jeg ser fra beskrivelsen av
178 <a href=
"http://www.airwatch.com/differentiators/enterprise-integration/">Enterprice
179 Integration
</a> hos AirWatch at det er mulig å ha lokal installasjon,
180 og håper innsynsforespørsler mot Stortinget kan fortelle mer om
181 hvordan ting konkret fungerer der.
</p>
186 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance
</a>.
191 <div class=
"padding"></div>
194 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/French_Docbook_PDF_EPUB_MOBI_edition_of_the_Free_Culture_book.html">French Docbook/PDF/EPUB/MOBI edition of the Free Culture book
</a></div>
195 <div class=
"date"> 1st October
2015</div>
196 <div class=
"body"><p>As I wrap up the Norwegian version of
197 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig">Free
198 Culture
</a> book by Lawrence Lessig (still waiting for my final proof
199 reading copy to arrive in the mail), my great
200 <a href=
"http://dblatex.sourceforge.net/">dblatex
</a> helper and
201 developer of the dblatex docbook processor, Benoît Guillon, decided a
202 to try to create a French version of the book. He started with the
203 French translation available from the
204 <a href=
"http://www.wikilivres.ca/wiki/Culture_libre">Wikilivres wiki
205 pages
</a>, and wrote a program to convert it into a PO file, allowing
206 the translation to be integrated into the po4a based framework I use
207 to create the Norwegian translation from the English edition. We meet
208 on the
<a href=
"irc://irc.freenode.net/%23dblatex">#dblatex IRC
209 channel
</a> to discuss the work. If you want to help create a French
211 <a href=
"https://github.com/marsgui/free-culture-lessig">his git
212 repository
</a> and join us on IRC. If the French edition look good,
213 we might publish it as a paper book on lulu.com. A French version of
214 the drawings and the cover need to be provided for this to happen.
</p>
219 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>.
224 <div class=
"padding"></div>
227 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html">The life and death of a laptop battery
</a></div>
228 <div class=
"date">24th September
2015</div>
229 <div class=
"body"><p>When I get a new laptop, the battery life time at the start is OK.
230 But this do not last. The last few laptops gave me a feeling that
231 within a year, the life time is just a fraction of what it used to be,
232 and it slowly become painful to use the laptop without power connected
233 all the time. Because of this, when I got a new Thinkpad X230 laptop
234 about two years ago, I decided to monitor its battery state to have
235 more hard facts when the battery started to fail.
</p>
237 <img src=
"http://people.skolelinux.org/pere/blog/images/2015-09-24-laptop-battery-graph.png"/>
239 <p>First I tried to find a sensible Debian package to record the
240 battery status, assuming that this must be a problem already handled
241 by someone else. I found
242 <a href=
"https://tracker.debian.org/pkg/battery-stats">battery-stats
</a>,
243 which collects statistics from the battery, but it was completely
244 broken. I sent a few suggestions to the maintainer, but decided to
245 write my own collector as a shell script while I waited for feedback
247 <a href=
"http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html">a
248 blog post about the battery development on a MacBook Air
</a> I also
250 <a href=
"https://github.com/jradavenport/batlog.git">batlog
</a>, not
251 available in Debian.
</p>
253 <p>I started my collector
2013-
07-
15, and it has been collecting
254 battery stats ever since. Now my
255 /var/log/hjemmenett-battery-status.log file contain around
115,
000
256 measurements, from the time the battery was working great until now,
257 when it is unable to charge above
7% of original capacity. My
258 collector shell script is quite simple and look like this:
</p>
263 # http://www.ifweassume.com/
2013/
08/the-de-evolution-of-my-laptop-battery.html
265 # http://blog.sleeplessbeastie.eu/
2013/
01/
02/debian-how-to-monitor-battery-capacity/
266 logfile=/var/log/hjemmenett-battery-status.log
268 files="manufacturer model_name technology serial_number \
269 energy_full energy_full_design energy_now cycle_count status"
271 if [ ! -e "$logfile" ] ; then
282 # Print complete message in one echo call, to avoid race condition
283 # when several log processes run in parallel.
284 msg=$(printf
"%s," $(date +%s); \
285 for f in $files; do \
286 printf
"%s," $(cat $f); \
291 cd /sys/class/power_supply
294 (cd $bat && log_battery
>> "$logfile")
298 <p>The script is called when the power management system detect a
299 change in the power status (power plug in or out), and when going into
300 and out of hibernation and suspend. In addition, it collect a value
301 every
10 minutes. This make it possible for me know when the battery
302 is discharging, charging and how the maximum charge change over time.
303 The code for the Debian package
304 <a href=
"https://github.com/petterreinholdtsen/battery-status">is now
305 available on github
</a>.
</p>
307 <p>The collected log file look like this:
</p>
310 timestamp,manufacturer,model_name,technology,serial_number,energy_full,energy_full_design,energy_now,cycle_count,status,
311 1376591133,LGC,
45N1025,Li-ion,
974,
62800000,
62160000,
39050000,
0,Discharging,
313 1443090528,LGC,
45N1025,Li-ion,
974,
4900000,
62160000,
4900000,
0,Full,
314 1443090601,LGC,
45N1025,Li-ion,
974,
4900000,
62160000,
4900000,
0,Full,
317 <p>I wrote a small script to create a graph of the charge development
318 over time. This graph depicted above show the slow death of my laptop
321 <p>But why is this happening? Why are my laptop batteries always
322 dying in a year or two, while the batteries of space probes and
323 satellites keep working year after year. If we are to believe
324 <a href=
"http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries">Battery
325 University
</a>, the cause is me charging the battery whenever I have a
326 chance, and the fix is to not charge the Lithium-ion batteries to
100%
327 all the time, but to stay below
90% of full charge most of the time.
328 I've been told that the Tesla electric cars
329 <a href=
"http://my.teslamotors.com/de_CH/forum/forums/battery-charge-limit">limit
330 the charge of their batteries to
80%
</a>, with the option to charge to
331 100% when preparing for a longer trip (not that I would want a car
332 like Tesla where rights to privacy is abandoned, but that is another
333 story), which I guess is the option we should have for laptops on
336 <p>Is there a good and generic way with Linux to tell the battery to
337 stop charging at
80%, unless requested to charge to
100% once in
338 preparation for a longer trip? I found
339 <a href=
"http://askubuntu.com/questions/34452/how-can-i-limit-battery-charging-to-80-capacity">one
340 recipe on askubuntu for Ubuntu to limit charging on Thinkpad to
341 80%
</a>, but could not get it to work (kernel module refused to
344 <p>I wonder why the battery capacity was reported to be more than
100%
345 at the start. I also wonder why the "full capacity" increases some
346 times, and if it is possible to repeat the process to get the battery
347 back to design capacity. And I wonder if the discharge and charge
348 speed change over time, or if this stay the same. I did not yet try
349 to write a tool to calculate the derivative values of the battery
350 level, but suspect some interesting insights might be learned from
353 <p>Update
2015-
09-
24: I got a tip to install the packages
354 acpi-call-dkms and tlp (unfortunately missing in Debian stable)
355 packages instead of the tp-smapi-dkms package I had tried to use
356 initially, and use 'tlp setcharge
40 80' to change when charging start
357 and stop. I've done so now, but expect my existing battery is toast
358 and need to be replaced. The proposal is unfortunately Thinkpad
364 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
369 <div class=
"padding"></div>
372 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Book_cover_for_the_Free_Culture_book_finally_done.html">Book cover for the Free Culture book finally done
</a></div>
373 <div class=
"date"> 3rd September
2015</div>
374 <div class=
"body"><p>Creating a good looking book cover proved harder than I expected.
375 I wanted to create a cover looking similar to the original cover of
377 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig">Free
378 Culture
</a> book we are translating to Norwegian, and I wanted it in
379 vector format for high resolution printing. But my inkscape knowledge
380 were not nearly good enough to pull that off.
382 <p>But thanks to the great inkscape community, I was able to wrap up
383 the cover yesterday evening. I asked on the
384 <a href=
"irc://irc.freenode.net/%23inkscape">#inkscape IRC channel
</a>
385 on Freenode for help and clues, and Marc Jeanmougin (Mc-) volunteered
386 to try to recreate it based on the PDF of the cover from the HTML
387 version. Not only did he create a
388 <a href=
"https://marc.jeanmougin.fr/share/copy1.svg ">SVG document with
389 the original and his vector version side by side
</a>, he even provided
390 an
<a href=
"https://marc.jeanmougin.fr/share/out-1.ogv">instruction
391 video
</a> explaining how he did it
</a>. But the instruction video is
392 not easy to follow for an untrained inkscape user. The video is a
393 recording on how he did it, and he is obviously very experienced as
394 the menu selections are very quick and he mentioned on IRC that he did
395 use some keyboard shortcuts that can't be seen on the video, but it
396 give a good idea about the inkscape operations to use to create the
397 stripes with the embossed copyright sign in the center.
</p>
399 <p>I took his SVG file, copied the vector image and re-sized it to fit
400 on the cover I was drawing. I am happy with the end result, and the
401 current english version look like this:
</p>
403 <img src=
"http://people.skolelinux.org/pere/blog/images/2015-09-03-free-culture-cover.png" width=
"70%" align=
"center"/>
405 <p>I am not quite sure about the text on the back, but guess it will
406 do. I picked three quotes from the official site for the book, and
407 hope it will work to trigger the interest of potential readers. The
408 Norwegian cover will look the same, but with the texts and bar code
409 replaced with the Norwegian version.
</p>
411 <p>The book is very close to being ready for publication, and I expect
412 to upload the final draft to Lulu in the next few days and order a
413 final proof reading copy to verify that everything look like it should
414 before allowing everyone to order their own copy of Free Culture, in
415 English or Norwegian Bokmål. I'm waiting to give the the productive
416 proof readers a chance to complete their work.
</p>
421 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>.
426 <div class=
"padding"></div>
429 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/In_my_hand__a_pocket_book_edition_of_the_Norwegian_Free_Culture_book_.html">In my hand, a pocket book edition of the Norwegian Free Culture book!
</a></div>
430 <div class=
"date">19th August
2015</div>
431 <div class=
"body"><p>Today, finally, my first printed draft edition of the Norwegian
432 translation of Free Culture I have been working on for the last few
433 years arrived in the mail. I had to fake a cover to get the interior
434 printed, and the exterior of the book look awful, but that is
435 irrelevant at this point. I asked for a printed pocket book version
436 to get an idea about the font sizes and paper format as well as how
437 good the figures and images look in print, but also to test what the
438 pocket book version would look like. After receiving the
500 page
439 pocket book, it became obvious to me that that pocket book size is too
440 small for this book. I believe the book is too thick, and several
441 tables and figures do not look good in the size they get with that
442 small page sizes. I believe I will go with the
5.5x8.5 inch size
443 instead. A surprise discovery from the paper version was how bad the
444 URLs look in print. They are very hard to read in the colophon page.
445 The URLs are red in the PDF, but light gray on paper. I need to
446 change the color of links somehow to look better. But there is a
447 printed book in my hand, and it feels great. :)
</p>
449 <p>Now I only need to fix the cover, wrap up the postscript with the
450 store behind the book, and collect the last corrections from the proof
451 readers before the book is ready for proper printing. Cover artists
452 willing to work for free and create a Creative Commons licensed vector
453 file looking similar to the original is most welcome, as my skills as
454 a graphics designer are mostly missing.
</p>
459 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>.
464 <div class=
"padding"></div>
467 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/First_paper_version_of_the_Norwegian_Free_Culture_book_heading_my_way.html">First paper version of the Norwegian Free Culture book heading my way
</a></div>
468 <div class=
"date"> 9th August
2015</div>
469 <div class=
"body"><p>Typesetting a book is harder than I hoped. As the translation is
470 mostly done, and a volunteer proof reader was going to check the text
471 on paper, it was time this summer to focus on formatting my translated
472 <a href=
"http://www.docbook.org/">docbook
</a> based version of the
473 <a href=
"http://free-culture.cc/">Free Culture
</a> book by Lawrence
474 Lessig. I've been trying to get both docboox-xsl+fop and dblatex to
475 give me a good looking PDF, but in the end I went with dblatex, because
476 its Debian maintainer and upstream developer were responsive and very
477 helpful in solving my formatting challenges.
</p>
479 <p>Last night, I finally managed to create a PDF that no longer made
480 <a href=
"http://www.lulu.com/">Lulu.com
</a> complain after uploading,
481 and I ordered a text version of the book on paper. It is lacking a
482 proper book cover and is not tagged with the correct ISBN number, but
483 should give me an idea what the finished book will look like.
</p>
485 <p>Instead of using Lulu, I did consider printing the book using
486 <a href=
"http://www.createspace.com/">CreateSpace
</a>, but ended up
487 using Lulu because it had smaller book size options (CreateSpace seem
488 to lack pocket book with extended distribution). I looked for a
489 similar service in Norway, but have not seen anything so far. Please
490 let me know if I am missing out on something here.
</p>
492 <p>But I still struggle to decide the book size. Should I go for
493 pocket book (
4.25x6.875 inches /
10.8x17.5 cm) with
556 pages, Digest
494 (
5.5x8.5 inches /
14x21.6 cm) with
323 pages or US Trade (
6x8 inches /
495 15.3x22.9 cm) with
280 pages? Fewer pager give a cheaper book, and a
496 smaller book is easier to carry around. The test book I ordered was
497 pocket book sized, to give me an idea how well that fit in my hand,
498 but I suspect I will end up using a digest sized book in the end to
499 bring the prize down further.
</p>
501 <p>My biggest challenge at the moment is making nice cover art. My
502 inkscape skills are not yet up to the task of replicating the original
503 cover in SVG format. I also need to figure out what to write about
504 the book on the back (will most likely use the same text as the
505 description on web based book stores). I would love help with this,
506 if you are willing to license the art source and final version using
507 the same CC license as the book. My artistic skills are not really up
510 <p>I plan to publish the book in both English and Norwegian and on
511 paper, in PDF form as well as EPUB and MOBI format. The current
512 status can as usual be found on
513 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig">github
</a>
514 in the archive/ directory. So far I have spent all time on making the
515 PDF version look good. Someone should probably do the same with the
516 dbtoepub generated e-book. Help is definitely needed here, as I
517 expect to run out of steem before I find time to improve the epub
520 <p>Please let me know via github if you find typos in the book or
521 discover translations that should be improved. The final proof
522 reading is being done right now, and I expect to publish the finished
523 result in a few months.
</p>
528 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>.
533 <div class=
"padding"></div>
536 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Typesetting_DocBook_footnotes_as_endnotes_with_dblatex.html">Typesetting DocBook footnotes as endnotes with dblatex
</a></div>
537 <div class=
"date">16th July
2015</div>
538 <div class=
"body"><p>I'm still working on the Norwegian version of the
539 <a href=
"http://free-culture.cc/">Free Culture book by Lawrence
540 Lessig
</a>, and is now working on the final typesetting and layout.
541 One of the features I want to get the structure similar to the
542 original book is to typeset the footnotes as endnotes in the notes
543 chapter. Based on the
544 <a href=
"https://bugs.debian.org/685063">feedback from the Debian
545 maintainer and the dblatex developer
</a>, I came up with this recipe I
546 would like to share with you. The proposal was to create a new LaTeX
547 class file and add the LaTeX code there, but this is not always
548 practical, when I want to be able to replace the class using a make
549 file variable. So my proposal misuses the latex.begindocument XSL
550 parameter value, to get a small fragment into the correct location in
551 the generated LaTeX File.
</p>
553 <p>First, decide where in the DocBook document to place the endnotes,
554 and add this text there:
</p>
557 <?latex \theendnotes ?
>
560 <p>Next, create a xsl stylesheet file dblatex-endnotes.xsl to add the
561 code needed to add the endnote instructions in the preamble of the
562 generated LaTeX document, with content like this:
</p>
565 <?xml version='
1.0'?
>
566 <xsl:stylesheet xmlns:
xsl="http://www.w3.org/
1999/XSL/Transform" version='
1.0'
>
567 <xsl:param
name="latex.begindocument"
>
569 \usepackage{endnotes}
570 \let\footnote=\endnote
571 \def\enoteheading{\mbox{}\par\vskip-\baselineskip }
575 </xsl:stylesheet
>
578 <p>Finally, load this xsl file when running dblatex, for example like
582 dblatex --xsl-user=dblatex-endnotes.xsl freeculture.nb.xml
585 <p>The end result can be seen on github, where
586 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig">my
587 book project
</a> is located.
</p>
592 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>.
597 <div class=
"padding"></div>
599 <p style=
"text-align: right;"><a href=
"index.rss"><img src=
"http://people.skolelinux.org/pere/blog/xml.gif" alt=
"RSS feed" width=
"36" height=
"14" /></a></p>
610 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/01/">January (
7)
</a></li>
612 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/02/">February (
6)
</a></li>
614 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/03/">March (
1)
</a></li>
616 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/04/">April (
4)
</a></li>
618 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/05/">May (
3)
</a></li>
620 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/06/">June (
4)
</a></li>
622 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/07/">July (
6)
</a></li>
624 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/08/">August (
2)
</a></li>
626 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/09/">September (
2)
</a></li>
628 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2015/10/">October (
5)
</a></li>
635 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/01/">January (
2)
</a></li>
637 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/02/">February (
3)
</a></li>
639 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/03/">March (
8)
</a></li>
641 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/04/">April (
7)
</a></li>
643 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/05/">May (
1)
</a></li>
645 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/06/">June (
2)
</a></li>
647 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/07/">July (
2)
</a></li>
649 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/08/">August (
2)
</a></li>
651 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/09/">September (
5)
</a></li>
653 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/10/">October (
6)
</a></li>
655 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/11/">November (
3)
</a></li>
657 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2014/12/">December (
5)
</a></li>
664 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/01/">January (
11)
</a></li>
666 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/02/">February (
9)
</a></li>
668 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/03/">March (
9)
</a></li>
670 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/04/">April (
6)
</a></li>
672 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/05/">May (
9)
</a></li>
674 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/06/">June (
10)
</a></li>
676 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/07/">July (
7)
</a></li>
678 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/08/">August (
3)
</a></li>
680 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/09/">September (
5)
</a></li>
682 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/10/">October (
7)
</a></li>
684 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/11/">November (
9)
</a></li>
686 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/12/">December (
3)
</a></li>
693 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/01/">January (
7)
</a></li>
695 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/02/">February (
10)
</a></li>
697 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/03/">March (
17)
</a></li>
699 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/04/">April (
12)
</a></li>
701 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/05/">May (
12)
</a></li>
703 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/06/">June (
20)
</a></li>
705 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/07/">July (
17)
</a></li>
707 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/08/">August (
6)
</a></li>
709 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/09/">September (
9)
</a></li>
711 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/10/">October (
17)
</a></li>
713 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/11/">November (
10)
</a></li>
715 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/12/">December (
7)
</a></li>
722 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/01/">January (
16)
</a></li>
724 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/02/">February (
6)
</a></li>
726 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/03/">March (
6)
</a></li>
728 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/04/">April (
7)
</a></li>
730 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/05/">May (
3)
</a></li>
732 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/06/">June (
2)
</a></li>
734 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/07/">July (
7)
</a></li>
736 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/08/">August (
6)
</a></li>
738 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/09/">September (
4)
</a></li>
740 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/10/">October (
2)
</a></li>
742 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/11/">November (
3)
</a></li>
744 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/12/">December (
1)
</a></li>
751 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/01/">January (
2)
</a></li>
753 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/02/">February (
1)
</a></li>
755 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/03/">March (
3)
</a></li>
757 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/04/">April (
3)
</a></li>
759 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/05/">May (
9)
</a></li>
761 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/06/">June (
14)
</a></li>
763 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/07/">July (
12)
</a></li>
765 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/08/">August (
13)
</a></li>
767 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/09/">September (
7)
</a></li>
769 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/10/">October (
9)
</a></li>
771 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/11/">November (
13)
</a></li>
773 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/12/">December (
12)
</a></li>
780 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/01/">January (
8)
</a></li>
782 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/02/">February (
8)
</a></li>
784 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/03/">March (
12)
</a></li>
786 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/04/">April (
10)
</a></li>
788 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/05/">May (
9)
</a></li>
790 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/06/">June (
3)
</a></li>
792 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/07/">July (
4)
</a></li>
794 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/08/">August (
3)
</a></li>
796 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/09/">September (
1)
</a></li>
798 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/10/">October (
2)
</a></li>
800 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/11/">November (
3)
</a></li>
802 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/12/">December (
3)
</a></li>
809 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/11/">November (
5)
</a></li>
811 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/12/">December (
7)
</a></li>
822 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (
13)
</a></li>
824 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/amiga">amiga (
1)
</a></li>
826 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/aros">aros (
1)
</a></li>
828 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bankid">bankid (
4)
</a></li>
830 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (
9)
</a></li>
832 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (
15)
</a></li>
834 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bsa">bsa (
2)
</a></li>
836 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (
2)
</a></li>
838 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian (
112)
</a></li>
840 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (
153)
</a></li>
842 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/digistan">digistan (
10)
</a></li>
844 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/dld">dld (
15)
</a></li>
846 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook (
18)
</a></li>
848 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (
4)
</a></li>
850 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/english">english (
291)
</a></li>
852 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (
23)
</a></li>
854 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (
12)
</a></li>
856 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (
20)
</a></li>
858 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (
9)
</a></li>
860 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (
16)
</a></li>
862 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/h264">h264 (
20)
</a></li>
864 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/intervju">intervju (
42)
</a></li>
866 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (
10)
</a></li>
868 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/kart">kart (
19)
</a></li>
870 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ldap">ldap (
9)
</a></li>
872 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/lenker">lenker (
8)
</a></li>
874 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (
2)
</a></li>
876 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (
1)
</a></li>
878 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (
8)
</a></li>
880 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (
36)
</a></li>
882 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk (
266)
</a></li>
884 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug (
177)
</a></li>
886 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (
20)
</a></li>
888 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/open311">open311 (
2)
</a></li>
890 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (
54)
</a></li>
892 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern (
88)
</a></li>
894 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/raid">raid (
1)
</a></li>
896 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/reactos">reactos (
1)
</a></li>
898 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/reprap">reprap (
11)
</a></li>
900 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rfid">rfid (
3)
</a></li>
902 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/robot">robot (
9)
</a></li>
904 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rss">rss (
1)
</a></li>
906 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ruter">ruter (
4)
</a></li>
908 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (
2)
</a></li>
910 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (
43)
</a></li>
912 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (
4)
</a></li>
914 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (
4)
</a></li>
916 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/standard">standard (
48)
</a></li>
918 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (
3)
</a></li>
920 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (
10)
</a></li>
922 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (
35)
</a></li>
924 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (
2)
</a></li>
926 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/usenix">usenix (
2)
</a></li>
928 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/valg">valg (
8)
</a></li>
930 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/video">video (
54)
</a></li>
932 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (
4)
</a></li>
934 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/web">web (
37)
</a></li>
940 <p style=
"text-align: right">
941 Created by
<a href=
"http://steve.org.uk/Software/chronicle">Chronicle v4.6
</a>