Saturday, April 18, 2009

Helvetica, the Swiss font.

I just watched Helvetica. It's a surprisingly interesting documentary. For some reason, I find typesetting more and more interesting as I write my dissertation. Once I put together my first LaTeX document, I was hooked.

Despite all of its quirks, LaTeX produces some pretty slick results. For virtually every problem, somebody has found a solution and posted a package for it. One really neat package is chemscheme. It works in conjunction with the chemcompounds (or bpchem) package to automatically number compounds in the text and schemes. The result is that I can draw a scheme in ChemDraw with temporary labels, include it in my document as an EPS file, and chemscheme will automatically replace the placeholders with the correct compound numbers. Neato!

Customarily, text is set in Times and figures are set in Helvetica while compound numbers are set in bold. In my document, numbers are set as text figures (old-style or lowercase numbers), while math and compound numbers are set as title figures (regular or lining numbers). This causes a problem. In order to switch between the two, I have to switch between the old-style and lining versions of the fonts. chemcompounds provides the \printcompound{} command, which can be redefined to change the formatting, and chemscheme provides the \schemerefformat{} command, which can also be redefined. However, \schemerefformat{} calls \printcompound{}. Therefore, if I change the font in \schemerefformat{} to get Helvetica, it is overridden by the font chosen in \printcompound{} to get lining figures.

Initially, I tried redefining the sans-serif math font to be Helvetica bold and switching to math mode within figures, but this produced strange results whenever the chemcompounds output was used. The final workaround, was to redefine \printcompound{} each time \chemrefformat is called, print the number in the figure and then set \printcompound{} back. It's a bit of a kludge, but it should work with other font combinations as well. The code for use with the kpfonts and helvet packages follows.


Sunday, February 08, 2009


