                                                       :recommendation
                                                       :recommendations)] entries)
                      :else entries)]
-       (keep #(toc-entry (get items %) (conj path %) to-depth) entries))]))
+       (keep #(toc-entry (get items %) (conj path %) to-depth indent-depth) entries))]))
 
 (defn- to-url
   "Return an url given a `record-id`"

(defn format-sexp [items fmt level]
  (when-let [items (fmt items)]
    [(heading (level-to-h level) fmt [fmt])
     (toc items [fmt] 3)
     (set-marker (layout/translations fmt))
     (case fmt
       (:hörfilm :ludo) (entries-sexp items)

      (set/subset? items (set layout/subgenres))
      (keep items layout/subgenres))))

(defn- toc-entry [items path to-depth indent-depth]
  (let [depth (count path)]
    [:fo:block (-> {:text-align-last "justify" :role "TOCI"}
                   (cond-> (>= depth indent-depth) (assoc :start-indent "1em")))
     [:fo:basic-link {:internal-destination (hash path)}
      (inline {:role "Reference"} (layout/translations (last path)))
      " " [:fo:leader {:leader-pattern "dots" :role "NonStruct"}] " "
      [:fo:page-number-citation {:ref-id (hash path) :role "Reference"}]]
     (when (and (map? items) (< depth to-depth))
       (keep #(toc-entry (% items) (conj path %) to-depth indent-depth) (order (keys items))))]))

(defn toc [items path to-depth indent-depth & {:keys [heading? editorial? recommendation-at-end? single-recommendation?]}]
  (when (map? items)
    [:fo:block {:line-height "150%"
                :role "TOC"}
