From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Fwd: Anyone using or interested in an org to Rmarkdown exporter?
Date: Sat, 1 Nov 2014 12:21:28 -0500 [thread overview]
Message-ID: <CA+M2ft-H4giJ+Gjq2V75gy49JSG6wUQC9AtsAKq=2FqN59zU-Q@mail.gmail.com> (raw)
In-Reply-To: <CA+M2ft_pi=dMOQd0fju_4kN=gsG=eq9YTunP_PHRuQ=rWyjZHA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]
Whoops -- missed the reply-all on this!
John
---------- Forwarded message ----------
From: John Hendy <jw.hendy@gmail.com>
Date: Fri, Oct 31, 2014 at 7:32 PM
Subject: Re: [O] Anyone using or interested in an org to Rmarkdown exporter?
To: Grant Rettke <gcr@wisdomandwonder.com>
On Thu, Oct 30, 2014 at 11:37 AM, Grant Rettke <gcr@wisdomandwonder.com> wrote:
> Good morning,
>
> Last week I started learning about [RMarkdown]. It is a [literate
> programming] tool implemented in, and for, the [ℝ programming
> language]. Although I haven't dug in deep yet, I do know that (1) it is
> /basically/ [Markdown] and that (2) `org' exports both to [vanilla
> markdown] and also [GitHub flavored Markdown] and that (3) a lot of my
> peers use `RMarkdown' and not `org'. With that that in mind I got
> curious about what it would take to write an `org2rmarkdown' exporter.
>
> The scope of my interest is one-time exports for the most basic and
> simple `org' document. As such, right now I have no requirements beyond
> thinking about the opportunity. After doing some Internet searches,
> there does not seem to be an exporter right now. Questions:
>
> • Does one exist and I missed it?
Possibly; at least in some form it does:
- https://github.com/chasberry/orgmode-accessories/blob/master/ox-ravel.org
> • Do you have any interest in such an exporter?
Yes!
- https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01436.html
- https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00291.html
> • Has anyone else ever thought of doing this? If yes, why didn't you?
Yes:
- Don't know elisp
- Found the above, which mostly worked. I had to edit my Org file to
feature a carriage return between text and my lists. ox-ravel appears
to export literally, and it appears knittr won't pick up a list if
there's no blank line between regular text and a list. In other words,
this:
list
- item1
- item2
Isn't the same as this:
list
- item1
- item2
Probably a simple enough fix, but just pointing out one nuance that
org in general and other exporters don't struggle with (they recognize
a list even with no blank line).
> • My guess is that doing an exporter that [builds on an existing
> exporter], mentioned above, would be a great start. Thoughts?
> • The big difference seems to be control statements passed to the
> interpreter, which may or may not be necessary to convert. If not,
> than the *stock* `markdown' exporter would provide everything
>
See if the attached are satisfactory
- test.org: just a heading, a couple lists, R code (and output), and an image
- test.Rmd: output of ox-ravel Rmd exporter
- test.html (well, a screenshot): results of opening test.Rmd in
RStudio and knitting
Let me know what you think!
John
[-- Attachment #2: 2014-10-31_192325.png --]
[-- Type: image/png, Size: 70266 bytes --]
[-- Attachment #3: test.org --]
[-- Type: application/octet-stream, Size: 252 bytes --]
#+setupfile: "~/org/aux/setupfile.org"
* test
Unordered list
- How does this work?
- Simple list
- 'Nother item
Numbered list
1) Switch it up
2) Numbers this time
Some code:
#+begin_src R
x <- 1:10
y <- x^2
y
#+end_src
Image?
[[./tux.png]]
[-- Attachment #4: test.Rmd --]
[-- Type: text/x-r-markdown, Size: 209 bytes --]
# test
Unordered list
- How does this work?
- Simple list
- 'Nother item
Numbered list
1. Switch it up
2. Numbers this time
Some code:
```{r }
x <- 1:10
y <- x^2
y
```
Image?
![img](./tux.png)
next prev parent reply other threads:[~2014-11-01 17:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 16:37 Anyone using or interested in an org to Rmarkdown exporter? Grant Rettke
2014-11-01 10:37 ` Thorsten Jolitz
2014-11-01 14:37 ` Rasmus
2014-11-01 17:31 ` Charles C. Berry
2014-11-01 17:42 ` Thorsten Jolitz
2014-11-05 1:23 ` Grant Rettke
[not found] ` <CA+M2ft_pi=dMOQd0fju_4kN=gsG=eq9YTunP_PHRuQ=rWyjZHA@mail.gmail.com>
2014-11-01 17:21 ` John Hendy [this message]
2014-11-02 0:37 ` Fwd: " Charles C. Berry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+M2ft-H4giJ+Gjq2V75gy49JSG6wUQC9AtsAKq=2FqN59zU-Q@mail.gmail.com' \
--to=jw.hendy@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).