A family of Python-Markdown extensions for section cross-references and bibliography/citation handling, built for use with Zensical
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. Built for use with
Zensical - configure it the same way as any other
Zensical/pymdownx Markdown extension, via zensical.toml - but since it's
a standard Python-Markdown extension, it works with any tool built on
Python-Markdown (MkDocs, etc.). Factored out of
zendoc-template, a Zensical
project, 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
zensical is a core dependency, so zensical serve is available as soon as
zendoc is installed - no extra step needed to build the documentation
locally.
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.2.0.tar.gz.
File metadata
- Download URL: zendoc-0.2.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
278a012490dd9c1ca4fd1ef98da97c473e53380296824f1fb3d06f77f0d9f516
|
|
| MD5 |
219e8b80b74c5d8467208295350aa266
|
|
| BLAKE2b-256 |
8ed78b8ec6a8e1c8787620cc76b97b9826f3f66dcd3683e24755eb4c6e5124ae
|
Provenance
The following attestation bundles were made for zendoc-0.2.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.2.0.tar.gz -
Subject digest:
278a012490dd9c1ca4fd1ef98da97c473e53380296824f1fb3d06f77f0d9f516 - Sigstore transparency entry: 2168015237
- Sigstore integration time:
-
Permalink:
buckwem/zendoc-extension@2987af379c06b66709a2b48e1546ee68d5fcb943 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/buckwem
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2987af379c06b66709a2b48e1546ee68d5fcb943 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zendoc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: zendoc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.3 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 |
61dbc1560e7e990ccd32834a3436443d0eb62e531cd7b7b051a7c21374ed7d46
|
|
| MD5 |
3848547314be480fb28c7e309a33087d
|
|
| BLAKE2b-256 |
dbc4735e17bbaaf15c00d0ecd60b9b98727ffeead8ee7f4cde2812ef32cd475e
|
Provenance
The following attestation bundles were made for zendoc-0.2.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.2.0-py3-none-any.whl -
Subject digest:
61dbc1560e7e990ccd32834a3436443d0eb62e531cd7b7b051a7c21374ed7d46 - Sigstore transparency entry: 2168015243
- Sigstore integration time:
-
Permalink:
buckwem/zendoc-extension@2987af379c06b66709a2b48e1546ee68d5fcb943 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/buckwem
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2987af379c06b66709a2b48e1546ee68d5fcb943 -
Trigger Event:
release
-
Statement type: