]> pere.pagekite.me Git - homepage.git/blob - blog/index.html
Generated.
[homepage.git] / blog / index.html
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">
4 <head>
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" />
10 </head>
11 <body>
12 <div class="title">
13 <h1>
14 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
15
16 </h1>
17
18 </div>
19
20
21
22 <div class="entry">
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
28 for to dager siden og
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>
32
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
39 er stikk i strid med
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>
47 </div>
48 <div class="tags">
49
50
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>.
52
53
54 </div>
55 </div>
56 <div class="padding"></div>
57
58 <div class="entry">
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
66 place 2014-10-20.</p>
67
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>
71
72 <iframe width="560" height="315" src="https://www.youtube.com/embed/o_Sr96TFQQE" frameborder="0" allowfullscreen></iframe>
73
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>
82 </div>
83 <div class="tags">
84
85
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>.
87
88
89 </div>
90 </div>
91 <div class="padding"></div>
92
93 <div class="entry">
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
107 weep.</p>
108
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
112 my parents.</p>
113 </div>
114 <div class="tags">
115
116
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>.
118
119
120 </div>
121 </div>
122 <div class="padding"></div>
123
124 <div class="entry">
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>
142
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>
147 og
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
153 landegrensene.</p>
154
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>
161
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>
182 </div>
183 <div class="tags">
184
185
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>.
187
188
189 </div>
190 </div>
191 <div class="padding"></div>
192
193 <div class="entry">
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
210 edition, check out
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>
215 </div>
216 <div class="tags">
217
218
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>.
220
221
222 </div>
223 </div>
224 <div class="padding"></div>
225
226 <div class="entry">
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>
236
237 <img src="http://people.skolelinux.org/pere/blog/images/2015-09-24-laptop-battery-graph.png"/>
238
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
246 from him. Via
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
249 discovered
250 <a href="https://github.com/jradavenport/batlog.git">batlog</a>, not
251 available in Debian.</p>
252
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>
259
260 <pre>
261 #!/bin/sh
262 # Inspired by
263 # http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html
264 # See also
265 # http://blog.sleeplessbeastie.eu/2013/01/02/debian-how-to-monitor-battery-capacity/
266 logfile=/var/log/hjemmenett-battery-status.log
267
268 files="manufacturer model_name technology serial_number \
269 energy_full energy_full_design energy_now cycle_count status"
270
271 if [ ! -e "$logfile" ] ; then
272 (
273 printf "timestamp,"
274 for f in $files; do
275 printf "%s," $f
276 done
277 echo
278 ) > "$logfile"
279 fi
280
281 log_battery() {
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); \
287 done)
288 echo "$msg"
289 }
290
291 cd /sys/class/power_supply
292
293 for bat in BAT*; do
294 (cd $bat && log_battery >> "$logfile")
295 done
296 </pre>
297
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>
306
307 <p>The collected log file look like this:</p>
308
309 <pre>
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,
312 [...]
313 1443090528,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
314 1443090601,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
315 </pre>
316
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
319 battery.</p>
320
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
334 Linux too.</p>
335
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
342 load).</p>
343
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
351 those.</p>
352
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
359 specific.</p>
360 </div>
361 <div class="tags">
362
363
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>.
365
366
367 </div>
368 </div>
369 <div class="padding"></div>
370
371 <div class="entry">
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
376 the
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.
381
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>
398
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>
402
403 <img src="http://people.skolelinux.org/pere/blog/images/2015-09-03-free-culture-cover.png" width="70%" align="center"/>
404
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>
410
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>
417 </div>
418 <div class="tags">
419
420
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>.
422
423
424 </div>
425 </div>
426 <div class="padding"></div>
427
428 <div class="entry">
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>
448
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>
455 </div>
456 <div class="tags">
457
458
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>.
460
461
462 </div>
463 </div>
464 <div class="padding"></div>
465
466 <div class="entry">
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>
478
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>
484
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>
491
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>
500
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
508 to the task.</p>
509
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
518 formatting.</p>
519
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>
524 </div>
525 <div class="tags">
526
527
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>.
529
530
531 </div>
532 </div>
533 <div class="padding"></div>
534
535 <div class="entry">
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>
552
553 <p>First, decide where in the DocBook document to place the endnotes,
554 and add this text there:</p>
555
556 <pre>
557 &lt;?latex \theendnotes ?&gt;
558 </pre>
559
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>
563
564 <pre>
565 &lt;?xml version='1.0'?&gt;
566 &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'&gt;
567 &lt;xsl:param name="latex.begindocument"&gt;
568 &lt;xsl:text&gt;
569 \usepackage{endnotes}
570 \let\footnote=\endnote
571 \def\enoteheading{\mbox{}\par\vskip-\baselineskip }
572 \begin{document}
573 &lt;/xsl:text&gt;
574 &lt;/xsl:param&gt;
575 &lt;/xsl:stylesheet&gt;
576 </pre>
577
578 <p>Finally, load this xsl file when running dblatex, for example like
579 this:</p>
580
581 <pre>
582 dblatex --xsl-user=dblatex-endnotes.xsl freeculture.nb.xml
583 </pre>
584
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>
588 </div>
589 <div class="tags">
590
591
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>.
593
594
595 </div>
596 </div>
597 <div class="padding"></div>
598
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>
600 <div id="sidebar">
601
602
603
604 <h2>Archive</h2>
605 <ul>
606
607 <li>2015
608 <ul>
609
610 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/01/">January (7)</a></li>
611
612 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/02/">February (6)</a></li>
613
614 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/03/">March (1)</a></li>
615
616 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/04/">April (4)</a></li>
617
618 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/05/">May (3)</a></li>
619
620 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/06/">June (4)</a></li>
621
622 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/07/">July (6)</a></li>
623
624 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/08/">August (2)</a></li>
625
626 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/09/">September (2)</a></li>
627
628 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/10/">October (5)</a></li>
629
630 </ul></li>
631
632 <li>2014
633 <ul>
634
635 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
636
637 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
638
639 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
640
641 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
642
643 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
644
645 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
646
647 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
648
649 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
650
651 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
652
653 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (6)</a></li>
654
655 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/11/">November (3)</a></li>
656
657 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/12/">December (5)</a></li>
658
659 </ul></li>
660
661 <li>2013
662 <ul>
663
664 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
665
666 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
667
668 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
669
670 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
671
672 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
673
674 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
675
676 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
677
678 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
679
680 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
681
682 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
683
684 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
685
686 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
687
688 </ul></li>
689
690 <li>2012
691 <ul>
692
693 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
694
695 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
696
697 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
698
699 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
700
701 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
702
703 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
704
705 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
706
707 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
708
709 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
710
711 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
712
713 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
714
715 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
716
717 </ul></li>
718
719 <li>2011
720 <ul>
721
722 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
723
724 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
725
726 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
727
728 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
729
730 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
731
732 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
733
734 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
735
736 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
737
738 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
739
740 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
741
742 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
743
744 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
745
746 </ul></li>
747
748 <li>2010
749 <ul>
750
751 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
752
753 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
754
755 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
756
757 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
758
759 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
760
761 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
762
763 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
764
765 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
766
767 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
768
769 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
770
771 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
772
773 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
774
775 </ul></li>
776
777 <li>2009
778 <ul>
779
780 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
781
782 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
783
784 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
785
786 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
787
788 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
789
790 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
791
792 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
793
794 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
795
796 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
797
798 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
799
800 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
801
802 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
803
804 </ul></li>
805
806 <li>2008
807 <ul>
808
809 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
810
811 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
812
813 </ul></li>
814
815 </ul>
816
817
818
819 <h2>Tags</h2>
820 <ul>
821
822 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
823
824 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
825
826 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
827
828 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
829
830 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (9)</a></li>
831
832 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (15)</a></li>
833
834 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
835
836 <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
837
838 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (112)</a></li>
839
840 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (153)</a></li>
841
842 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
843
844 <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (15)</a></li>
845
846 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (18)</a></li>
847
848 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
849
850 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (291)</a></li>
851
852 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
853
854 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
855
856 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (20)</a></li>
857
858 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
859
860 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (16)</a></li>
861
862 <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
863
864 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
865
866 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (10)</a></li>
867
868 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
869
870 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
871
872 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
873
874 <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
875
876 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
877
878 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
879
880 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (36)</a></li>
881
882 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (266)</a></li>
883
884 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (177)</a></li>
885
886 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (20)</a></li>
887
888 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
889
890 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (54)</a></li>
891
892 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (88)</a></li>
893
894 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
895
896 <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
897
898 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
899
900 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
901
902 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
903
904 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
905
906 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
907
908 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
909
910 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (43)</a></li>
911
912 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
913
914 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
915
916 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (48)</a></li>
917
918 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
919
920 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (10)</a></li>
921
922 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (35)</a></li>
923
924 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
925
926 <li><a href="http://people.skolelinux.org/pere/blog/tags/usenix">usenix (2)</a></li>
927
928 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
929
930 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (54)</a></li>
931
932 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
933
934 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (37)</a></li>
935
936 </ul>
937
938
939 </div>
940 <p style="text-align: right">
941 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
942 </p>
943
944 </body>
945 </html>