sphinx-simplepdf icon indicating copy to clipboard operation
sphinx-simplepdf copied to clipboard

Unable to modify 'Table of Contents' text in PDF

Open sachin-suresh-rapyuta opened this issue 1 year ago • 0 comments

I am trying all workarounds to modify the 'Table of Contents' text. But seems like a bug in extension, that is preventing the setting from being respected.

Following are some workarounds:

Try 1: Dint work

# conf.py

# Set the title of the table of contents for SimplePDF output
simplepdf_toc_title = 'My Custom TOC Title'

Try 2: Specifyied the simplepdf_toc_title setting in your command line argument - Dint work

sphinx-build -b simplepdf -D simplepdf_toc_title="My Custom TOC Title" . _build/simplepdf

Try 3: Using new file called simplepdf_toc.html -- Dint work

  1. In _templates folder, create a new simplepdf_toc.html and added the following content to the file:
<div class="contents">
  <h1>My Custom TOC Title</h1>
  {{ toc }}
</div>
  1. In conf:
# conf.py

# Override the SimplePDF table of contents template
simplepdf_toc_template = 'simplepdf_toc.html'

Also, what is the variable in simplepdf for modifying the toctree caption?

sachin-suresh-rapyuta avatar Apr 08 '23 04:04 sachin-suresh-rapyuta