Skip to main content

Sphinx extension to allow .toc file to builde the Table of Contents

Project description

sphinxcontrib-toc is a Sphinx extension to allow .toc file to build the Table of Contents.

This extension empower you to build complicated document with markup languages which can not define toctrees. Specifically, combination with recommonmark, you don’t need to write any reStructuredText in your document!

Usage

Append this extension in conf.py:

extensions = ['sphinxcontrib.toc']

And configure following settings:

toc_title

The default title of toctree if no titles in .toc file. By default, "{project} Documentation".

toc_numbered

Same as :numbered: option of toctree directive. If enabled, Sphinx assigns section numbers. By default, true.

.toc file

.toc file is a list of documents like toctree directive:

section1
section2
section3

You may define the title of toctree at top of the file:

# The title of document
section1
section2
section3

Tips

You can use “nested” .toc file like following:

/index.toc
/part1.rst
/part2.rst
/part3/index.toc
/part3/section1.toc
/part3/section2.toc

# In /index.toc
part1
part2
part3/index

# In /part3/index.toc
section1
section2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib-toc-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

sphinxcontrib_toc-1.0.0-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinxcontrib-toc-1.0.0.tar.gz.

File metadata

  • Download URL: sphinxcontrib-toc-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for sphinxcontrib-toc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5597afa50365acf599cb91d3b5e7565ff2390756a6b683b12dd09a0752189806
MD5 c548530a9c09280fabca0d65088dbef9
BLAKE2b-256 f5c04411973f77496837286d9ebdee5ba6c5b4be2e44613d6d0f4d9dddf6b9ee

See more details on using hashes here.

File details

Details for the file sphinxcontrib_toc-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: sphinxcontrib_toc-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for sphinxcontrib_toc-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9bab6498d9581187ba49d059e32915d6bbaf02b7a9a7a7b70f85c13401c7db77
MD5 38bd21425c2ae13169794fa193a899f2
BLAKE2b-256 725ce3e622f437f4331236580e0d53e97a53dc1fcf1671700c577a1a6276d7ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page