     for ix in [0...12]
       pitch_number = (ix * 5 + 7) % 12
       root_fingering = pitch_fingers[pitch_number]
+      chord_name = "#{NoteNames[pitch_number]}#{chord.abbr}"
       cell ->
-        ctx.font = '20px Impact'
-        ctx.font = '5pt Times' if draw_diagrams
-        ctx.fillStyle = 'rgb(10,20,30)'
-        ctx.fillText "#{NoteNames[pitch_number]}#{chord.abbr}", h_gutter, -3
         fingerings = []
         for semitones, note_number in chord.offsets
           for {string, fret} in intervals_from(root_fingering, semitones)
             fingerings.push {string, fret, note_number}
         fingerings = best_fingering_for(chord, pitch_number) if best_fingering
-        for f in fingerings
-          f.color = colors[f.note_number]
+        f.color = colors[f.note_number] for f in fingerings
+        ctx.font = '20px Impact'
+        ctx.font = '5pt Times' if draw_diagrams
+        ctx.fillStyle = 'rgb(10,20,30)'
+        ctx.fillText chord_name, h_gutter, -3
         draw_fingerboard fingerings
 
 chord_book = (options) ->
   page_count = options.pages
-  book "Combined Fretboard Chords.pdf", (page) ->
+  book "Combined Fretboard Chords", (page) ->
     for chord, i in Chords
       page -> chord_page chord, options
       break if page_count and i + 1 >= page_count

  page cols * cell_width, header_height + rows * cell_height, (ctx) ->
    i = 0
    draw_page (draw_cell) ->
      ctx.save()
      ctx.translate (i % cols) * cell_width, header_height + Math.floor(i / cols) * cell_height
      draw_cell()


intervals_book = ({by_root}) ->
  if by_root
    book "Fretboard Intervals by Root", (page) ->
      finger_positions_each (fingering) ->
        page -> intervals_from_position_page fingering
  else
    book "Fretboard Intervals", (page) ->
      for _, semitones in Intervals
        page -> intervals_page semitones

chord_fingerings_page = (chord, root_note) ->
  fingerings = fingerings_for(chord, root_note)
  filename "Fingerings"
  grid cols: 10, rows: 10
  , cell_width: padded_fretboard_width + 10
  , cell_height: padded_fretboard_height + 5
  , (cell) ->
    for fingering, i in fingerings
      cell -> draw_fingerboard(fingering)

chord_page = (chord, options) ->
