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.2.tar.gz (14.2 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.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdit_py_adv_table-0.2.2.tar.gz
  • Upload date:
  • Size: 14.2 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.2.tar.gz
Algorithm Hash digest
SHA256 225f6fd76e9e8f3741534007ce5d6ec21621faaa0e5d2ef051a61bc7b9aba8ee
MD5 f0f521580f63eb82378a288da36b163e
BLAKE2b-256 39844ccd5a6a53116a5eef42ae3a7b8df076af0d93a41eb5938a9994adac2313

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdit_py_adv_table-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b32bba0e3af5229f8ec8a038af7547e288d5c2da42ed4608ed4fc63596a7ecff
MD5 39471368b61e208f846f7d960745689d
BLAKE2b-256 1e64f778c7ed8406f0958d1c88b896120c6edbe4dc220b0dfbc6ad78a9544d31

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