Archive for October, 2013

Fixing a font problem for XeLaTeX

11 Oct 2013

If the topic sounds boring, well, it is really boring. I write it down here in case it’s useful to someone.

I was working on a talk about git & GitHub, and chose a different font (Helvetica Neue, sort of the default Apple font). I think the default font for LaTeX/Beamer is a bit too tall and thin for slides. Here’s the default:

Slide with default font

And here’s what I wanted:

Slide with Helvetica Neue

But it didn’t work on unix

It worked fine with XeLaTeX on my Mac, but it wasn’t working in Unix, and I’d like the source to be portable to others.

XeLaTex was giving two errors:

Invalid fontname `Helvetica Neue', contains ' '
Font \zf@basefont="Helvetica Neue" at 10.0pt not loadable: Metric (TFM) file
or installed font not found.

It obviously wasn’t finding the font.

I futzed about for an hour, trying to figure out where fonts are located on my Mac, and where fonts are located on Unix, and doing various web searches. But no luck.

How I solved the problem

Finally, I read this post on fonts in xelatex, and following that set of ideas, I figured out what to do.

  • Switch to the TeX Gyre Heros font. It looks just like Helvetica to me.
  • Download
  • On unix, unzip the file (which contains eight .otf files) into ~/.fonts
  • On Mac, unzip the file, double-click the .otf files and select “Install font.” This uses the Font Book application.
  • In the .tex file, use \setsansfont{TeX Gyre Heros}

Not thoroughly tested, but it works on two systems.


It was a really bad idea to use slides in that class

8 Oct 2013

I gave a presentation in the Statistical Consulting course at UW–Madison today. I’ve done so a number of times in the past 6 years. Until today, I’d just spoken informally from a few pages of notes. (Earlier this year, I wrote up those notes as a blog post.)

This year, just 45 min before the class, I thought I’d quickly create some slides to present. I thought it’d be an interesting “experiment” (not in the formal sense):

The outcome was pretty clear: It was easy to create a bunch of bullet-point-based slides. They look nice. (See the pdf here; source here.)

But, the slides themselves worse than useless: Unnecessary, and they interfered with the desired informal nature of the discussion.

I won’t be using those slides again. I’ll go back to just talking from notes.

Fortunately, the students were really good and involved and asked great questions, anyway. So no real harm done.

Better-looking LaTeX/Beamer slides

7 Oct 2013

I like to use LaTeX to make slides for talks, largely because I prefer to write code (rather than use a mouse and menus) for control of things like colors and figure placement.

Most people that use LaTeX to make slides seem to use Beamer, but the resulting slides are usually a bit busy, like this:

Typical beamer slide

I admire Till Tantau for creating Beamer; it was a great idea and it’s been widely adopted. But I don’t like talk outlines at all; I certainly don’t want to see one on every page.

After several days work, I’ve finally figured out how to create LaTeX/Beamer-based slides that look like what I want:

Open Access talk, title page

In this post, I’ll explain what I did.


Complaints about the NIH grant review process

2 Oct 2013

Earlier this week, I met with a collaborator to discuss what to do with our NIH grant proposal, whose “A1” was “unscored” (ie, the revised version, and you don’t get a third try, received a “preliminary score” in the lower half and so was not discussed by the review panel and couldn’t be funded).

NIH proposals are typically reviewed by three people and given preliminary scores on five aspects (significance, approach, investigators, environment, innovation) and overall, and the top proposals based on those scores are discussed and scored by the larger panel.

One of the reviewers gave our proposal an 8 for “approach” (on a scale of 1-9, with 1 being good and 9 being terrible) with the following review comments:

4. Approach:

  • Well described details for mining of [data] and genotyping of [subjects].


  • There is no power analysis for Aim 2. Without knowing which and how many [phenotypes] will be evaluated it is not possible to estimate the statistical power.

Valid comments, but is that really all the reviewer had to say? What about Aims 1 and 3, or the other aspects of Aim 2? That is totally fucking inadequate.

Looking at this review again, I was reminded of how much I despise many aspects of the NIH review process. So it’s led me, finally, to write down some of the things that annoy me.