A family of Python-Markdown extensions for section cross-references and bibliography/citation handling
Project description
zendoc
A family of Python-Markdown extensions for section cross-references and bibliography/citation handling, in the spirit of pymdown-extensions: each extension is independent and enabled separately. Factored out of zendoc-template so it can be installed and reused independently of that template.
Status: early -
zendoc.headingsandzendoc.refsare implemented; citation handling isn't yet. See zendoc-template#25 for the tracking issue and scope.
Installation
pip install zendoc
Extensions
| Extension | Description |
|---|---|
zendoc.headings |
Gives every heading an id and a hierarchical section number ("1", "1.1", "1.2", "2", ...). |
zendoc.refs |
\ref{id} section cross-references, resolving to the target's current number - similar in spirit to LaTeX's \ref. |
import markdown
html = markdown.markdown(text, extensions=["zendoc.headings", "zendoc.refs"])
# Introduction {: #intro }
See \ref{intro} for background.
\ref{intro} resolves to a link reading 1 - the heading's current
section number - and stays correct if sections are reordered, since
numbering is recomputed on every conversion. See the
docs for options, multi-page
registry sharing, and full syntax details.
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
To build the documentation locally:
pip install -e ".[docs]"
zensical serve
License
MIT - see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zendoc-0.1.0.tar.gz.
File metadata
- Download URL: zendoc-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5332b0c25b7bfed0546fcf64140fa2fb90c1100ee0b829e8d1b2ad9aad04f67d
|
|
| MD5 |
693675acde2fc810baf089cbabea4ae3
|
|
| BLAKE2b-256 |
782f6ef9f2e9b77525cc5339a7c515bd595ff64ea59c5f2f92eecde94a353ffc
|
Provenance
The following attestation bundles were made for zendoc-0.1.0.tar.gz:
Publisher:
publish.yml on buckwem/zendoc-extension
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zendoc-0.1.0.tar.gz -
Subject digest:
5332b0c25b7bfed0546fcf64140fa2fb90c1100ee0b829e8d1b2ad9aad04f67d - Sigstore transparency entry: 2167859942
- Sigstore integration time:
-
Permalink:
buckwem/zendoc-extension@362b54f4c458ad6f265963dccac84d1d7dd03ea0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/buckwem
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@362b54f4c458ad6f265963dccac84d1d7dd03ea0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zendoc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zendoc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14529f52460da05ed05ce625a3fa58aa03ac099fab2e62ec93d90cb7ec842cb6
|
|
| MD5 |
d4e7b8663284db3aab003d3cd33e32b1
|
|
| BLAKE2b-256 |
652c8a04eb617008df92958869f8547958d2d9bd1a250b25bdf551ef952d3739
|
Provenance
The following attestation bundles were made for zendoc-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on buckwem/zendoc-extension
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zendoc-0.1.0-py3-none-any.whl -
Subject digest:
14529f52460da05ed05ce625a3fa58aa03ac099fab2e62ec93d90cb7ec842cb6 - Sigstore transparency entry: 2167860010
- Sigstore integration time:
-
Permalink:
buckwem/zendoc-extension@362b54f4c458ad6f265963dccac84d1d7dd03ea0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/buckwem
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@362b54f4c458ad6f265963dccac84d1d7dd03ea0 -
Trigger Event:
release
-
Statement type: