<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>

  var _gaq = _gaq || [];
  _gaq.push([‘_setAccount’, ‘UA-307882-9’]);
  _gaq.push([‘_gat._anonymizeIp’]);
  _gaq.push([‘_trackPageview’]);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();</description><title>plesslweb</title><generator>Tumblr (3.0; @plessl)</generator><link>http://blog.plesslweb.ch/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/plesslweb-blog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="plesslweb-blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://tumblr.superfeedr.com/" /><item><title>Are the changed subscription rules for iOS really a good thing for customers?</title><description>&lt;p&gt;In &lt;a href="http://5by5.tv/buildanalyze/29"&gt;episode #29 of the “Build and Analyze” podcast&lt;/a&gt; Marco and Dan discuss the &lt;a href="http://arstechnica.com/apple/news/2011/06/apple-quietly-drops-special-subscription-requirements-for-ios-apps.ars"&gt;recently changed&lt;/a&gt; in-app purchase rules for iOS applications with subscriptions. According to the updated rules it is no longer prohibited that publishers offer the same subscriptions for a lower price outside the iOS App Store in their own web stores. The App Store rules however still prohibit that applications provide direct links to such alternative web stores.&lt;/p&gt;

&lt;p&gt;Marco comes to the conclusion that this change is a good thing since the new rule is more fair and allows publishers to charge higher prices in the
for the in-app purchase in the App Store to account for Apple’s commission.&lt;/p&gt;

&lt;p&gt;I disagree with this assessment. While I concede that the new rules are definitely more attractive from a publisher’s perspective, I would argue that the general user experience is now significantly worse for the customer. Before, a customer was guaranteed to get the best price for a subscription through in-app purchase, which is at the same time also the most convenient way to make the purchase. With the new rules customers are confronted with the possibility that the same subscription might be available  at a lower price in an alternative store. But since applications are not allowed to link to these stores, there is no easy way to find out about the best option to buy the subscription. Hence the (price sensitive) customer is left with the task to do the research for the best price himself.&lt;/p&gt;

&lt;p&gt;I’m puzzled that Apple made this change, which seems to put the interests of publishers in front of the interests of customers. It may be the Apple figures that most users will just use the in-app purchase anyway.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6701100277</link><guid>http://blog.plesslweb.ch/post/6701100277</guid><pubDate>Sun, 19 Jun 2011 23:48:06 +0200</pubDate><category>App Store</category><category>Apple</category></item><item><title>How to type a square character in Mac OS X</title><description>&lt;p&gt;The founders of the &lt;a href="http://pc2.uni-paderborn.de"&gt;Paderborn Center for Parallel Computing&lt;/a&gt;, my current employer, have made the choice to use PC² instead of PCPC as the official acronym for the institute. While this choice bears the advantage of memorability, typing a square character (²) on a Mac is tedious because the standard keyboard layout does not provide a default key combination to directly type a square character. But as Mac OS X is highly customizable, it needless to say that there are solutions for this problem. In the following, I present three solutions to the problem, that are partly complementary.&lt;/p&gt;

&lt;h2&gt;1. System wide “Text and symbol substitution”&lt;/h2&gt;

&lt;p&gt;Since version 10.6 (Snow Leopard) Mac OS X provides support for system wide “Text and Symbol substitution” that can be configured in the “Language &amp; Text” system preference pane. This method allows to setup the text input system to automatically replace PC2 with PC², whenever the text PC2 is typed.&lt;/p&gt;

&lt;p&gt;To configure this text substitution open the “Language &amp; Text” preference pane in system preferences and navigate to the “Text” tab. Using the plus button you can setup a new replacement rule that replaces “PC2” with “PC²” (see screenshot below). For typing the ² character, you can use the character viewer or copy and paste the string from this article.&lt;/p&gt;

&lt;p&gt;This text replacement will become active only after your applications have been restarted, hence I suggest to log out and log in again. A limitation of this approach is that it works only in applications that have been built using the OS X Cocoa libraries. While this will cover the vast majority of the applications you are likely to use, there is one notable exception: Microsoft Office 2008 for Mac still uses the outdated Carbon libraries, hence the text substitution will not be available. Fortunately there is an easy workaround, which I will describe in the next section.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lmy8lnuKJW1qzliu7.png" alt="Screenshot showing how to setup the system wide text substitution of Mac OS X" title="Setting up the system wide text substitution"/&gt;&lt;/p&gt;

&lt;h2&gt;2. Application-specific text substitution (Microsoft Office 2008)&lt;/h2&gt;

&lt;p&gt;Since Microsoft Office 2008 is still an application that uses the outdated Carbon libraries, it does not enjoy the system wide text substitution feature of Mac OS X 10.6. However, Word and PowerPoint allow for configuring text substitutions in the application using the “Auto correct” feature.&lt;/p&gt;

&lt;p&gt;To setup the substitution select the Option “AutoCorrect” from the “Tools” menu and configure the substitution as shown in the screenshot below. For some reason Microsoft decided that its Office applications do not share the substitutions, hence the substitution has to be setup in every application separately.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lmy8lwITdc1qzliu7.png" alt="Screenshot showing how to setup the text substitution in Microsoft Word for Mac  2008" title="Setting up the text substitution in Microsoft Word for Mac 2008"/&gt;&lt;/p&gt;

&lt;h2&gt;3. Configure Cocoa Keybindings&lt;/h2&gt;

&lt;p&gt;The most flexible way to configure the keyboard layout on OS X is to setup custom key bindings. In fact, keybindings go much beyond simply assigning characters to specific key combinations, but allow to customize the Cocoa text system in a very powerful way. An excellent presentation by Jacob Rus on how to configure the Cocoa Text Input system can be found &lt;a href="http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the use case of binding the ² character to a specific key combination, the required configuration is however not very difficult. Keybindings are configured using XML property lists. For binding the ² symbol to the key combination ⌃⌥2 (Ctrl+Alt+2) simply create a file at &lt;tt&gt;~/Library/KeyBindings/DefaultKeyBinding.dict&lt;/tt&gt; with the following content:&lt;/p&gt;

&lt;pre class="CodeRay" title="Setting up a custom key binding for typing a ² character using ⌃⌥2"&gt;&lt;code class="language-xml"&gt;
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;^~2&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;insertText:&lt;/string&gt;
    &lt;string&gt;²&lt;/string&gt;
  &lt;/array&gt;
&lt;/dict&gt;
&lt;/plist&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It may be necessary to create a KeyBindings directory in the Library sub-directory of your home folder first. In the case that you have already configured your default keybindings, simply merge the relevant parts of the property list above with your &lt;tt&gt;DefaultKeyBindings.dict&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;As for the system wide text substitutions introduced above, this keybindings affect only Cocoa applications and also require a restart of the applicaitons to become active.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6629226744</link><guid>http://blog.plesslweb.ch/post/6629226744</guid><pubDate>Fri, 17 Jun 2011 21:26:59 +0200</pubDate><category>mac</category><category>osx</category><category>cocoa</category></item><item><title>Walkway for aliens</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lm7u3u84s51qzliu7.jpg" alt="The photo"/&gt;&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6141042705</link><guid>http://blog.plesslweb.ch/post/6141042705</guid><pubDate>Fri, 03 Jun 2011 15:15:00 +0200</pubDate></item><item><title>Impression from a visit to Bruno Weber’s Weinrebenpark in...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_ljk527I36f1qa2kiqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Impression from a visit to Bruno Weber’s Weinrebenpark in Dietikon, Switzerland.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/4560629142</link><guid>http://blog.plesslweb.ch/post/4560629142</guid><pubDate>Tue, 12 Apr 2011 23:01:10 +0200</pubDate><category>art</category></item><item><title>TextMate Command for Umlautification of LaTeX Sources</title><description>&lt;p&gt;Before LaTeX gained solid support for UTF-8 encoded text, it was common practice in LaTeX sources to use a &lt;tt&gt;"&lt;/tt&gt;-prefix to turn regular letters into umlauts. For example, the letter ‘ä’ is written as &lt;tt&gt;"a&lt;/tt&gt; in this notation.&lt;/p&gt;