I'm certainly not the first person to do so, but I just set up my first Hackintosh. In the last few years I've become a fan of Apple's OS X, but really can't afford any more of their hardware on a grad-student's budget.
Fortunately, the folks at the OSx86 project have put a lot of effort into getting OS X working on non-Apple hardware. Notably, the MSi Wind netbook.
I had been poking around the Circuit City liquidation last week and spotted some Averatec rebranded Winds. I liked them quite a bit more than the Eee PC 701 that I use around the house and decided to pick up a Wind through Amazon (the liquidation wasn't all that great).
Using the MSIWindOSx86.iso distribution, handy instructions, and pointers from the MSi Wind forums, I've got everything working except for the built-in camera and the audio jacks. Also, probably due to the slipstreaming process, the Character Palette didn't work. However, I was able to resolve the issue by copying the Localization.prefPane and CharacterPalette.component from my iMac and clearing the system caches. Now I've got a little "Mac" for less than half the price of a refurbished Mac Air. Maybe, if I get a real job later this year, I can get the real deal... if I get a real job.

Saturday, January 10, 2009

Miscellaneous and Sundries

Finally, some real snow. I hear a lot of people complain about how cold it is in Pennsylvania, but I disagree. I think that the winters here are far too warm. When it's really cold, like in upstate New York, the only kind of precipitation that you see is snow. And when it's cold enough, the snow doesn't melt on top of your hat. Here I've seen rain, sleet, freezing rain, hail, and snow all within the last month. Of course, all of that stuff melted and refroze when it hit the ground making for treacherous roads and sidewalks. I need to get back up north.
I should have that opportunity soon enough. Yesterday, my boss has said that he wants me gone by the end of the semester. Sounds good to me. The only problem is that the job market is terrible right now. I think I've resigned myself to applying for post-doc positions, as if a million other people weren't going to be doing the same thing. Maybe the big oil companies have a few industrial post-docs open. They're the only ones with any money. On the bright side, the DOE will probably be well funded under the Obama administration.
Now for something completely different: I watched the end of The Office (US) season three last night and it was awesome. I had watched the UK version and loved it, but really been disappointed in the first season of the US remake. It had basically the same scripts as the UK version, but they didn't really fit the style of Steve Carell who had taken over for the brilliantly dry Ricky Gervais (who is now producing). However, I was persuaded to try the second season and it was far better. The writers seem to have taken it in their own direction, a little more slapstick, for US audiences and it works. I'm laughing my head off and still feeling the pathos of the characters. I've grown to like them all and I was totally stoked at the end of season three when Jim asked Pam out to dinner. Now I'm faced with a dilemma. I could go on and watch seasons four and five, which will be hilarious, or I could stop. If I stop now, I'll always believe that Jim and Pam lived happily ever after. Does anybody have any advice?

Thursday, December 11, 2008

Network refugee

Due to the shutdown of the ventilation in the lab, the other grad students and I have been forced to move into the lounge. Although there are network ports at each desk and lab bench, there are none in the lounge. Fortunately, the IT people finally got around to fixing the wireless network in the building.

Unfortunately, my PowerMac G5 (PCIx) didn't come with the optional 802.11g/BlueTooth wireless card installed (the antennas are there, but the actual daughter board is missing). Apple stopped making these some time ago and there are only a few for sale through third-parties for ~$300 each! Sonnet sells a PCI card specifically for PowerPC Macs, but it's pricey at ~$100. Fortunately, the people working on the OS x86 project have a list of PCI wireless cards that are compatible with OS X. Some require patches or driver updates, but most BroadCom based cards work correctly out of the box. I snagged a Linksys WMP54GS from NewEgg for ~$40 and it was detected as a "Third Party Wireless Card" by OS X 10.5.5. The only differences from a real AirPort card are that there is an external antenna (the G5 actually included a tiny external antenna if you bought the wireless option) and there is no 802.1x support.

Connecting to the wireless network was another matter entirely. The department has a wireless network, but it requires 802.1x authentication. The University's wireless network runs in parallel and requires a VPN connection. Until very recently, connecting required the Cisco VPN client, which, in my experience, has been nothing but terrible. It has a wretched user interface that sticks out like a sore thumb for Mac users and constantly drops connections. I was able to make it automatically connect by tweaking the University's .pcf config file, but that was a workaround at best. To add insult to injury, the client installs a kernel extension that hijacks any connection attempts by Apple's VPN client (it can be removed using an uninstall script buried in /usr/bin/). Fortunately, and much to my surprise, the recent deluge of iPhone users on campus has apparently persuaded the ITS people to configure their VPN servers to accept standard connections (although their knowledge base says otherwise). Now I'm using Apple's integrated VPN client and I'm all webbed up to netpages, but I'll never get those hours of my life back. Thanks, Cisco.

Friday, November 14, 2008

Bling crib

I saw the following image of Roger Hiorns' Seizure installation over at Boing Boing and was struck by the beauty of it. The color is nice and I'm sure the artist is challenging perceptions or something, but I love the huge single crystals. I've tried to grow countless crystals for x-ray analysis with very mixed results. People tell me that growing single crystals is more of an art than a science, but one thing of which I am certain is that you need to grow them slowly. That appears to be what the artist did in this case. (It also helps that he wasn't trying to grow air-sensitive organometallic complexes.)

From the photos it appears that the artist waterproofed an apartment in an abandoned building and filled it with 80 kL of hot, saturated copper(II) sulfate (solfato di rame) solution. As the solution cooled, copper(II) sulfate pentahydrate crystallized on every surface in the room. I thought this was timely since I was playing around with copper(II) sulfate today. I dissolved it in water and added sodium carbonate to precipitate copper(II) carbonate. Then I mixed that with excess carbon and heated it in a crucible to smelt metallic copper. Maybe I'll get out the oxygen torch tomorrow and see if I can make silver from that big jar of silver chloride waste in my hood.

More photos can be found here and here.

Wednesday, November 05, 2008

You deserved better, Saul

In September, this blog endorsed Saul Tigh and Laura Roslyn for president. Yesterday's defeat is the manifestation of the libelous rumours that the media has so industriously circulated. They have delivered our fleet right into the jaws of the Cylons. Perhaps the Lords have merely given us the leadership we deserve. In any case, I'm too upset to comment further.

Saturday, November 01, 2008

Mystery lump

Can you guess what this is?

A) Alien face-hugger pod
B) Cow udder
C) Yam
D) Scrotum

ɔ :ɹәʍsuɐ