manuals: Fix missing/wrong table of contents in HTML files (#2360)
The YAML setting `toc: true` works for PDF creation but for HTML it simply prints `true` as the table of contents. It looks like a misconception and the only acceptable solution I have found is to use `--toc` on the command line instead of the `toc: true` setting in the YAML header. It is a known issue, here are more details: https://github.com/jgm/pandoc/issues/2872 With this fix I get table of contents not only for PDF but for HTML too. The PDF looks like before for me, the table of contents and the outline are still present as it was before.
This commit is contained in:
parent
b9835fd4f9
commit
b089ba4e3b
|
@ -2,8 +2,8 @@
|
|||
# To install required tools in debian:
|
||||
# sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-latex-extra
|
||||
|
||||
pandoc manual.md -o manual.pdf -s --number-sections
|
||||
pandoc manual.md -o manual.html -s --number-sections
|
||||
pandoc manual.md -o manual.pdf -s --number-sections --toc
|
||||
pandoc manual.md -o manual.html -s --number-sections --toc
|
||||
|
||||
pandoc reference-cfg-format.md -o reference-cfg-format.pdf -s --number-sections
|
||||
pandoc reference-cfg-format.md -o reference-cfg-format.html -s --number-sections
|
||||
pandoc reference-cfg-format.md -o reference-cfg-format.pdf -s --number-sections --toc
|
||||
pandoc reference-cfg-format.md -o reference-cfg-format.html -s --number-sections --toc
|
||||
|
|
|
@ -3,7 +3,6 @@ title: Cppcheck manual
|
|||
subtitle: Version 1.90 dev
|
||||
author: Cppcheck team
|
||||
lang: en
|
||||
toc: true
|
||||
documentclass: report
|
||||
---
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ title: Cppcheck .cfg format
|
|||
subtitle: Version 1.90 dev
|
||||
author: Cppcheck team
|
||||
lang: en
|
||||
toc: true
|
||||
documentclass: report
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in New Issue