Skip to content

Commit

Permalink
manuals: Fix missing/wrong table of contents in HTML files
Browse files Browse the repository at this point in the history
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:
jgm/pandoc#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.
  • Loading branch information
versat committed Nov 14, 2019
1 parent 2eb575d commit 7ffeed1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions man/buildman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion man/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Cppcheck manual
subtitle: Version 1.90 dev
author: Cppcheck team
lang: en
toc: true
documentclass: report
---

Expand Down
1 change: 0 additions & 1 deletion man/reference-cfg-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Cppcheck .cfg format
subtitle: Version 1.90 dev
author: Cppcheck team
lang: en
toc: true
documentclass: report
---

Expand Down

0 comments on commit 7ffeed1

Please sign in to comment.