Skip to main content

sphinx-tabular

PyPI Python Docs Downloads

Full documentation

Instead of just modifying the final table output, sphinx-tabular builds real docutils table nodes (table/tgroup/row/entry) the same way docutils' own table directives do, and only overrides the HTML rendering of table cells (for colspan/rowspan/inline styling) — the rest of the output is generated by Sphinx's normal HTML writer.

While the table structure and merged cells will work in the LaTeX builder PDF output, the table formatting (colors, icons, bacgkround color, text color, and alignment) is HTML only.

Features

  • Sphinx extension.
  • Uses standard CSV files or native reStructuredText list-table syntax.
  • Easily merge table cells with < and ^.
  • Support reStructuredText, rich reStructuredText list cells, and Markdown.
  • Support for inline table data and external files.
  • Optional sticky header support for one or more header rows.
  • Provides a minimal set of spreadsheet formulas.
  • Set table cell alignment and per-cell alignment in both horizontal and vertical directions.
  • Set custom cell text and background colors.
  • Custom status pill.
  • Support for Font Awesome and Bootstrip icons if installed by your theme.
  • Sortable rows by clicking on the header row.
  • Searchable option.

Installation

pip install sphinx-tabular

conf.py

extensions = [
    ...,
    "sphinx_tabular",
    ...,
]

Directives

rcsv-table

Use CSV rows with reStructuredText cell content. Data may be inline or loaded from an external .rcsv file.

.. rcsv-table:: Title
    :file: table.rcsv

mcsv-table

Use CSV rows with MyST Markdown cell content. Data may be inline or loaded from an external .mcsv file.

.. mcsv-table:: Title
    :file: table.mcsv

rlist-table

Use a uniform two-level reStructuredText bullet list. Each top-level item is a row, and each nested item is a cell. Rich reStructuredText nodes are preserved inside ordinary cells.

.. rlist-table:: Interface status
    :header-rows: 1
    :stub-columns: 1

    * - Name
      - Owner
      - Status
    * - Alpha
      - **Able Team**
      - =STATUS(Ready; green)

rlist-table is inline-only. Use .. include:: when the list should be kept in another source file.

Merging Cells

In rcsv-table and mcsv-table, an unquoted < merges with the cell to its left and an unquoted ^ merges with the cell above it.

.. rcsv-table:: Horizontal merge

    Merged,<
    Unmerged,Unmerged
.. rcsv-table:: Vertical merge

    Merged,Unmerged
    ^,Unmerged

In rlist-table, a cell containing one plain-text < or ^ is a merge marker. Use an inline literal such as `<` or `^` when the character should be displayed instead.

.. rlist-table:: List merge

    * - Merged
      - <
    * - Unmerged
      - Unmerged

Options

Supported options include:

  • :align: Place an rlist-table at left, center, or right.
  • :class: Additional classes to add to the table.
  • :file: Path to the .rcsv or .mcsv file. Not supported by rlist-table.
  • :header-rows: Number of top rows to format as header rows. If :sticky-header: is set, these rows become sticky.
  • :initial-sort: Apply independent page-load ordering using one-based COLUMN=TYPE[:reverse] criteria.
  • :name: Assign an explicit target name to an rlist-table.
  • :search: Add a search field with a row count to the table and enable searching.
  • :sortable: Enable row sorting by clicking on the headers.
  • :sort-types: Assign interactive sort types using one-based COLUMN=TYPE entries.
  • :sticky-header: Make the header rows sticky when scrolling long tables.
  • :sticky-offset: CSS offset for sticky headers, such as 3.5rem.
  • :strict: Treat ragged rows and malformed input as errors instead of warnings.
  • :stub-columns: Mark leftmost columns as semantic stubs for rlist-table.
  • :text-align: Horizontal alignment of text in the cells. Default is left.
  • :vertical-align: Vertical alignment of text in cells. Default is middle.
  • :width: CSS width for the table, such as 100%.
  • :widths: A space-separated list of column widths.

Formatting

  • Custom theming.
  • =ALIGN() horizontal/vertical cell value alignment.
  • =BG() set the background cell color.
  • =FG() set text color.
  • =ICON() use a Font Awesome or Bootstrap icon, or a fallback.
  • =STATUS() insert a colored status pill.

Spreadsheet

  • ' interprest as literal text without evaluation.
  • +,-,*,/ arithmetic operations on cells.
  • =C4 cell references.
  • =A4:B4 cell ranges.
  • =AVG() take the average.
  • =CONCAT() concatenation of cell values.
  • =COUNT() count number of numerical values.
  • =IF() conditional evaluation.
  • =MAX() find the maximum value.
  • =MIN() find the minimum value.
  • =ROUND() round the number to an int or the specified decimal places.
  • =SUM() sum a set or range of values.

Metadata

Release files for sphinx-tabular 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-tabular 0.2.5
File Size Uploaded Provenance Actions
sphinx_tabular-0.2.5.tar.gz 39.3 kB With provenance Details for sphinx_tabular-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-tabular 0.2.5
File Interpreter ABI Platform Actions
sphinx_tabular-0.2.5-py3-none-any.whl Python 3 none any Details for sphinx_tabular-0.2.5-py3-none-any.whl

Total release size: 73.4 kB

Release files / sphinx_tabular-0.2.5.tar.gz

Download URL sphinx_tabular-0.2.5.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
07c0f3baffb68f9f7471a625fe0dcc62fcb9e986067eed12cacdaba7732ae613
BLAKE2b-256 checksum
How to use checksums
ce3f329a8bd3eb96bbe258c59d4ad2a5b1b09ba6c90824b58568583f8d224fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 23, 2026.

Transparency log

Release files / sphinx_tabular-0.2.5-py3-none-any.whl

Download URL sphinx_tabular-0.2.5-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adc6c00ba3f5c66bc26faa1301a0df3e5f42ae37ba75680ad5907d18ae546532
BLAKE2b-256 checksum
How to use checksums
2953b8cd3ac88a552bfa28e6f463c543e5e3713c0647d60f2283368b437e05c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 23, 2026.

Transparency log

Security for sphinx-tabular 0.2.5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sphinx_tabular-0.2.5.tar.gz

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 Jul 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page