Preview of RMarkdown files in DTP3 (.Rmd)

I am working a lot with RStudio and RMarkdown files which RStudio stores with the file extension .Rmd instead of .md; RMarkdown is basically Pandoc Markdown.

These documents cannot be previewed as Markdown files in DTP3 but are treated as text files.

Beside RMarkdown, I write mostly in Pandoc Markdown rather than MultiMarkdown, but this renders nicely in DTP3 as well, so I can imagine that RMarkdown files would render nicely as well.

–> Could you give an option in the preferences like “Treat .Rmd files as markdown (.md) files” ?

Thanks for listening!

Maria


Addendum:

There is no need to work on the Pandoc YAML chunks or to process the RCode in the RMarkdown code blocks, just treat code blocks as code blocks in Multimarkdown, and YAML chunks can stay greyed out as they do now. As far as I understand, RStudio is not a niche software, and RMarkdown files (basically Pandoc flavored Markdown with R code blocks) are used frequently.

How are the files rendered after changing the extension to .md and importing them? As expected or not at all?

They look good, but the chunks with code are left out, I would like to look at the chunks as they are written as code.

I include a test document from RStudio, where I have changed the extension from .Rmd to .md.

teste-dtp3.md.zip (1.0 KB)

This isn’t supported by MultiMarkdown. But you could enable the hidden preference PlainTextIsMarkdown (see appendix of help) to render all plain text documents as Markdown.

Thank you for helping me out in that case. The links in the appendix are super helpful :slight_smile:

  1. This will be a good workaround for the time being, although there are some text documents that I would prefer to stay as text (this can be settled with looking at the source rather than the preview).

  2. In the long term, could we have an option (even hidden) to set certain file extensions as markdown, as there are options to add file extensions for text?

Thanks,
Maria

1 Like

We might add this to an upcoming release.

3 Likes

I am + 1 for that

sounds good!

+1 for .rmd and .qmd (Quarto) integration
Keep up the good work. Love DT and this community!

1 Like

Welcome @Gordy and thanks for the kind words of encouragement :relaxed:

No promises but can you open a support ticket and send along example files of each?

I created a ticket. Thank you.

Thanks. Many of us are on holiday so it’s likely we’ll look at this after the New Year. Thanks for your patience and understanding.

As you can see, I started this thread two years ago, and since then work patiently with the workaround offered by Christian. No problem with patience here I’d say.

Wish you all nice holidays.

1 Like

A safe and joyous holiday to you and yours as well :slight_smile: