      (when heading? (heading :h1 :inhalt []))
      (let [entries (-> items keys order
                     (add-extra-headings editorial? recommendation-at-end? single-recommendation?))]
-       (keep #(toc-entry (get items %) (conj path %) depth) entries))]))
+       (map #(toc-entry (get items %) (conj path %) depth) entries))]))
 
 (defn- to-url
   "Return an url given a `record-id`"

  (keyword (str "h" level)))

(defn subgenre-sexp [items fmt genre subgenre level]
  (when-let [items (subgenre items)]
    [(heading (level-to-h level) subgenre [fmt genre subgenre])
     (when-not (#{:kinder-und-jugendbücher} genre)
       (set-marker (layout/translations subgenre)))
     (entries-sexp items)]))

(defn subgenres-sexp [items fmt genre level]
  (mapcat #(subgenre-sexp items fmt genre % level) (order (keys items))))

(defn genre-sexp [items fmt genre level]
  (when-let [items (genre items)]
    [(heading (level-to-h level) genre [fmt genre])
     (set-marker (layout/translations genre))
     (cond
       (#{:kinder-und-jugendbücher} genre) (subgenres-sexp items fmt genre (inc level))
       (#{:hörbuch} fmt) (subgenres-sexp items fmt genre (inc level))
       :else (entries-sexp items))]))

(defn format-sexp [items fmt level]
  (when-let [items (fmt items)]
    [(heading (level-to-h level) fmt [fmt])
     (toc items [fmt] 2)
     (set-marker (layout/translations fmt))
     (case fmt
       (:hörfilm :ludo) (entries-sexp items)
       (mapcat #(genre-sexp items fmt % (inc level)) (order (keys items))))]))

(defn- page-number []
  [:fo:inline

         (md-to-fop (slurp "/home/eglic/src/catalog/samples/editorial.md"))
         (heading :h1 :recommendation [fmt :recommendation])
         (md-to-fop (slurp "/home/eglic/src/catalog/samples/recommendations.md"))
         (mapcat #(genre-sexp (get subitems %) fmt % 1) (order (keys subitems)))])]]))

(defmethod document-sexp :hörbuch
  [items fmt {:keys [description date]}]
