Marktext: Support of *.Rmd file extenstion is needed for compatibility with RMarkdown files

Created on 3 Aug 2019  路  4Comments  路  Source: marktext/marktext

Describe your feature request

There is a well known Markdown dialect named RMarkdown. Its file extension is *.Rmd.

What problem does this feature solve?

Allow to open and edit *.Rmd files with MarkText.

Additional context

Info about RMarkdown is available on RStudio site - https://rmarkdown.rstudio.com/ .
I'm asking only for enabling this file extension in openFile dialog by editing of MARKDOWN_EXTENSIONS list.

markdowextension feature request

Most helpful comment

It'd be really cool if this could be supported! Much of my workflow for academic writing involves switching between a pretty markdown editor like Typora to edit actual prose, and something less pretty like RStudio to knit R Markdown files.

All 4 comments

I think we can easily support the R Markdown extension but only wrap the R code parts in code blocks.

There are some elements that are different from CommonMark or GFM. One problem might be that display math is define as $$ ... $$ and not as $$<newline> ... <newline>$$. Maybe this extension must be enabled via settings.

It seems that you got me wrong.
I mean to add *.Rmd pattern to text filter in Open dialog (along with *.md, *.mkd and so on):

open

Currently the filter is not configurable by user and have hardcoded list of file-extensions:

'markdown', 'mdown', 'mkdn', 'md', 'mkd', 'mdwn', 'mdtxt', 'mdtext', 'text','txt'

Interpreting of RMarkdown is not needed. I need to simply open the *.Rmd with MarkText and change its contents as some other simple Mardown document.

I know but our markdown parser (marked.js) and muya (Mark Text's engine) don't support R Markdown - and may throw away unsupported text blocks. So we need to read the specification and have to check whether we need to change the parser etc. Currently (e.g. when you write R Markdown or rename the file extension) Mark Text may throw away some text elements because they might be unsupported or even crash. We categorized this as feature request to verify this and then we can officially support R Markdown without R code preview. I guess the only existing problem is the display equations style and this feature may included in v0.16.0. v0.15.0 is more or less released, there is only a small problem with the binary filenames.

It'd be really cool if this could be supported! Much of my workflow for academic writing involves switching between a pretty markdown editor like Typora to edit actual prose, and something less pretty like RStudio to knit R Markdown files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrobbins picture jrobbins  路  3Comments

wdhwg001 picture wdhwg001  路  3Comments

hrvojegolcic picture hrvojegolcic  路  3Comments

arty-name picture arty-name  路  3Comments

barlowliu picture barlowliu  路  3Comments