&lt;p&gt;The prime advantage of this method is that it works with plain ASCII-encoded LaTeX source files; also it enables users to use umlauts even if their keyboard does not feature umlaut keys. However, the drawback of this notation is that texts with many umlauts become very difficult to read since the ubiquitous &lt;tt&gt;"&lt;/tt&gt; prefixes add a lot visual noise to the text.&lt;/p&gt;

&lt;p&gt;In the last years, LaTeX’s support for text in Unicode UTF-8 encoding has become very solid and can be easily activated using the &lt;em&gt;inputenc&lt;/em&gt; package like this:&lt;/p&gt;

&lt;pre&gt;
\usepackage[utf8]{inputenc}
&lt;/pre&gt;

&lt;p&gt;The following Ruby script converts LaTeX source files from the old notation into UTF-8 encoded Umlauts, which is much more readable. The script is intended to be used as a command in the &lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt; editor. To add the script to the LaTeX bundle, bring up the “Bundle Editor”, select the LaTeX bundle and add a “New Command” using the plus symbol below the bundle list. Chose “Selected Text or Document” as Input, chose “Replace Selected Text” as output, and copy the script below to the “Command(s)” field. After reloading the bundle, the command will appear as command of the  LaTeX bundle available through the “Gears”-menu in TextMate’s status bar.&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
#!/usr/bin/env ruby
$KCODE = 'U'

text = STDIN.read

