Skip to content

rnwst/pandoc-table-attr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pandoc-table-attr

A pandoc filter that adds the capability of specifying table attributes in table captions in Pandoc's Markdown.

How to use

Simply append attributes to table captions like so:

Table: Table caption. {#id .class key=val}

FirstCol   SecondCol
---------  ----------
FirstCell  SecondCell

The attributes specified in the table caption will then be added to pandoc's AST and used by pandoc's writers (the HTML writer utilises table attributes, but I haven't tested this with any of the other writers yet).

Table attributes must appear at the end of the table caption.

Known limitations

The current implementation of pandoc-table-attr does not allow inline elements to be used in keyvalues if they would be parsed by pandoc as inline formatting, inline math, inline code blocks (Extension: backtick_code_blocks), generic raw attributes, inline links, or citations. Therefore, the following will not work:

Table: Table caption. {#id .class key="*val*"}

Pandoc will parse *val* as emphasized text, instead of literal asterisks. However, it is possible to use backslash escapes as a workaround:

Table: Table caption. {#id .class key="\*val\*"}

About

Pandoc filter to allow specifying of table attributes in table captions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages