Skip to main content

Advanced table syntax plugin for markdown-it-py

Project description

mdit-py-adv-table

A markdown-it-py plugin for advanced table rendering. This is a python-port of markdown-it-adv-table.

This plugin adds custom table syntaxes to render complex tables easier.

  • "flat-table" syntax
  • "csv-table" syntax
  • "tsv-table" syntax

The "flat-table" syntax allows to:

  • Set Rowspan and colspan for spanning cells
  • Set column width
  • Set horizontal text alignment
  • Set css classes for table styling
  • Define Header rows and columns
  • Allow writing markdown inside the cells (nested document)

Installation

pip install mdit-py-adv-table
from mdit_py_adv_table import adv_table
from markdown_it import MarkdownIt
md = MarkdownIt().use(adv_table)
md.render("...")
PluginName LangName Behavior
adv_table table* Installs an all-unified plugin
flat_table flat-table render table from the flat-table syntax
csv_table csv-table render table from csv
tsv_table tsv-table render table from tsv

Example

```table cols=4 header-rows=2 header-cols=1
r2| Category
c3| Q1 Sales

| January
| February
| March

| Electronics
| $10,000
| $12,000
| $11,500

| Clothing
| $8,000
| $9,500
| $9,000

| Books
| $3,500
| $4,000
| $4,200
```
Category Q1 Sales
January February March
Electronics $10,000 $12,000 $11,500
Clothing $8,000 $9,500 $9,000
Books $3,500 $4,000 $4,200

Syntax Description

see markdown-it-adv-table

Sphinx & MyST Integration

This package provides an extension for Sphinx with MyST parser.

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

mdit_py_adv_table-0.2.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdit_py_adv_table-0.2.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file mdit_py_adv_table-0.2.1.tar.gz.

File metadata

  • Download URL: mdit_py_adv_table-0.2.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mdit_py_adv_table-0.2.1.tar.gz
Algorithm Hash digest
SHA256 031d52e8f1608219bcb791b47040d5c4c6f43a14bc38e84aca00111fd3cf29cd
MD5 8fcbb0c0a64905b52cf081c5b18442aa
BLAKE2b-256 dbffff1c4038282ded850e640518555df74fe5c449ebfa803c271667fe132b80

See more details on using hashes here.

File details

Details for the file mdit_py_adv_table-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mdit_py_adv_table-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mdit_py_adv_table-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f6beef18ff9d34d5094e26e9f429afb32cee18881ff79991289b7016934b33b
MD5 0e72b4e591b8269b4276e86df6c656ed
BLAKE2b-256 69ac57d4ae9c377ea3998b51023e687d1dba4199b0259a305c54afc1da7e036f

See more details on using hashes here.

Supported by

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