text.gsub!(/\\"a/,'ä')
text.gsub!(/\\"o/,'ö')
text.gsub!(/\\"u/,'ü')

text.gsub!(/\\"A/,'Ä')
text.gsub!(/\\"O/,'Ö')
text.gsub!(/\\"U/,'Ü')

text.gsub!(/\\"s/,'ß')

print text&lt;/code&gt;
&lt;/pre&gt;</description><link>http://blog.plesslweb.ch/post/6629134632</link><guid>http://blog.plesslweb.ch/post/6629134632</guid><pubDate>Sun, 11 Apr 2010 00:00:00 +0200</pubDate><category>LaTeX</category><category>TextMate</category></item><item><title>Essential Mac Software - 2010 Edition</title><description>&lt;p&gt;It’s time for the yearly update for my list of Mac software which I consider essential for my daily work. There are a couple of new entries, but also a couple of applications that have been retired.&lt;/p&gt;

&lt;p&gt;The following list presents a choice of my favorite MAC applications (in alphabetical order):&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.apple.com/aperture"&gt;Aperture&lt;/a&gt; iPhoto’s big brother - I love the new photo editing capabilities added in version 3, which go much beyond iPhoto. Also the user interface seems much more MAC-like than Adobe Lightroom.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bibdesk.sourceforge.net"&gt;BibDesk&lt;/a&gt; The best BibTeX frontend ever.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://macrabbit.com/cssedit"&gt;CSSEdit&lt;/a&gt; Beautifully designed CSS editor from the makers of Espresso.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flip4mac.com"&gt;Flip4Mac&lt;/a&gt; Adds support for Microsoft video formats to QuickTime.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.obdev.at/products/launchbar/index.html"&gt;LaunchBar 5&lt;/a&gt; The ultimate application launcher.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macports.org"&gt;Macports&lt;/a&gt; Install command line Unix tools on OS X.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.newsgator.com/Individuals/NetNewsWire"&gt;NetNewsWire&lt;/a&gt; My favorite RSS reader.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.omnigroup.com/applications/omnigraffle"&gt;OmniGraffle&lt;/a&gt; In my opinion the best vector graphics drawing program for technical illustrations in computer science and engineering.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.omnigroup.com/applications/omnioutliner"&gt;OmniOutliner&lt;/a&gt; Although the outliner hype has faded in the last years, still a useful application for collecting hierarchically structured data.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.perian.org"&gt;Perian&lt;/a&gt; QuickTime support for many popular video formats.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://thelittleappfactory.com/ripit/"&gt;RipIt&lt;/a&gt; Rips DVD movies to disk images that can be played with the standard DVDPlayer application.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.skype.com/download"&gt;Skype&lt;/a&gt; VOIP and instant messaging.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://skim-app.sourceforge.net"&gt;Skim&lt;/a&gt; PDF and DVI viewer, perfectly integrated with TextMate’s LaTeX mode.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html"&gt;SuperDuper&lt;/a&gt; Harddrive cloning tool, perfect complement to TimeMachine.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macromates.com/"&gt;TextMate&lt;/a&gt; My standard multi-purpose text editor for writing and programming. Provides good support for LaTeX.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://culturedcode.com/things/"&gt;Things&lt;/a&gt; Elegant and simple task management application.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.transmissionbt.com/"&gt;Transmission&lt;/a&gt; BitTorrent client.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.chimoosoft.com/products/tubetv"&gt;TubeTV&lt;/a&gt; Rip YouTube and Flash videos to disk.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Plugins for Mail.app:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.indev.ca/MailActOn.html"&gt;Mail Act-On&lt;/a&gt; Control Mail.app with your keyboard.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.indev.ca/MailTags.html"&gt;Mail Tags&lt;/a&gt; Adds Tagging to Mail.app. I love this plugin as it allows me to classify archived emails with tags rather than using different mail folders.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I don’t longer use these applications, that were still on my last list:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.iconus.ch/fabien/cocoabooklet"&gt;Cocoabooklet&lt;/a&gt; Booklet printing is now supported directly by Preview.app.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sente.ch/software/GPGMail/English.lproj/GPGMail.html"&gt;GPGMail Plugin&lt;/a&gt; Still no SnowLeopard compatible version available. Also it seems that SMIME is much more popular for signing and encrypting email these days.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.red-sweater.com/marsedit"&gt;MarsEdit&lt;/a&gt; Excellent Blog post editor, but I switched static website generator for blogging, which makes MarsEdit obsolete.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.omnigroup.com/applications/omnifocus"&gt;OmniFocus&lt;/a&gt; In my opinion an over-hyped GTD-inspired TODO list manager, that is too clumsy and overloaded with features. I like Things much better.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver"&gt;Quicksilver&lt;/a&gt; Obsoleted by LaunchBar.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sshkeychain.org"&gt;SSH Keychain&lt;/a&gt; In recent OS X versions, the SSH version shipped with OS X has gained basically the same functionality.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.videolan.org/vlc"&gt;VLC Videoplayer&lt;/a&gt; For years I haven’t met a video file that QuickTime player X with the Perian plugins cannot play.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.plesslweb.ch/post/6629084891</link><guid>http://blog.plesslweb.ch/post/6629084891</guid><pubDate>Wed, 31 Mar 2010 00:00:00 +0200</pubDate><category>mac</category><category>software</category><category>tip</category></item><item><title>New wkpdf implementation released</title><description>&lt;p&gt;&lt;strong&gt;Edit 17 June 2011: Updated installation command&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I happy to announce wkpdf version 0.3.0 - a new implementation of wkpdf, on which I have been working over the last months.&lt;/p&gt;

&lt;p&gt;This version does not provide any major, user-visible features but is mainly a re-implementation in the &lt;a href="http://www.ruby-lang.org/en"&gt;Ruby&lt;/a&gt; programming language. Since Mac OS X 10.5 Apple ships the operating system with a full Ruby installation and also includes the RubyCocoa bridge for interfacing Ruby code with Cocoa and the OS X Frameworks. wkpdf uses this bridge for accessing the WebKit framework for rendering HTML as PDF.&lt;/p&gt;

&lt;p&gt;The new wkpdf version provides the same features as the previous Objective-C version of wkpdf, but provides a simpler installation procedure. Also, the source code of the project is now hosted on &lt;a href="http://github.com"&gt;github.com&lt;/a&gt; and I hope that this will encourage other developers to contribute to wkpdf.&lt;/p&gt;

&lt;p&gt;For the impatient among you, you can install wkpdf with the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
sudo gem install wkpdf
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more information about wkpdf and how to use it, please refer to the brand new wkpdf website at &lt;a href="http://plessl.github.com/wkpdf"&gt;&lt;a href="http://plessl.github.com/wkpdf"&gt;http://plessl.github.com/wkpdf&lt;/a&gt;&lt;/a&gt;. Developers can browse wkpdf’s latest source code and clone or fork the wkpdf git repository at &lt;a href="http://github.com/plessl/wkpdf/tree/master"&gt;&lt;a href="http://github.com/plessl/wkpdf/tree/master"&gt;http://github.com/plessl/wkpdf/tree/master&lt;/a&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you enjoy the new version and I’m looking forward to your feedback.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6629056497</link><guid>http://blog.plesslweb.ch/post/6629056497</guid><pubDate>Sat, 25 Jul 2009 00:00:00 +0200</pubDate><category>mac</category><category>rubycocoa</category><category>wkpdf</category><category>pdf</category><category>webkit</category></item><item><title>BibTeX style for sorting in reverse chronological order</title><description>&lt;p&gt;When preparing a list of my publications, I had the wish to sort the publications in reverse chronological order. While this seems like quite a common task to me, I couldn’t find any BibTeX style that will do this trick. There is however the &lt;em&gt;plainyr.bst&lt;/em&gt; style which is similar to the standard &lt;em&gt;plain.bst&lt;/em&gt; BibTeX style, but sorts the entries in ascending chronological order.&lt;/p&gt;

&lt;p&gt;Based on this style I created &lt;em&gt;plainyr-rev.bst&lt;/em&gt; which uses plain formatting, i.e., the references are simply numbered, and sorts the references with the most recent references first.&lt;/p&gt;

&lt;p&gt;You can download this style from my &lt;a href="http://github.com/plessl/latex-goodies/tree"&gt;latex-goodies&lt;/a&gt; git repository at &lt;a href="http://github.com"&gt;github.com&lt;/a&gt;. If you are not a git user yet, you can get a tarball of the files by using the &lt;em&gt;download&lt;/em&gt; button.&lt;/p&gt;

&lt;p&gt;I hope you find this style useful.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628963116</link><guid>http://blog.plesslweb.ch/post/6628963116</guid><pubDate>Fri, 30 Jan 2009 00:00:00 +0100</pubDate><category>BibTeX</category><category>publications</category></item><item><title>Book Review: Paul Davies - "The Cosmic Jackpot"</title><description>&lt;p&gt;It’s been a couple of weeks since I’ve finished reading the book “Cosmic Jackpot” by Paul Davies (ISBN: 978-0618592265) and I’m still impressed by this wonderful book. Paul Davies is physicist and cosmologist and has written a number of popular science books on cosmology. In “The Cosmic Jackpot” Davies discusses one of the fundamental questions of cosmology and philosophy: “Why is the universe fit for life?”&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lmy876yYNj1qzliu7.jpg" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Before discussing possible answers of why the universe allowed for the development of life, Davies’ book takes the reader on a journey and explains the basic concepts of particle physics and cosmology. While I’ve read a number of articles on these and related topics, I think the Davies’ explanations are much more clear and to the point than many other articles. Davies has an unusual talent of giving the reader an introduction almost without any mathematics, but avoids falling into the trap of oversimplifying the topics.&lt;/p&gt;

&lt;p&gt;Davies explains the development of the universe from the big bang to today. He explains why the development of life in the universe critically depends on specific properties of the universe, for example the distribution of mass after the big bang, the weight of subatomic particles, or the value of certain physical constants. Thought experiments of physicists have shown, that if these properties would differ only sightly from their actual values, the development of life as we observe it today would be impossible. Consequently, the development of life could have been pure coincidence.&lt;/p&gt;

&lt;p&gt;This observation has puzzled numerous physicists and philosophers. Some have rejected the idea of life being a product of coincidence, some have been motivated to work on theories that explain the existence of life in the universe, without blaming it on pure coincidence. Over the course of the book Davies introduces a number of these theories that range from “everything is coincidence” over the “multiverse theory” that predicts an infinite number of parallel universes, an explanation relying on an external god-like creator to the belief that the universe is only a projection of our mind. Being a physicist by profession Davies stresses the theories that base on a solid mathematical foundation. But he also provides some insightful discussions of the more philosophical or even religious approches for an explanation of life from the perspective of a scientist.&lt;/p&gt;

&lt;p&gt;I found reading the book very inspiring. It provides a readable and entertaining introduction to cosmology and discusses some of the recent ideas on how the universe can be explained. I can highly recommend reading this book.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628927784</link><guid>http://blog.plesslweb.ch/post/6628927784</guid><pubDate>Sun, 24 Feb 2008 00:00:00 +0100</pubDate><category>book</category><category>review</category></item><item><title>Automating tracking of outgoing links with Google Analytics</title><description>&lt;p&gt;&lt;a href="http://www.google.com/analytics/"&gt;Google Analytics (GA)&lt;/a&gt; is a handy tool for generating access statistics for your website. One drawback of GA is that it does not automatically registers clicks to outgoing links on your website. But the information which links have been clicked can be very interesting, e.g., for determining whether the user has downloaded a file on your website or to which site the user has navigated when leaving your page.&lt;/p&gt;

&lt;p&gt;Fortunately GA allows for tracking a click on a link manually by attaching to each link that should be tracked a &lt;code&gt;onclick&lt;/code&gt; JavaScript action which calls the function &lt;code&gt;urchinTracker(arg)&lt;/code&gt;. GA stores the argument “arg” that is supplied to this function.&lt;/p&gt;

&lt;p&gt;Hence, for tracking outgoing links there are two possiblities: a) add a JavaScript onclick action to all links, or b) generate the onclick action automatically with some JavaScript magic, like will explain in the following recipe:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Download the JQuery libary from &lt;a href="http://www.jquery.org"&gt;&lt;a href="http://www.jquery.org"&gt;http://www.jquery.org&lt;/a&gt;&lt;/a&gt;. The following examples assume, that the library is installed under the relative path “js/jquery.js”.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the following JavaScript code to the header of your HTML page:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;
&lt;code&gt;
    &lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
    
    $(document).ready(function() {
      $("a.track").click(function() {
        var prefix = "link/"
        var msg = $(this).attr("href");
        re = /^(\w+):\/\//;
        tracking_url = msg.replace(re,"$1/");
        urchinTracker(prefix + tracking_url);
      });
    });
    &lt;/script&gt;
&lt;/code&gt;
&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Add a class=”track” attribute to each link (&lt;code&gt;&lt;a&gt;&lt;/code&gt; element) that shall be tracked, for example: &lt;code&gt;&lt;a href="http://www.test.org/lib/paper1.pdf" class="track"&gt;PDF&lt;a&gt;&lt;/code&gt;. Since links can be assigned an arbitrary number of class attribute this method can be applied universally.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The required onclick action is dynamically generated using JQuery. The use of JQuery ensures that this method works with all major web browsers. The onclick action that calls Google Analytic’s link tracker is only added for elements that have a &lt;code&gt;class="track"&lt;/code&gt; attribute. These elements are selected by the XPath expression &lt;code&gt;a.track&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The argument for the link tracker is generated from href attribute of the URL. The URL is reformatted, such that it looks like a path. Additionally, the URLs are prefixed with a path component that specifies the protocol. For example &lt;code&gt;&lt;a href="http://www.test.org/lib/paper1.pdf"&gt;http://www.test.org/lib/paper1.pdf&lt;/a&gt;&lt;/code&gt; is transformed to the “path” &lt;code&gt;link/http/www.test.org/lib/paper1.pdf&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now everything should be setup fine and you will be able to track clicks to your outgoing links in Google Analytics.&lt;/p&gt;

&lt;p&gt;While this method is a significant improvement over the default behavior of Google Analytics, it is still not perfect. Tracking the download of document only works if the user is loading the document directly in the browser by clicking on the link. If the user instead uses the “Save as..” action of the context menu or just copies the URL and downloads the file otherwise, the download will not be registered. One solution would be the use of download wrappers, as they are used by sourceforge and others, but I find these wrappers annoying. If you have an idea how to improve the proposed method without using wrapper pages, please let me know in the comments.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628856095</link><guid>http://blog.plesslweb.ch/post/6628856095</guid><pubDate>Mon, 22 Oct 2007 00:00:00 +0200</pubDate><category>google</category><category>analytics</category><category>jquery</category><category>link</category><category>tracking</category></item><item><title>Painless Migration of Emails from Outlook Express to Apple's Mail.app</title><description>&lt;p&gt;I would like to share a tip with you that is particularly handy for switchers, when migrating from Windows to the Mac. If you are using Microsoft Outlook Express on Windows, you will find out soon, that Outlook Express does not provide a convenient way to export all your emails downloaded from your POP email account to a standard format in one batch.&lt;/p&gt;

&lt;p&gt;With this recipe, you will be able to easily export your emails from Outlook Express and import them to Apple’s Mail.app but also to almost any other email program. The trick is to migrate the emails using an intermediary IMAP email account.&lt;/p&gt;

&lt;h2&gt;A short primer to POP and IMAP email accounts&lt;/h2&gt;

&lt;p&gt;Most free email services only support the &lt;a href="http://en.wikipedia.org/wiki/Post_Office_Protocol"&gt;POP&lt;/a&gt; protocol for accessing  emails. When accessing your email with POP, your email client downloads every new email from the email server of your provider first. The emails are stored only on your local computer. This is an advantage for your email provider because the provider must not provide storage space for all of your emails on his server but only a rather small storage for buffering your new emails until your email program downloads them. For you as user POP has a number of disadvantages. The most serious disadvantage is that you can store your emails only on one computer because the emails are removed from the server at retrieval.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol"&gt;IMAP&lt;/a&gt; is the much more powerful successor to POP. With an IMAP email account, all emails stay on the server and your email client is only downloading a copy of the emails. This allows you, to access your emails from multiple computers, for example, at home, at the office and with webmail, without every having to worry about synchronization. You can even create mail folders on the IMAP server, which are also synchronized between all email clients. While IMAP is a big advantage for you, IMAP consumes more storage and computing resources at your email provider, since all of your emails are stored on the server. This is the reason, why most free email services don’t offer IMAP accounts.&lt;/p&gt;

&lt;p&gt;Since POP and IMAP are widely used, almost every email client—even Outlook Express—support both protocols.&lt;/p&gt;

&lt;h2&gt;Migrating Emails using an intermediary IMAP account&lt;/h2&gt;

&lt;p&gt;Given this preliminaries about IMAP, you will probably already guess how emails can be exported from Outlook Express. Yes, we will use an intermediary IMAP account for that. Outlook Express allows for moving and copying Emails between accounts, hence we can move all emails from a POP mailbox and local mail folders to an IMAP account and vice versa:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;The first thing you need is an email account with IMAP support. For example, the following providers offer free IMAP email accounts: &lt;a href="http://www.gmx.net"&gt;GMX&lt;/a&gt;, &lt;a href="http://www.fastmail.fm"&gt;FastMail&lt;/a&gt; or &lt;a href="http://webmail.aol.com/"&gt;AIM Mail&lt;/a&gt;. The services differ mainly in the size of the IMAP storage space that is offered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After creating for your IMAP account, you need to &lt;a href="http://www.microsoft.com/windows/ie/ie6/using/howto/oe/setup.mspx"&gt;add this account&lt;/a&gt; to Outlook Express. Start Outlook Express and choose Option “Accounts” from the “Tools” menu. Click “Add” “Mail…” to bring up the Internet connection wizard. Here you need to fill in the name of the data for your email server, which you have received from your email provider.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you are ready to start the migration. Outlook Express will show both email accounts, your old POP account and your new IMAP account. You can start moving emails from your POP account to your new IMAP account with drag and drop. You can also move local folders to the IMAP account. Be patient, uploading your emails to the IMAP server can take a long time, since the Internet uplink for DSL and Cable modems is generally much slower than the downlink.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After you have moved (or copied) all of your emails to the IMAP server, you need to setup your IMAP account also in Apple Mail.app (or any other Email client). You add a new mail account in the “Account” preference pane of Mail. Mail will then import all emails from your IMAP account. If you chose to use the new IMAP account and the corresponding email address as your standard account, you are done now. If you would like to stick to your previous POP email account, continue with the next step.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup your POP account in Mail. You can now move email from your IMAP account to the Inbox of your POP account. A local mail folders can be created with the menu “Mailbox” → “New Mailbox…”. Chose location “On My Mac” to make the folder local. You can now move emails from the intermediary IMAP account to your local folders.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I hope you find this hint useful. I know that the hint is obvious once you know it. But I have wasted way too many hours helping some of my friends migrating their Outlook Express email with other methods, before coming up with this idea.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628786445</link><guid>http://blog.plesslweb.ch/post/6628786445</guid><pubDate>Tue, 03 Jul 2007 00:00:00 +0200</pubDate><category>mac</category><category>Mail.app</category><category>tip</category><category>IMAP</category><category>migration</category></item><item><title>Setting up LaTeX on Mac OS X</title><description>&lt;p&gt;&lt;small&gt;&lt;strong&gt;Update (21 Sep 2007):&lt;/strong&gt; TextMate’s LaTeX bundle has been significantly improved and can now be configured using a Preferences dialog which is available from the Gear menu. My recommended preferences: set default Engine to pdflatex, enable use Latexmk.pl, set “View in” to Skim, enable  “Show PDF automatically” and “Keep log window open”.&lt;br/&gt;
I will write an updated article that includes all these changes when time permits.
&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;strong&gt;Update (3 Aug 2007):&lt;/strong&gt; PDFView, the PDF viewer application that has been  recommended in a previous version of this article been discontinued. I have updated the article to use the &lt;a href="http://skim-app.sourceforge.net/"&gt;Skim&lt;/a&gt; viewer, which is an  excellent replacement for PDFView.
&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;For using LaTeX on any computer system, you need 3 essential pieces of software:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;a text editor for editing your LaTeX source files,&lt;/li&gt;
&lt;li&gt;the LaTeX program for processing your LaTeX source files into typeset PDF documents, and&lt;/li&gt;
&lt;li&gt;a PDF viewer program for previewing and printing your documents.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;There are plenty of text editors, PDF previewers and LaTeX distributions available for Mac OS X platform.&lt;/p&gt;

&lt;p&gt;My suggestion is to base your LaTeX environment on the &lt;a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X"&gt;TextMate&lt;/a&gt; editor. TextMate is not only a highly customizable, general purpose text editor, it also provides excellent LaTeX support and integrates tightly with the Skim previewer. This combination of tools, lets you use LaTeX in a convenient and Mac-like way.&lt;/p&gt;

&lt;h1&gt;Installing the software&lt;/h1&gt;

&lt;h2&gt;Install LaTeX&lt;/h2&gt;

&lt;p&gt;LaTeX is open-source software, hence you can download and install LaTeX for free. If you are already using &lt;a href="http://www.macports.org/" title="MacPorts"&gt;Macports&lt;/a&gt; or &lt;a href="http://finkproject.org/" title="Fink - Home"&gt;Fink&lt;/a&gt; for installing Unix software under OS X, I recommend to install LaTeX using these package managers. Macport users install LaTeX with &lt;tt&gt;port install tetex&lt;/tt&gt;, Fink users use the command &lt;tt&gt;fink install tetex&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;If you are neither using Macports nor Fink, I recommend to download  &lt;a href="http://www.tug.org/mactex/" title="MacTeX LaTeX distribution"&gt;MacTeX&lt;/a&gt;, which is a precompiled LaTeX distribution for OS X. MacTeX provides a full LaTeX installation plus a number of additional tools. Quoting from the MacTex website:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;MacTeX.dmg is an install package for Apple’s installer. The package contains
  the complete TeX Live 2007 distribution of TeX, Ghostscript, ImageMagick, and
  the following front end programs : TeXShop, LaTeXiT, BibDesk, Excalibur, and
  i-Installer. A custom install option allows users to bypass some of these
  packages if desired.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Install Skim&lt;/h2&gt;

&lt;p&gt;I highly recommend to use Skim for viewing PDF files generated by LaTeX, since it supports tight integration with your LaTeX text editor. Skim is also an open-source application can be downloaded from the &lt;a href="http://skim-app.sourceforge.net/"&gt;Skim website&lt;/a&gt;. Download and install Skim. Open Skim’s preferences dialog, select the &lt;em&gt;Sync&lt;/em&gt; tab and make sure that the “Check for file changes” option is enabled and that PDFSync support is set to the TextMate preset.&lt;/p&gt;

&lt;h2&gt;Install TextMate&lt;/h2&gt;

&lt;p&gt;TextMate is a popular text editor for OS X. While the editor itself is commercial, TextMate has a very lively open-source developer community that provides extensions, called bundles, for many different purposes. By default, TextMate ships with an excellent LaTeX bundle. You can download a free trial version from the &lt;a href="http://macromates.com"&gt;Textmate Website&lt;/a&gt; and purchase a full version for 39€.&lt;/p&gt;

&lt;p&gt;For my recommended setup you need to set a few preferences for TextMate and the  LaTeX bundle. Open TextMates Preferences dialog and make the following settings:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;In the &lt;em&gt;Software Update&lt;/em&gt; dialog, enable automatic updates to the &lt;em&gt;Cutting-Edge&lt;/em&gt; version for TextMate. This configures TextMate to update always to the latest versions of the application and the bundles. Don’t be affraid, TextMate’s cutting-edge versions are generally very stable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the &lt;em&gt;Advanced&lt;/em&gt; menu and select the &lt;em&gt;Shell Variables&lt;/em&gt; tab. Use the plus button to add two variables named &lt;tt&gt;TM_LATEX_COMPILER&lt;/tt&gt; and &lt;tt&gt;TM_LATEX_VIEWER&lt;/tt&gt;. Set &lt;tt&gt;TM_LATEX_COMPILER&lt;/tt&gt; to the value “latexmk.pl” and set &lt;tt&gt;TM_LATEX_VIEWER&lt;/tt&gt; to “Skim” (both without double quotes).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Your LaTeX editing environment is now setup and ready to be used.&lt;/p&gt;

&lt;h1&gt;Edit and compile your LaTeX documents to PDF&lt;/h1&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Run TextMate and start editing your LaTeX document. You may either start from an empty file or use one of the templates provided in the “File → New from Template → LaTeX” menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can see the actions provided by the LaTeX bundle by clicking the &lt;em&gt;gear symbol&lt;/em&gt; in the status bar &lt;img src="http://media.tumblr.com/tumblr_lmy7qjWlpN1qzliu7.png" alt="Textmate Gear"/&gt; and selecting the LaTeX bundle. Each command is also labeled with its keyboard shortcut.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure, that the &lt;em&gt;LaTeX language mode&lt;/em&gt; is enabled. You can select the language mode in the dropdown menu of TextMate’s status bar.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="padding: 5px; text-align: center;"&gt;
&lt;img src="http://media.tumblr.com/tumblr_lmy7qwUUDH1qzliu7.png" alt="TextMate Statusbar"/&gt;&lt;/div&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;For compiling your document with LaTeX press ?R. Alternatively, you could also select “Typeset &amp; View PDF” in the LaTeX bundle menu. TextMate shows the log messages, warnings and errors generated during the compilation in a popup window. TextMate automatically opens Skim if the LaTeX compilation was successful.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If errors were raised during compilation, you can jump to the respective line in your LaTeX source by clicking on the error message in the compilation popup window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For enabling the integration of TextMate and Skim you need to use the &lt;em&gt;pdfsync&lt;/em&gt; package by including &lt;tt&gt;\usepackage{pdfsync}&lt;/tt&gt; in the preamble of your document. With pdfsync enabled you can press ???O (or use the bundle’s “Show in PDFViewer (pdfsync) command”) to jump to the matching place in the PDF file. Vice versa, when Shift-Command-clicking on a location in Skim TextMate is showing the matching paragraph in the LaTeX source.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detailed documentation on the LaTeX bundle and its configuration is available with the “Help” action of the LaTeX bundle.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h1&gt;Various remarks:&lt;/h1&gt;

&lt;ul&gt;&lt;li&gt;TextMate provides very good support for UTF8 encoded text. If you are writing LaTeX texts in languages requiring accented letters or umlauts, you should add the following preamble to your document (replace french with your language):
&lt;br/&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc} 
&lt;/pre&gt;

&lt;p&gt;The &lt;em&gt;inputenc&lt;/em&gt; package allows you to directly type accented characters in the LaTeX source, i.e., you can simply type &lt;tt&gt;ä&lt;/tt&gt; instead of &lt;tt&gt;"a&lt;/tt&gt;. Further, the fontenc package ensures that hyphenation also works with words with accented letters.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Since PDF is the standard file format for vector graphics and text in OS X it is natural to use the PDF-based pdflatex tool-flow, as suggested in this article. This implies, that all the graphics you are including with &lt;tt&gt;\includegraphics&lt;/tt&gt; in the LaTeX document are expected to be also in PDF format.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.plesslweb.ch/post/6628716250</link><guid>http://blog.plesslweb.ch/post/6628716250</guid><pubDate>Mon, 02 Apr 2007 00:00:00 +0200</pubDate><category>LaTeX</category><category>Skim</category><category>software</category><category>TextMate</category><category>tip</category></item><item><title>MailTags for Apple's Mail.app</title><description>&lt;p&gt;&lt;a href="http://www.indev.ca/MailTags.html"&gt;MailTags&lt;/a&gt; is an incredibly useful tool that could be the envy of your friends running other operating systems. MailTags allows you to add custom tags, priorities, deadlines and notes to email messages. The upcoming MailTags 2.0 (which is now in the beta testing phase) stores these additional attributes to emails not in a proprietary database, but in the email itself by modifying the email’s headers on the IMAP server. MailTags also extends the SmartMailboxes of Mail.app with the capability to use the MailTags information (keywords,priority, etc.) as search criteria.&lt;/p&gt;

&lt;p&gt;So far, my main application for MailTags is to get rid of a large collection of subfolders for archiving my email but preventing the chaos of one big unstructured archive folder. My new approach is to tag the email with suitable keywords and store all emails I would like to keep in the same archive mail folder. Using SmartFolders I can now create archive mailfolders that group archived emails based on selected keywords. Since a message can have multiple keywords, messages can be part of many smart archive folders. Hence, this approach nicely solves the problem that it is hard to uniquely assign each email a distinct archive folder and prevents the potential chaos of a large, unstructured archive folder.&lt;/p&gt;

&lt;p&gt;Brett Porter has written a nice &lt;a href="http://blogs.maven.org/brett/2007/03/27/1174952842271.html"&gt;blog entry&lt;/a&gt; on his personal MailTags setup which is tightly integrated with &lt;a href="http://www.indev.ca/MailActOn.html"&gt;MailActOn&lt;/a&gt;. MailActOn is another indispensable Mail.app plugin, which I use heavily. It allows you to define custom hot-key commands for Mail.app. I think I will borough a couple of Brett’s ideas to improve my personal email workflow.&lt;/p&gt;

&lt;p&gt;If you are also using MailTags and MailActOn in some interesting way, I would be glad to learn more about it in the comments to this post.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628574466</link><guid>http://blog.plesslweb.ch/post/6628574466</guid><pubDate>Tue, 27 Mar 2007 00:00:00 +0200</pubDate><category>email</category><category>mail.app</category><category>productivity</category><category>tagging</category><category>pluging</category><category>mac</category></item><item><title>Book Review: "The Undercover Economist" by Tim Harford</title><description>&lt;p&gt;&lt;strong&gt;The Undercover Economist&lt;/strong&gt; by Tim Harford
ISBN 978-0316731164&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lmy7ldGgkr1qzliu7.jpg" alt="Undercover Econ Us"/&gt;&lt;/p&gt;

&lt;p&gt;Recently, a couple of economics books that address the layman without prior knowledge in economics have been published. After their success in the US, these books have reached also Europe’s bookstores. The authors set out to prove the prejudice that economics is a dull and boring subject wrong.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.timharford.com/"&gt;Tim Harford&lt;/a&gt; is a columnist for the &lt;a href="http://www.ft.com"&gt;Financial Times&lt;/a&gt;. His book &lt;a href="http://www.amazon.de/gp/product/0316731161?ie=UTF8&amp;tag=plesslwebch-21&amp;linkCode=as2&amp;camp=1638&amp;creative=6742&amp;creativeASIN=0316731161"&gt;The Undercover Economist&lt;/a&gt; is one of the notable books targeted at laymans in economy and definitely proves that economics is neither dull nor boring. On the contrary, &lt;em&gt;The Undercover Economist&lt;/em&gt; does a brillant job in explaining some important principles in economics better than the textbooks we used when I studied economics in high-school. The greatest strength of the book is its use of non-contrived, everyday examples, that illustrate that these principles are actually playing an important role in our daily lives.&lt;/p&gt;

&lt;p&gt;Throughout the book you will learn, for example, why Starbucks charges you ridiculous prices for mediocre coffee, how the daily traffic jams in world’s metropolis could be avoided, and how China managed to rapidly develop into an industrialized nation.&lt;/p&gt;

&lt;p&gt;Readers from Switzerland will enjoy the chapter on insurances and adverse selection, where Harford discusses the advantages of a mandatory health insurance system (as it exists in Switzerland) and explains why a voluntary healthcare insurance system is unlikely to work. Another chapter I enjoyed reading is the chapter on the auctions for UMTS mobile telephony licenses. The initiators of the Swiss UMTS auction would have profited a lot from reading the respective chapter in &lt;em&gt;The Undercover Economist&lt;/em&gt;. Instead of the expected amount of 8 billion CHF (about 5 billion Euro) the Swiss UMTS auction made only 200 million CHF, which was the minimal bid for the 4 licenses. Using the knowledge from the book it is easy to see, why this auction was seriously flawed. First, the minimum price for a license was set much to low, given that estimated value of the licenses was 8 billion CHF. Second, there was not sufficient competition for the licenses. Only 5 companies were competing for 4 licenses. During the auction two competitors merged, leaving only 4 competitors for 4 licenses. Hardly a good precondition for a successful auction.&lt;/p&gt;

&lt;p&gt;I can highly recommend reading &lt;em&gt;The Undercover Economist&lt;/em&gt;. Harford manages to make the way how economists think accessible to the layman, without ever being boring. Compared to Steven Levitt’s book &lt;a href="http://href=" http:&gt;Freakonomics&lt;/a&gt;. &lt;em&gt;The Undercover Economist&lt;/em&gt; provides in my opinion more general insights into economics, while Levitt’s book is quite entertaining but provides little knowledge of long-term value.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628501838</link><guid>http://blog.plesslweb.ch/post/6628501838</guid><pubDate>Tue, 30 Jan 2007 00:00:00 +0100</pubDate><category>book</category><category>review</category></item><item><title>Wrapper Script for Java Command-Line Applications</title><description>&lt;p&gt;Java applications with a command-line interface (CLI) are typically started with a shell script wrapper. This  wrapper sets up the environment for the Java application, specifies the JVM that is going to be used, and finally starts the application.&lt;/p&gt;

&lt;p&gt;Recently, I learned the hard way, that writing a shell script wrapper for a Java application is not trivial. My application, denoted as myapp in this example, uses the following common directory layout:&lt;/p&gt;

&lt;pre&gt;
myapp/
 bin/
    myapp
 lib/
    vendor.jar
 ch/
   plesslweb/
     myapp/
       CLI.class
       other.class
       ...  
&lt;/pre&gt;

&lt;p&gt;The wrapper used for starting the application is located in the &lt;tt&gt;bin/&lt;/tt&gt; directory. The &lt;tt&gt;lib/&lt;/tt&gt; directory contains all libraries that are used by myapp as JAR archives. When running the application, these libraries need to be added to the classpath. The root for the application’s class files is the installation directory, i.e., the classes live in &lt;tt&gt;ch/plesslweb/myapp/…&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Without a wrapper script, the application will be started with a command like the following (assuming that myapp is installed in directory &lt;tt&gt;/opt/myapp&lt;/tt&gt;):&lt;/p&gt;

&lt;pre&gt;
java -cp /opt/myapp -cp /opt/myapp/lib/vendor.jar ch.plesslweb.myapp.CLI arg1 arg2 arg3
&lt;/pre&gt;

&lt;p&gt;Note, that above command uses absolute paths to specify the classpath. Relative paths can be used only, if the current working directory when running the command is known in advance.&lt;/p&gt;

&lt;p&gt;This problem is solved with a wrapper, that allows for starting the application either by calling the wrapper ‘myapp’ in the bin/ directory directly, or by calling the wrapper indirectly, i.e., by executing a symbolic link to ‘myapp’. Using a symbolic link to the application is convenient, if the user cannot or does not want to install the application in a system directory. Instead, myapp can be installed anywhere in the filesystem and a symbolic link to the wrapper is placed in a directory that is included in the user’s &lt;tt&gt;PATH&lt;/tt&gt;. Many popular Java applications such as Maven and Ant use this approach.&lt;/p&gt;

&lt;p&gt;The following shell script can serve as a boilerplate for your own Java application wrapper. The script contains code fragments that I have extracted from &lt;a href="http://maven.apache.org"&gt;Maven’s&lt;/a&gt; wrapper (mvn). The wrapper serves two main functions: a) it allows for setting up variables used in the wrapper by providing system and user-specific configurations, and b) it determines the installation path of the application:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;In this example, the user has 3 ways of specifying a non-standard name for the Java interpreter: either in a system-wide configuration file (/etc/myapprc), in a user-specific configuration file (~/.myapprc) or using the JAVACMD environment variable. The configuration files are sourced in the wrapper, i.e., JAVACMD can be specified by adding a line like “JAVACMD=/opt/bin/myjava” to the configuration file. If JAVACMD is not set explicitly, the wrapper uses ‘java’ as default.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The installation path of the application is determined and stored in &lt;tt&gt;MYAPP_HOME&lt;/tt&gt;. First, if the wrapper is executed via a symbolic link, the link is resolved. If the link points to another symbolic link, this procedure is repeated until the final non-link target of the link is reached. In a second step, the resulting path is converted to an absolute path (&lt;tt&gt;MYAPP_HOME&lt;/tt&gt;). This variable can now be used for conveniently specifying paths relative to the installation directory. For example, the library directory can be specified as &lt;tt&gt;$MYAPP_HOME/lib&lt;/tt&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;
#!/bin/sh

if [ -f /etc/myapprc ] ; then
  . /etc/myapprc
fi

if [ -f "$HOME/.myapprc" ] ; then
  . "$HOME/.myapprc"
fi

if [ -z "$JAVACMD" ] ; then
  # use JAVACMD defined in environment variable or in myapprc
else
  JAVACMD=java
fi

## resolve links - $0 may be a link to application
PRG="$0"

# need this for relative symlinks
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-&gt; \(.*\)$'`
  if expr "$link" : '/.*' &gt; /dev/null; then
    PRG="$link"
  else
    PRG="`dirname "$PRG"`/$link"
  fi
done

# make it fully qualified
saveddir=`pwd`
MYAPP_HOME=`dirname "$PRG"`/..
MYAPP_HOME=`cd "$MYAPP_HOME" &amp;&amp; pwd`
cd "$saveddir"

echo "myapp is installed in $MYAPP_HOME"

MAINCLASS=ch.plesslweb.myapp.Runner
EXEC="$JAVACMD -cp $MYAPP_HOME -cp $MYAPP_HOME/lib/vendor.jar $MAINCLASS $@"

echo $EXEC
exec $EXEC
&lt;/pre&gt;

&lt;p&gt;Edit: 29 Jan 07 — fix style and typos in text.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628462331</link><guid>http://blog.plesslweb.ch/post/6628462331</guid><pubDate>Sun, 28 Jan 2007 00:00:00 +0100</pubDate><category>java</category><category>software</category><category>development</category><category>scripting</category></item><item><title>Essential Mac Software 2007</title><description>&lt;p&gt;The Mac market seems to provide a good ecosystem for innovative software vendors and open-source developers. The following list presents a choice of my favorite MAC applications (in alphabetical order):&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://homepage.mac.com/zenitani/emacs-e.html"&gt;Carbon Emacs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.iconus.ch/fabien/cocoabooklet/"&gt;Cocoabooklet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flip4mac.com/"&gt;Flip4Mac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.kinkless.com/"&gt;Kinkless GTD&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macports.org/"&gt;Macports&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.omnigroup.com/applications/omnigraffle/"&gt;OmniGraffle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.omnigroup.com/applications/omnioutliner/"&gt;OmniOutliner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pdfview.sourceforge.net/"&gt;PdfView&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://quicksilver.blacktree.com/"&gt;Quicksilver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.skype.com/download/"&gt;Skype&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sshkeychain.org/"&gt;SSH Keychain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html"&gt;SuperDuper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ing.unipi.it/~d9615/homepage/texniscope.html"&gt;TeXniscope&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macromates.com/"&gt;TextMate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.videolan.org/vlc/"&gt;VLC Videoplayer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Plugins for Mail.app:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.sente.ch/software/GPGMail/English.lproj/GPGMail.html"&gt;GPGMail Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.indev.ca/MailActOn.html"&gt;Mail Act-On&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.indev.ca/MailTags.html"&gt;Mail Tags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Plugins for Quicktime:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://xiph.org/quicktime/download.html"&gt;Xiph Quicktime Plugins&lt;/a&gt; Quicktime plugins for OGG Vorbis, FLAC, etc.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.plesslweb.ch/post/6628434151</link><guid>http://blog.plesslweb.ch/post/6628434151</guid><pubDate>Tue, 23 Jan 2007 00:00:00 +0100</pubDate><category>mac</category><category>software</category></item><item><title>Processing BibTeX Files with BibTool</title><description>&lt;p&gt;BibTeX can be considered the standard bibliography format for scientific wordprocessing with LaTeX. BibTeX and LaTeX form a very powerful team, but the idiosyncrasies of the BibTeX format (macros, LaTeX syntax, cross-references, and special purpose characters) render automated processing of BibTeX files rather difficult.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.gerd-neugebauer.de/software/TeX/BibTool.en.html"&gt;BibTool&lt;/a&gt; is an excellent tool for processing BibTeX files. BibTool can be used to normalize the citation keys, to add, modify and remove fields, to search and extract certain BibTeX entries and much more. I will show a couple of examples of my uses of BibTool in this article.&lt;/p&gt;

&lt;h2&gt;Reformatting (Pretty Printing) BibTeX files&lt;/h2&gt;

&lt;p&gt;BibTool normalizes the format of BibTeX entries, for example by neatly aligning the field names and contents in columns. You can reformat the bibliography with the following command:&lt;/p&gt;

&lt;pre&gt;
bibtool bib/plessl2007a.bib -o bib/plessl2007a_pretty.bib
&lt;/pre&gt;

&lt;p&gt;There are a number of parameters (e.g. print.indent=n which indents entries to column n) that allow for customizing the pretty printed output.&lt;/p&gt;

&lt;h2&gt;Extracting a single BibTeX entry by key&lt;/h2&gt;

&lt;p&gt;For extracting the BibTeX entry with key “plessl2007a” from bib/plessl.bib the following bibtool command is used:&lt;/p&gt;

&lt;pre&gt;
bibtool -X plessl2007a bib/plessl.bib
&lt;/pre&gt;

&lt;p&gt;BibTeX allows you to define “macros”, i.e., textual replacements, with the &lt;tt&gt;@String&lt;/tt&gt; command, e.g., &lt;tt&gt;@STRING{s-procspie={Proceedings of SPIE} }&lt;/tt&gt;. By default BibTool does not expand macros when extracting entries from the bibliography, but copies the used macros to the output too.&lt;/p&gt;

&lt;p&gt;Macro expansion is enabled by passing the option &lt;tt&gt;expand.macros = ON&lt;/tt&gt; to BibTool as in the following example:&lt;/p&gt;

&lt;pre&gt;
bibtool -X plessl2007a bib/plessl.bib -- 'expand.macros = ON'
&lt;/pre&gt;

&lt;h2&gt;Extracting BibTeX entries used in a specific document&lt;/h2&gt;

&lt;p&gt;BibTool can be used to generate a “minimal” BibTeX file for a given document that contains the BibTeX entries of all references used in a document. To this end, BibTool interprets the &lt;tt&gt;.aux&lt;/tt&gt; file created by LaTeX which contains all information about which BibTeX files and references are used for building this document.&lt;/p&gt;

&lt;p&gt;With the following command, you can create a custom BibTeX file containing all BibTeX entries for the document plessl2007a.tex:&lt;/p&gt;

&lt;pre&gt;
bibtool -x plessl2007a.aux -o plessl2007a.bib -- 'expand.macros = ON'
&lt;/pre&gt;

&lt;p&gt;This function can be useful if you would like to archive only the relevant portions of your bibliography after the final version of a publication has been completed.&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;BibTool is a very powerful tool and my examples only scratched the surface of what BibTool can do. I hope you have enjoyed this brief tour of BibTool and I would be interested to learn about your uses of BibTool in the comments to this article.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628412643</link><guid>http://blog.plesslweb.ch/post/6628412643</guid><pubDate>Tue, 16 Jan 2007 00:00:00 +0100</pubDate><category>BibTeX</category><category>LaTeX</category></item><item><title>Using Subversion Externals for Reusing Bibliographic Information</title><description>&lt;p&gt;Since you will reuse your bibliographic data, that is your BibTeX file, for all publications it makes sense to store your bibliography information in one central place. You may have guessed that I will argue that you should store your bibliography also in a subversion repository. The advantage of this method is that you can integrate the bibliography to the repository &lt;em&gt;by reference&lt;/em&gt; instead of copying it into each paper’s repository.Integrating external repositories by reference is enabled by so-called &lt;em&gt;subversion externals&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let’s assume that my bibliographic information is stored in a repository with the URL  &lt;tt&gt;svn://svn.paperrepo.net/plessl/bibliography&lt;/tt&gt;. To checkout a normal working copy of the repository you would use the command:&lt;/p&gt;

&lt;pre&gt;svn co svn://svn.paperrepo.net/plessl/bibliography&lt;/pre&gt;

&lt;p&gt;For integrating the latest version of the bibliography to the “trunk” directory by reference, you have to add an &lt;tt&gt;svn:externals&lt;/tt&gt; property to the trunk directory:&lt;/p&gt;

&lt;pre&gt;svn propset 'svn:externals'     'bib svn://svn.paperrepo.net/plessl/bibliography' trunk&lt;/pre&gt;

&lt;p&gt;When you update your working copy the next time, a directory called “bib” will be created in “trunk” and the contents of the repository  &lt;tt&gt;svn://svn.paperrepo.net/plessl/bibliography&lt;/tt&gt; will checked out to this directory. Whenever you updated your subversion repository using &lt;tt&gt;svn update&lt;/tt&gt;, the contents of the “bib” directory will be updated to the latest version.Subversion externals provides a flexible way of referencing and integrating other repositories. For example, if you would like to include bibliographic data from multiple authors, you can specify multiple repositories, each on a separate line of the &lt;tt&gt;svn:external&lt;/tt&gt; property. Setting multi-line properties on the command line can be cumbersome. Thus, I suggest to use the  &lt;tt&gt;svn propedit&lt;/tt&gt; command that allows you to edit the property with your text editor.&lt;/p&gt;

&lt;pre&gt;svn propedit 'svn:externals' trunk&lt;/pre&gt;

&lt;p&gt;Now use your editor for editing the property value, e.g.:&lt;/p&gt;

&lt;pre&gt;bib_plessl svn://svn.paperrepo.net/plessl/bibliographybib_mayer  svn://svn.paperrepo.net/mayer/bibliography&lt;/pre&gt;

&lt;p&gt;You customize the editor that is used by setting the &lt;tt&gt;SVN_EDITOR&lt;/tt&gt; environment variable. Otherwise, your default editor as specified by the environment variables &lt;tt&gt;VISUAL&lt;/tt&gt; or &lt;tt&gt;EDITOR&lt;/tt&gt; are used.By default, subversion checks out always the latest revision of the referenced repository. But you can also specify a specific version of the referenced repository instead by including the desired revision number. Using the following &lt;tt&gt;svn:external&lt;/tt&gt; property locks the revision that is checked out into the “bib” directory to revision 1234:&lt;/p&gt;

&lt;pre&gt;svn propset 'svn:externals'  'bib -r 1234 svn://svn.paperrepo.net/plessl/bibliography' trunk&lt;/pre&gt;

&lt;p&gt;This method can be used to freeze the version of the bibliography after the editing process has finished.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628237888</link><guid>http://blog.plesslweb.ch/post/6628237888</guid><pubDate>Fri, 12 Jan 2007 00:00:00 +0100</pubDate><category>BibTeX</category><category>collaboration</category><category>research</category><category>publications</category></item><item><title>File and Directory Layout for Storing a Scientific Paper in Subversion</title><description>&lt;p&gt;In this first article of my &lt;a href="http://tumblr.plesslweb.ch/post/6627999237/collaborative-authoring-of-scientific-papers"&gt;collborative paper authoring series&lt;/a&gt; I’m proposing a directory layout for storing a single paper. The paper is stored in a subversion repository, thus I assume that you are sufficiently familiar with &lt;a href="http://subversion.tigris.org/"&gt;subversion&lt;/a&gt;. A motivation for using subversion and a proposal for storing a whole collection of papers from different authors will be presented in a later installment of this series.&lt;/p&gt;

&lt;p&gt;Storing paper sources in a version control system is essential when multiple authors are editing papers concurrently. But storing your papers in a subversion repository makes sense, even if you are the sole author. In my experience, the general benefits of version control, such as archiving and restoring of different versions for all files, documentation of changes and painless synchronization of data between multiple computers, pay off quickly, even in a single user environment.&lt;/p&gt;

&lt;p&gt;For this article, I’m assuming that your are writing your paper with LaTeX and that you are using a Unix derived operating system. But you may use the same directory layout also for other document types, e.g., Word, Framemaker or Powerpoint.&lt;/p&gt;

&lt;h1&gt;File and Directory Structure for each Paper&lt;/h1&gt;

&lt;p&gt;I’m proposing to use the following directory and file structure for storing the paper and the related resources in the subversion repository. Each paper is assigned a unique identifier (in this example: plessl2007a). This identifier is also used as the name of the directory that contains the paper.&lt;/p&gt;

&lt;pre&gt;
plessl2007a/
   plessl2007a.bib
   plessl2007a.pdf
   trunk/
      Makefile
      plessl2007a.tex
      bib/
         plessl.bib
      data/
         dataset1.txt
      fig/
         fig1.pdf
         fig2.pdf
   tags/
      ...
&lt;/pre&gt;

&lt;p&gt;The paper’s top-level directory stores the final version of the paper (plessl2007a.pdf) as well the bibliography information describing the paper (plessl2007a.bib). These files are added to the top-level directory when the final version of the paper is completed.&lt;/p&gt;

&lt;p&gt;The latest version of the paper is stored in the “trunk” directory. This directory holds the LaTeX sources of the paper (plessl2007a.tex), a directory containing the figures used in the paper and a Makefile for building the paper from source using LaTeX. Additional subdirectories, e.g., a “data” directory for storing experimental results, can be added according to your needs. All changes to the current version of the paper and the related data are made in the trunk directory. Whenever the user feels that the current state of the paper should be archived, the user commits the changes in “trunk” to the subversion repository.&lt;/p&gt;

&lt;p&gt;In addition to “trunk” directory, the top-level directory contains also a “tags” directory that is used to label major revisions of paper. Whenever the paper has passed an important stage of editing (e.g. after it has been submitted for review, a major revision or the final version is completed) a copy of the trunk directory is placed in the tags directory.&lt;/p&gt;

&lt;p&gt;A repository with a “submission” and a “trunk” tag looks like this:&lt;/p&gt;

&lt;pre&gt;
plessl2007a/
   plessl2007a.bib
   plessl2007a.pdf
   trunk/
      Makefile
      plessl2007a.tex
      bib/
         plessl.bib
      data/
         dataset1.txt
      fig/
         fig1.pdf
         fig2.pdf
   tags/
      submission/
          Makefile
          plessl2007a.tex
          bib/
             plessl.bib
          data/
             dataset1.txt
          fig/
             fig1.pdf
             fig2.pdf
      final/
          ...
&lt;/pre&gt;

&lt;p&gt;Tags are created with subversion’s copy command. E.g., after the final version of the paper has been completed, you may create a tag named “final_version” by copying “trunk” to tags/final_version&lt;/p&gt;

&lt;pre&gt;
    svn copy trunk tags/final_version
&lt;/pre&gt;

&lt;p&gt;It must be noted, that subversion stores copies efficiently in the repository. That is, when copying “trunk” to “tags/final_version” the data will not be duplicated in the repository.&lt;/p&gt;

&lt;p&gt;A big advantage of using the &lt;em&gt;same directory layout for all papers&lt;/em&gt;, is that many steps in processing the publications can be automated easily, such running LaTeX to build the paper, publishing all papers to a Webserver, etc.&lt;/p&gt;

&lt;p&gt;You may have noticed, that each directory that stores a copy of the paper contains a “Makefile” for building the paper and a “bib” directory, that contains the author’s bibliographic library in BibTeX format. In the next articles in this series, I will present a generic Makefile for building the paper and I will show you a method for including your bibliographic information (that is stored in another branch of the repository) by reference.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628076310</link><guid>http://blog.plesslweb.ch/post/6628076310</guid><pubDate>Thu, 11 Jan 2007 00:00:00 +0100</pubDate><category>collaboration</category><category>LaTeX</category><category>publications</category><category>subversion</category></item><item><title>Using latexmk and Make for Building LaTeX Documents</title><description>&lt;p&gt;Writing proper Makefiles for building LaTeX documents is a pain, since the steps for creating the final documents depend on the LaTeX features that are used, e.g., BibTeX, makeindex, etc.&lt;/p&gt;

&lt;p&gt;John Collins has written an excellent tool named “latexmk” for processing LaTeX documents. It can be obtained from the &lt;a href="http://www.phys.psu.edu/~collins/software/latexmk-jcc/"&gt;latexmk webpage&lt;/a&gt;. Using “latexmk” simplifies writing a Makefiles for building LaTeX documents drastically, a template Makefile looks like this:&lt;/p&gt;

&lt;pre&gt;
LATEX=pdflatex
LATEXMK=latexmk
LATEXOPT=-file-line-error


MAIN=plessl2007a
SOURCES=$(MAIN).tex Makefile bib/plessl.bib
FIGURES := $(shell ls fig/*.pdf)

all:    $(MAIN).pdf

.refresh:
        touch .refresh

$(MAIN).pdf: $(MAIN).tex .refresh $(SOURCES) $(FIGURES)
        $(LATEXMK) -pdf $(MAIN).tex

force:
        touch .refresh
        $(MAKE) $(MAIN).pdf

.PHONY: clean force all

clean:
        $(LATEXMK) -C $(MAIN).tex
        rm -f $(MAIN).pdfsync
        rm -rf *~ *.tmp
&lt;/pre&gt;

&lt;p&gt;You can use this Makefile for building LaTeX papers that use the file layout proposed in my earlier article &lt;a href="hhttp://tumblr.plesslweb.ch/post/6628076310/file-and-directory-layout-for-storing-a-scientific"&gt;File and Directory Layout for Storing a Scientific Paper in Subversion&lt;/a&gt;. The only change needed is to adapt the &lt;tt&gt;MAIN&lt;/tt&gt; variable to match the identifier of the paper. The Makefile provides the following targets:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
    make
    make clean
    make force
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;make&lt;/tt&gt; builds the PDF file for the paper. &lt;tt&gt;make clean&lt;/tt&gt; removes all temporary and intermediate files. &lt;tt&gt;make force&lt;/tt&gt; forces a rebuild, even if make thinks that you don’t need to rebuild the paper.&lt;/p&gt;

&lt;p&gt;The Makefile assumes that you are using a PDF tool-flow, i.e., you are processing your LaTeX files with pdflatex. This tool-flow implies, that your figures are also stored in PDF format. From my experience, I can wholeheartedly recommend the pdflatex tool-flow, but if you prefer the traditional latex -&gt; dvips -&gt; ps toolflow, the Makefile can be adapted easily.&lt;/p&gt;</description><link>http://blog.plesslweb.ch/post/6628144061</link><guid>http://blog.plesslweb.ch/post/6628144061</guid><pubDate>Thu, 11 Jan 2007 00:00:00 +0100</pubDate><category>collaboration</category><category>LaTeX</category><category>publicationss</category><category>research</category></item></channel></rss>

