-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
retrieve markdown table class from attributes #10884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pandoc's Markdown doesn't allow attributes that aren't attached to a heading, code, link, image, bracketed span, or fenced div. I'm not sure how But with
and it will attach the class to the table. |
@priiduonu -- I wrote a filter for cross-references in Lua which supports the same syntax that @jgm -- would you be open to having pandoc's Markdown extended to support this syntax for specifying Table Attrs? The syntax seems natural to me, since it is already used in Headings to specify Attrs. |
Worth considering. Comments welcome. |
It's a fairly common and natural extension to pandoc's syntax, Quarto has it, too. I'd be in support of building this into pandoc. The only mildly awkward thing, IMHO, arises when using captions with multiple paragraphs. Attaching the attribute to the last paragraph is slightly weird. But, as noted above, people are already doing that, so it seems fine. |
Whoops, you're right. I must have imagined that. |
I would like to be able to write
and get the table class assigned to the
table
element, while removing it from thecaption
.I know I can achieve it with fenced div blocks, but the shorthand version would be nice.
In the real world I am using
pandoc-crossref
, so my table usually looks like:therefore I prefer the short version instead of wrapping the whole thing in extra div.
The text was updated successfully, but these errors were encountered: