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.0.tar.gz (13.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.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdit_py_adv_table-0.2.0.tar.gz
  • Upload date:
  • Size: 13.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.0.tar.gz
Algorithm Hash digest
SHA256 02abe0baf2f25c7b0e87dd7018b098139b35521b1169943a6ab634d4dfb93a75
MD5 fd1815ffb6cd439eb9dcb50ad39beb4e
BLAKE2b-256 c94eca7a62f45b60d7e2cee7fb9ccf7d25d73484e294ebbf77f867f1f2946df6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdit_py_adv_table-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 933cd4610117f1aeade0c701ee1c40c74487f626e9a675e8c2f5938be9437c23
MD5 4465108e20f5b78949b46f450490879c
BLAKE2b-256 9212de82cc61458ace36431619d97876f23561f0569e34c4a93d62e1744c30dc

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