Skip to content
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

Add pandoc as an engine of fmt_markdown() #725

Closed
atusy opened this issue Mar 15, 2021 · 3 comments · Fixed by #1254
Closed

Add pandoc as an engine of fmt_markdown() #725

atusy opened this issue Mar 15, 2021 · 3 comments · Fixed by #1254

Comments

@atusy
Copy link

atusy commented Mar 15, 2021

Currently, fmt_markdown internally uses commonmark package for conversion of markdown texts.
I would like to suggest pandoc as an optional engine.
In this way, we can use Pandoc's Markdown which is consistent with R Markdown.
This will allow wider variety of inline formatting such as superscript and subscript, and also allow complex features like citations.

Just to give a hint to implement citations, ftExtra::colformat_md for flextable internally reads rmarkdown::metadata to fetch bibliographies (https://github.com/atusy/ftExtra/blob/master/R/md2ast.R#L8), and then output citation keys as a part of YAML meta data block so to invisibly make sure citations appear in the reference (https://github.com/atusy/ftExtra/blob/master/R/knit-print.R#L20-L24).

@rich-iannone rich-iannone changed the title Add pandoc as an engine of fmt_markdown() Add pandoc as an engine of fmt_markdown() Mar 19, 2021
@maia-sh
Copy link

maia-sh commented Jul 25, 2021

+1 for this feature. In the meanwhile, is there any existing workaround to add a citation (of the format @mycitationkey) to a gt table?

@kylebutts
Copy link

+1! It would be nice to be able to have citations within a table!

@rich-iannone rich-iannone added this to the FUTURE milestone Aug 22, 2022
@LukasWallrich
Copy link

Until this is implemented, it would be great to document the limitations (or available MD features) in ?md - it took me a while to understand why ~sub~script worked in RMarkdown until I moved it into a table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment