sphinxcontrib-archware
A Sphinx extension for documenting digital hardware in RST.
It provides directives for rendering
bytefield packet and register diagrams
and register hardware register diagrams
as inline SVG in HTML output, and as native LaTeX floats in PDF output.
Examples
| Light Mode (default, black stroke) | Dark Mode (white stroke) |
|---|---|
Directives
| Directive | Description |
|---|---|
.. bytefield:: |
Packet / bit-field diagram |
.. register:: |
Hardware register diagram with rotated field names and reset values |
.. regdesc:: |
Field descriptions as searchable HTML text |
.. listofregisters:: |
Auto-generated list of all register diagrams |
Custom commands \colorbitbox, \bitlabel, \rotbitheader, \memsection,
and \descbox are always available in every .. bytefield:: directive with
no extra configuration.
Installing the Python package
pip install sphinxcontrib-archware
Then add the extension to conf.py:
extensions = ["sphinxcontrib.archware"]
Installing the required TeX tools
The extension requires a TeX installation with the bytefield and register
LaTeX packages, and a tool to convert the compiled output to SVG.
Debian / Ubuntu
# TeX Live with the required LaTeX packages
sudo apt install texlive-latex-extra texlive-pictures texlive-science
# SVG converter — dvisvgm is included in texlive-base;
# install inkscape as an alternative if preferred
sudo apt install dvisvgm # recommended
# or
sudo apt install inkscape
macOS (Homebrew)
# MacTeX includes all required LaTeX packages and dvisvgm
brew install --cask mactex
# or the smaller BasicTeX distribution, then add the missing packages:
brew install --cask basictex
sudo tlmgr update --self
sudo tlmgr install bytefield register standalone lm
Windows (MiKTeX)
Install MiKTeX. The bytefield and
register packages will be downloaded automatically on first use.
Install dvisvgm via the MiKTeX package manager, or install
Inkscape as the SVG converter.
Verifying the installation
latex --version # should print a LaTeX version string
dvisvgm --version # should print a dvisvgm version string
Global package options
Package-level options for the LaTeX packages can be set globally in
conf.py and apply to every diagram in the document:
# options forwarded to \usepackage[…]{bytefield}
bytefield_package_options = "bitheight=6ex"
# options forwarded to \usepackage[…]{register}
register_package_options = "botcaption"
Development note
This package was developed interactively with Claude (Anthropic) as a coding and documentation assistant. All output was reviewed and directed by the author.
Metadata
Release files for sphinxcontrib-archware 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinxcontrib_archware-0.2.0.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib_archware-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.9 kB
Release files / sphinxcontrib_archware-0.2.0.tar.gz
| Download URL | sphinxcontrib_archware-0.2.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adc9fa9087147cf52c5fe9802674d108b1f2f94e0b7996e05383ad971a850a68
|
|
BLAKE2b-256 checksum How to use checksums |
e42585927456d59cf9cb806ca7087c694be42b1cac51eb2d8f1056f499b2a976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2026.
Transparency logRelease files / sphinxcontrib_archware-0.2.0-py3-none-any.whl
| Download URL | sphinxcontrib_archware-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ccdcf293b33f9e6d7d02e3e5ce72f08d79cbc63575b08cb2d74f64ca2575458
|
|
BLAKE2b-256 checksum How to use checksums |
d187b6f95da16c2b7757e9b6b1fac274e0e9492e7fe5ec2480ef991880c8cc5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2026.
Transparency log