Skip to content

Commit 156e37b

Browse files
authored
Fix list-of-figures / list-of-tables numbering in HTML. (#263)
This uses the new $$lt$$ template variable from pandoc-crossref to render each item as a link, instead of raw text.
1 parent fe3bef5 commit 156e37b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,13 @@ do_md_fixups() {
603603
fi
604604
fi
605605

606+
# Configure lofItemTemplate/lotItemTemplate in the YAML frontmatter.
607+
# These are placed first in the frontmatter so they won't override any existing settings.
608+
# These can't be passed as --metadata since the dollar signs won't expand properly.
609+
# These have no effect on PDF output.
610+
sed -i '0,/^---$/{s//---\nlofItemTemplate: |\n 1. \$\$lt\$\$/}' "${input}"
611+
sed -i '0,/^---$/{s//---\nlotItemTemplate: |\n 1. \$\$lt\$\$/}' "${input}"
612+
606613
# These don't render correctly:
607614
# - The lists are raw text and not clickable entries.
608615
# - The "List of Figures" and "List of Tables" headers show up in the toc

0 commit comments

Comments
 (0)