emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Guidance for preparing document with code
Date: Wed, 29 May 2013 19:00:41 +0200	[thread overview]
Message-ID: <8638t5iuva.fsf@somewhere.org> (raw)
In-Reply-To: m14ndlkby2.fsf@poto.westell.com

Hello,

Thomas S. Dye wrote:
> SabreWolfy <sabrewolfy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> I'm using Org ~7.8 and would like to prepare a document for export to HTML
>> to make available to others to read. This document will contain heading,
>> text, etc., R code (for my reference) and the output of the R code. Where
>> should I look to learn how to do this in R? Org-babel? 
>
> Org mode should do what you want pretty much out of the box.  Note that
> the exporters all changed with Org 8, so you'll want to distinguish
> between the old and new exporters if you look for information on line.
>
>> Is this literate programming?
>
> I don't think so.  The end result of literate programming is typically a
> computer program rather than a document.

Just for the sake of accuracy, I'd say that "the end result of literate
programming is typically both a computer program *and* its documentation".

Getting the code out of the mixed source is called "tangling", while
generating the documentation (which shows both the code and explains it at the
same time) is called "weaving".

For the rest, you've received all the needed information so far, I guess.

Little starter for your R code:

#+BEGIN_SRC R :results graphics :file testout.png
plot(1:10, (1:10)^2)
#+END_SRC

produces (when evaluated in the buffer):

#+results:
[[file:testout.png]]

Up to you to see whether you want to export (when generating the HTML
document) the code, its results, both or none, by setting correctly the
":exports" header argument.

Best regards,
  Seb

-- 
Sebastien Vauban

  reply	other threads:[~2013-05-29 17:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 15:33 Guidance for preparing document with code SabreWolfy
2013-05-29 16:06 ` Thomas S. Dye
2013-05-29 17:00   ` Sebastien Vauban [this message]
2013-05-29 17:28     ` SabreWolfy
2013-05-30 11:18     ` SabreWolfy
2013-05-29 17:26   ` SabreWolfy
2013-05-29 16:09 ` Thorsten Jolitz
2013-05-30 10:40   ` SabreWolfy
2013-05-29 16:13 ` Nick Dokos
2013-05-29 17:24   ` SabreWolfy
2013-05-29 17:47     ` Nick Dokos
2013-05-29 17:15 ` Marcin Borkowski
2013-05-29 17:30   ` SabreWolfy
2013-05-29 19:45     ` Marcin Borkowski

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=8638t5iuva.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).