In episode #29 of the “Build and Analyze” podcast Marco and Dan discuss the recently changed 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.
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.
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.
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.
The founders of the Paderborn Center for Parallel Computing, 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.
1. System wide “Text and symbol substitution”
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 & 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.
To configure this text substitution open the “Language & 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.
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.
2. Application-specific text substitution (Microsoft Office 2008)
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.
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.
3. Configure Cocoa Keybindings
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 here.
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 ~/Library/KeyBindings/DefaultKeyBinding.dict with the following content:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>^~2</key> <array> <string>insertText:</string> <string>²</string> </array> </dict> </plist>
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 DefaultKeyBindings.dict.
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.
Before LaTeX gained solid support for UTF-8 encoded text, it was common practice in LaTeX sources to use a "-prefix to turn regular letters into umlauts. For example, the letter ‘ä’ is written as "a in this notation.
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 " prefixes add a lot visual noise to the text.
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 inputenc package like this:
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 TextMate 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.
#!/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