{"id":44533198,"url":"https://github.com/pandoc-ext/list-table","last_synced_at":"2026-02-13T18:41:31.321Z","repository":{"id":153645107,"uuid":"624942599","full_name":"pandoc-ext/list-table","owner":"pandoc-ext","description":"Write tables as list of cells and rows.","archived":false,"fork":false,"pushed_at":"2024-05-05T09:24:09.000Z","size":30,"stargazers_count":16,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-05T10:27:02.516Z","etag":null,"topics":["lua","pandoc","pandoc-filter"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pandoc-ext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-07T16:42:51.000Z","updated_at":"2024-05-05T10:27:03.507Z","dependencies_parsed_at":"2024-01-08T00:37:41.481Z","dependency_job_id":null,"html_url":"https://github.com/pandoc-ext/list-table","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pandoc-ext/list-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Flist-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Flist-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Flist-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Flist-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pandoc-ext","download_url":"https://codeload.github.com/pandoc-ext/list-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Flist-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","pandoc","pandoc-filter"],"created_at":"2026-02-13T18:41:31.169Z","updated_at":"2026-02-13T18:41:31.313Z","avatar_url":"https://github.com/pandoc-ext.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# list-table\n\nList tables for Pandoc.\n\nThis is the documentation for `list-table.lua`, a Lua filter\nto bring [RST-style list tables] to Pandoc's Markdown.\n\nThis filter depends on the [`fenced_divs` pandoc extension], which\nis enabled by default for `commonmark_x`, `markdown` and `opml` but\nwill have to be enabled explicitly for other markdown variants.\n\nList tables are not only easy-to-write but also produce clean\ndiffs since you don't need to re-align all the whitespace when\none cell width changes. This filter lets you use RST-inspired\nlist tables in markdown. Any div with the first class `list-table`\nis converted, for example the following Markdown:\n\n```\n:::list-table\n   * - row 1, column 1\n     - row 1, column 2\n     - row 1, column 3\n\n   * - row 2, column 1\n     -\n     - row 2, column 3\n\n   * - row 3, column 1\n     - row 3, column 2\n:::\n```\n\nresults in the following table:\n\n| row 1, column 1 | row 1, column 2 | row 1, column 3 |\n|-----------------|-----------------|-----------------|\n| row 2, column 1 |                 | row 2, column 3 |\n| row 3, column 1 | row 3, column 2 |                 |\n\nThe filter also supports more advanced features,\nas described in the following sections.\n\n[`fenced_divs` pandoc extension]: https://pandoc.org/MANUAL.html#extension-fenced_divs\n[RST-style list tables]: https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table\n\n## Table captions\n\nIf the div starts with a paragraph, its content is used as the table caption.\nFor example:\n\n```markdown\n:::list-table\n   Markup languages\n\n   * - Name\n     - Initial release\n\n   * - Markdown\n     - 2004\n\n   * - reStructuredText\n     - 2002\n:::\n```\n\nresults in:\n\n\u003c!-- HTML because GFM does not support table captions --\u003e\n\u003ctable\u003e\n\u003ccaption\u003eMarkup languages\u003c/caption\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eInitial release\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eMarkdown\u003c/td\u003e\n\u003ctd\u003e2004\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ereStructuredText\u003c/td\u003e\n\u003ctd\u003e2002\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Column alignments\n\nWith the `aligns` attribute you can configure column alignments. When given the\nvalue must specify an alignment character (`d`, `l`, `r`, or `c` for default,\nleft, right or center respectively) for each column. The characters must be\nseparated by commas.\n\n```\n:::{.list-table aligns=l,c}\n   * - Name\n     - Initial release\n\n   * - Markdown\n     - 2004\n\n   * - reStructuredText\n     - 2002\n:::\n```\n\nresults in:\n\n| Name             | Initial release |\n|:-----------------|:---------------:|\n| Markdown         |      2004       |\n| reStructuredText |      2002       |\n\n## Column widths\n\nWith the `widths` attribute you can configure column widths via\ncomma-separated numbers. The column widths will be relative to the numbers.\nFor example when we change the first line of the previous example to:\n\n```\n:::{.list-table widths=1,3}\n```\n\nthe second column will be three times as wide as the first column.\n\n\u003c!-- no demo because GFM does not support inline CSS --\u003e\n\n## Header rows \u0026 columns\n\nYou can configure how many rows are part of the table head\nwith the `header-rows` attribute (which defaults to 1).\n\n```\n:::{.list-table header-rows=0}\n   * - row 1, column 1\n     - row 1, column 2\n\n   * - row 2, column 1\n     - row 2, column 2\n:::\n```\n\nresults in:\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003erow 1, column 1\u003c/td\u003e\n\u003ctd\u003erow 1, column 2\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003erow 2, column 1\u003c/td\u003e\n\u003ctd\u003erow 2, column 2\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nThe same also works for `header-cols` (which however defaults to 0).\nFor example:\n\n```\n:::{.list-table header-cols=1}\n   * - Name\n     - Initial release\n\n   * - Markdown\n     - 2004\n\n   * - reStructuredText\n     - 2002\n:::\n```\n\nresults in:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eInitial release\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003eMarkdown\u003c/th\u003e\n\u003ctd\u003e2004\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003ereStructuredText\u003c/th\u003e\n\u003ctd\u003e2002\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Cell attributes\n\nIf the first inline element of a table cell is an empty Span, it\nis removed and its attributes are transferred to the table cell.\nThe `colspan` and `rowspan` attributes are supported.\n\n```\n:::{.list-table}\n   * - Name\n     - Italic\n     - Code\n\n   * - Markdown\n     - []{rowspan=2} `*italic*`\n     - `` `code` ``\n\n   * - reStructuredText\n     - ` ``code`` `\n:::\n```\n\nresults in:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eItalic\u003c/th\u003e\n\u003cth\u003eCode\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eMarkdown\u003c/td\u003e\n\u003ctd rowspan=\"2\"\u003e \u003ccode\u003e*italic*\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e`code`\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cp\u003ereStructuredText\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003e\u003ccode\u003e``code``\u003c/code\u003e\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nIndividual cell alignment is also supported via the `align` attribute.\nExpected values are `l`, `r`, `c` for left, right and center respectively.\n(Please mind that contrary to [column alignments](#column-alignments)\nthis attribute is singular).\n\n## Row attributes\n\nIf the first block element of a table row contains (only) an\nempty Span, it is removed and its attributes are transferred\nto the table row.\n\n```\n:::{.list-table}\n- []{style=\"background: lightblue\"}\n  - Ocean\n  - Area (sq. miles)\n- - Atlantic\n  - 41.1 million\n- - Pacific\n  - 63.8 million\n:::\n```\n\nresults in (the background style won't be shown on github.com):\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr style=\"background: lightblue\"\u003e\n\u003cth\u003eOcean\u003c/th\u003e\n\u003cth\u003eArea (sq. miles)\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAtlantic\u003c/td\u003e\n\u003ctd\u003e41.1 million\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePacific\u003c/td\u003e\n\u003ctd\u003e63.8 million\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Multiple bodies\n\nIf a list row is a table (which might also have been created\nby the `list-table.lua` filter), its rows become a new table\nbody. Table bodies can't have header rows (`.list-table-body`\nis the same as `.list-table` except that `header-rows` defaults\nto 0).\n\n```\n:::{.list-table header-rows=0}\n:::{.list-table-body}\n```\n\nThis:\n\n```\n:::{.list-table style=\"background: lightsalmon\"}\n* - Fish\n  - Ocean\n\n* :::{.list-table-body style=\"background: lightgreen\"}\n  - - Arctic char\n    - Arctic\n  - - Humuhumunukunukuāpuaʻa\n    - Pacific\n  :::\n\n* |               |           |\n  |---------------|-----------|\n  | Cod           | Atlantic  |\n  | Notothenioids | Antarctic |\n:::\n```\n\nresults in (the background style won't be shown on github.com):\n\n\u003ctable style=\"background: lightsalmon\"\u003e\n\u003cthead\u003e\n\u003ctr class=\"header\"\u003e\n\u003cth\u003eFish\u003c/th\u003e\n\u003cth\u003eOcean\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody style=\"background: lightgreen\"\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003eArctic char\u003c/td\u003e\n\u003ctd\u003eArctic\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003eHumuhumunukunukuāpuaʻa\u003c/td\u003e\n\u003ctd\u003ePacific\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003eCod\u003c/td\u003e\n\u003ctd\u003eAtlantic\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003eNotothenioids\u003c/td\u003e\n\u003ctd\u003eAntarctic\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Error reporting\n\nIf an unexpected element is encountered, the filter will attempt\nto output the offending text (as markdown) before asserting.\n\n```\n:::{.list-table}\n- []{style=\"background:lightblue\"}\n  - Ocean\n  - Area (sq. miles)\n- - Atlantic\n  - 41.1 million\n- Pacific\n  63.8 million\n:::\n```\n\n```\nError running filter list-table.lua:\n../list-table.lua:167: expected bullet list, found Plain at\nPacific 63.8 million\n\nstack traceback:\n\tlist-table.lua:51: in upvalue 'assert_'\n\tlist-table.lua:167: in function \u003clist-table.lua:126\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Flist-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandoc-ext%2Flist-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Flist-table/lists"}