git.iko.soy/typeable/pandoc
on master help sign in
Add support for $toc-title$ to HTML (4 and 5) (#5930)
commita09edd1703d9ff103a2157c0b0e910d740ce8629 authorAlexandre Franke <alexandre.franke@gmail.com> dateSun 24 Nov 2019, 02:13 (7 years ago) parent39fde70
3 files changed+7−1
MANUAL.txt+1−1 data/templates/default.html4+3 data/templates/default.html5+3
MANUAL.txt+1−1
@@ -2559,7 +2559,7 @@ on the output format, and include the following:
25592559
25602560`toc-title`
25612561: title of table of contents (works only with EPUB,
2562− opendocument, odt, docx, pptx, beamer, LaTeX)
2562+ HTML, opendocument, odt, docx, pptx, beamer, LaTeX)
25632563
25642564[pandoc-templates]: https://github.com/jgm/pandoc-templates
25652565
data/templates/default.html4+3
@@ -47,6 +47,9 @@ $endif$
4747$endif$
4848$if(toc)$
4949<div id="$idprefix$TOC">
50+$if(toc-title)$
51+<h2 id="$idprefix$toc-title">$toc-title$</h2>
52+$endif$
5053$table-of-contents$
5154</div>
5255$endif$
data/templates/default.html5+3
@@ -50,6 +50,9 @@ $endif$
5050$endif$
5151$if(toc)$
5252<nav id="$idprefix$TOC" role="doc-toc">
53+$if(toc-title)$
54+<h2 id="$idprefix$toc-title">$toc-title$</h2>
55+$endif$
5356$table-of-contents$
5457</nav>
5558$endif$