emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] show R commands in html export
@ 2010-07-19 11:51 Vikas Rawal
  2010-07-19 12:38 ` Rainer M Krug
  0 siblings, 1 reply; 3+ messages in thread
From: Vikas Rawal @ 2010-07-19 11:51 UTC (permalink / raw)
  To: emacs-orgmode

Is it possible that org-babel shows not just the output of R commands
but also R commands themselves in the html output?

I could perhaps write the commands twice, once outside the code block
(to make the commands appear as they are), and once inside the
codeblock to display output of those commands. But is there a better
solution?

If using them twice is the only way, what would be the best way to
set the code (when typed outside the codeblock) so that it is
formatted properly in the html output?

Vikas 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] show R commands in html export
  2010-07-19 11:51 [babel] show R commands in html export Vikas Rawal
@ 2010-07-19 12:38 ` Rainer M Krug
  2010-07-19 13:39   ` Vikas Rawal
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer M Krug @ 2010-07-19 12:38 UTC (permalink / raw)
  To: Vikas Rawal; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/07/2010 13:51, Vikas Rawal wrote:
> Is it possible that org-babel shows not just the output of R commands
> but also R commands themselves in the html output?

Yes. Look at the header argument exports: :

as stated in the manual:

14.8.2.5 :exports
The :exports header argument specifies what should be included in HTML
or LaTeX
exports of the Org-mode file.
? code The default. The body of code is included into the exported file.
E.g., :exports
code.
? results The result of evaluating the code is included in the exported
file. E.g.,
:exports results.
? both Both the code and results are included in the exported file.
E.g., :exports both.
? none Nothing is included in the exported file. E.g., :exports none.


That should solve your problem.

Cheers,

Rainer


> 
> I could perhaps write the commands twice, once outside the code block
> (to make the commands appear as they are), and once inside the
> codeblock to display output of those commands. But is there a better
> solution?
> 
> If using them twice is the only way, what would be the best way to
> set the code (when typed outside the codeblock) so that it is
> formatted properly in the html output?
> 
> Vikas 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxERzoACgkQoYgNqgF2egrzZwCfblz8+7ULmso9nn1E+3tjUcEP
VZ4An1P5Tyfi53kKXAGZNGoNKZz4IK0K
=aI5o
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] show R commands in html export
  2010-07-19 12:38 ` Rainer M Krug
@ 2010-07-19 13:39   ` Vikas Rawal
  0 siblings, 0 replies; 3+ messages in thread
From: Vikas Rawal @ 2010-07-19 13:39 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode


> 
> E.g., :exports both.

Works beautifully. 

Thanks very much,

Vikas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-19 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 11:51 [babel] show R commands in html export Vikas Rawal
2010-07-19 12:38 ` Rainer M Krug
2010-07-19 13:39   ` Vikas Rawal

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).