[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Footnotes and R output when exporting to HTML or Latex
From: |
Dan Davison |
Subject: |
Re: [Orgmode] Footnotes and R output when exporting to HTML or Latex |
Date: |
Wed, 28 Jan 2009 20:14:07 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Jan 21, 2009 at 03:39:36PM +0000, Graham Smith wrote:
> Mmmm, so busy concerened about the graphics I didn't realise I had
> such a major issue with footnotes.
>
> I am pasting R output into an org file which comes in like:
>
> > names(gq3hazard)
>
> [1] "H1a" "H1b" "H1c" "H2a" "H2b" "H2c" "H3a" "H3b"
>
> [9] "H3c" "H3d" "H4a" "H4b" "H4c" "H5a" "H5b" "H5c"
>
> [17] "Htotal"
Hi Graham,
An alternative might be to format output like this as an org table?
As Tom Short pointed out in another thread, you can use org-tblR.el
(was org-table-R.el) in a trivial way to do that without any
copy/pasting. For example you could use any of the following
||
#+TBLRR: x <- names(gq3hazard)
||
#+TBLRR: x <- t(names(gq3hazard))
||
#+TBLRR: x <- cbind(seq(length(gq3hazard)), names(gq3hazard))
With point in the #+TBLRR line, org-tblR-apply produces respectively
| |
|--------|
| H1a |
| H1b |
| H1c |
| H2a |
| H2b |
| H2c |
| H3a |
| H3b |
| H3c |
| H3d |
| H4a |
| H4b |
| H4c |
| H5a |
| H5b |
| H5c |
| Htotal |
#+TBLRR: x <- names(gq3hazard)
| | | | | | | | | | | | | |
| | | |
|-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--------|
| H1a | H1b | H1c | H2a | H2b | H2c | H3a | H3b | H3c | H3d | H4a | H4b | H4c |
H5a | H5b | H5c | Htotal |
#+TBLRR: x <- t(names(gq3hazard))
| | |
|----+--------|
| 1 | H1a |
| 2 | H1b |
| 3 | H1c |
| 4 | H2a |
| 5 | H2b |
| 6 | H2c |
| 7 | H3a |
| 8 | H3b |
| 9 | H3c |
| 10 | H3d |
| 11 | H4a |
| 12 | H4b |
| 13 | H4c |
| 14 | H5a |
| 15 | H5b |
| 16 | H5c |
| 17 | Htotal |
#+TBLRR: x <- cbind(seq(length(gq3hazard)), names(gq3hazard))
Dan
http://www.stats.ox.ac.uk/~davison/software/org-tbl-R/org-tblR.el
(NB The code now uses TBLRR: instead of TBLR::)
p.s. [Explanation if required/interested : TBLRR lines contain R code
that create an R variable called `x' that gets output to the org
buffer as an org table. In these cases a degenerate org table (||) is
provided, and the R code doesn't use it when creating the variable
x. For non-R users: "<-" is the assignment operator in R (you can also
use "="), cbind sticks two vectors together column-wise, t is the
transpose function.]
>
>
> I suspect some of you are ahead of me, becasue the Org mode export
> takes these to be footnotes so in the PDF I get
>
> > names(gq3hazard)
> 1
> "H1a" "H1b" "H1c" "H2a" "H2b" "H2c" "H3a" "H3b"
> $??9$ "H3c" "H3d" "H4a" "H4b" "H4c" "H5a" "H5b" "H5c"
> $??17$ "Htotal"
>
>
> with a footnote
>
> 1
> 5 3 7 > library(boot) > medianCI(na.omit(H1b))
>
> I have no idea where the >medianCI bit has come from but looking
> through the file, the spurious footnotes seems to be causing havoc
> with the layout.
>
>
> Is it possible to disable the footnote feature and then explicityly
> tell orgmode that a specific instance of square brackets should be
> interpreted as a footnote.
>
> Thanks,
>
> Graham
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
http://www.stats.ox.ac.uk/~davison
Re: [Orgmode] Footnotes and R output when exporting to HTML or Latex,
Dan Davison <=