[O] Re: [Orgmode] Re: Org Babel and R issue with pdf latex export

2011-02-28 Thread Ben Ward

On 28/02/2011 11:24, Rainer M Krug wrote:

On Mon, Feb 28, 2011 at 8:07 AM, Ben Wardbenjamin.w...@bathspa.org  wrote:

On Sun, 2011-02-27 at 21:35 -0800, Dan Davison wrote:

Ben Wardbenjamin.w...@bathspa.org  writes:


Hi,

I recently installed emacs, org-mode fresh on a new install of Arch
Linux. Before I had it working on Ubuntu.

I've installed everything as before and used the same .emacs file I had,
but if I use org to write out some R script and export to pdf via latex,
then I get an empty pdf document, with only the title and Contents
heading. However if I export to anything else such as html it works, and
shows me code and results.

Hi Ben,

Are you sure this problem concerns babel/R? What happens when you export
an Org document to pdf without any babel stuff?

Can you provide an example Org file that you are having trouble
exporting to pdf? The problem is probably in your local configuration,
so if no-one can jump to the solution then start from a minimal working
config and try to find the part of your .emacs which is causing the
problem.

Dan


Hi, I've tried exporting an org file that has no code in it to PDF and
it works without any trouble.

The file I'm trying to export is:
#+TITLE: Test
#+AUTHOR: Ben J. Ward
#+LATEX_CLASS: article
#+BABEL: :session *R* :results output
\pagebreak

Test:

#+begin_src R :exports both
x-c(1,2,3,4,5)
y-c(5,10,15,20)
x
y
xy-(x*y)
xy
#+end_src

When I use your example and export it to LaTeX,

I get this:

#
% Created 2011-02-28 Mon 12:21
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{color}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}
\begin{document}



\title{Test}
\author{Ben J. Ward}
\date{28 February 2011}
\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
The file I'm trying to export is:
\pagebreak

Test:

\lstset{language=R}
\begin{lstlisting}
x-c(1,2,3,4,5)
y-c(5,10,15,20)
x
y
xy-(x*y)
xy
\end{lstlisting}

\begin{verbatim}
  [1] 1 2 3 4 5
  [1]  5 10 15 20
  Warning message:
  In x * y : longer object length is not a multiple of shorter object length
  [1]  5 20 45 80 25
\end{verbatim}



\end{document}
#
So it works for me - have you tried to export to LaTex? If that works,
it is a LaTeX / pdf issue.

Rainer

Hi, I've just tried and I still get the same as before, but it works to 
latex, when there is no src code chunks.

This is my .emacs:

(require 'ess-site)
(require 'org-install)
(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
(global-set-key \C-cl 'org-store-link)
(global-set-key \C-cc 'org-capture)
(global-set-key \C-ca 'org-agenda)
(global-set-key \C-cb 'org-iswitchb)
(transient-mark-mode 1)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (emacs-lisp . t)
   ))

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(org-confirm-babel-evaluate nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

Thanks,
Ben W.


I can include my .emacs although it's lengthy.

I uninstalled all of my emacs stuff, and installed it from the vanilla
downloads on their respective sites, and I'm still getting the same
result. I'm considering removing all my tex stuff and installing the
vanilla texlive too.

Thanks,
Ben W.


I've tried even installing a version of org
mode from source, using the build system my distro has, so as it's made
and installed to exactly the right place, but I still don't have any
luck. The texlive version I'm using is from my distro's package manager.
Using C-c C-c to evaluate on the fly works. I had an issue getting org
and babel to work with R on Windows 7 as well, but it was because
certain tex packages were missing and I recieved a message when I tried
to export, but nothing comes up here.

Would the recent change:
Org-babel is now inside org, remove (require 'org-babel-init)
   and alike from your .emacs.
   Look at http://orgmode.org/Changes.html#ob-configuration-changes
   for overview of the settings.
Be causing the entire issue?

The .tex file I get out is thus:
% Created 2011-02-28 Mon 03:47
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}

Re: [O] Re: [Orgmode] Re: Org Babel and R issue with pdf latex export

2011-02-28 Thread Ben Ward
On Mon, 2011-02-28 at 11:56 -0600, Erik Iverson wrote:
 Ben,
 
 And what about your .Rprofile. Since your R code does produce
 a warning, I wonder if you have instructed R to take some
 special action when it sees one?
 

R on my system is as default with no special instruction by me. Tried
removing the source of error in the code block, still no luck. My *R*
Buffer contains:

 options(STERM='iESS', editor='emacsclient')
 x-c(1,2,3,4,5)
y-c(5,10,15,20)
x
y
'org_babel_R_eoe'
x-c(1,2,3,4,5)
 y-c(5,10,15,20)
 x
[1] 1 2 3 4 5
 y
[1]  5 10 15 20
 'org_babel_R_eoe'
[1] org_babel_R_eoe
 

Thanks,
Ben.

 --Erik
 
 Ben Ward wrote:
  On 28/02/2011 11:24, Rainer M Krug wrote:
  On Mon, Feb 28, 2011 at 8:07 AM, Ben Wardbenjamin.w...@bathspa.org  
  wrote:
  On Sun, 2011-02-27 at 21:35 -0800, Dan Davison wrote:
  Ben Wardbenjamin.w...@bathspa.org  writes:
 
  Hi,
 
  I recently installed emacs, org-mode fresh on a new install of Arch
  Linux. Before I had it working on Ubuntu.
 
  I've installed everything as before and used the same .emacs file I 
  had,
  but if I use org to write out some R script and export to pdf via 
  latex,
  then I get an empty pdf document, with only the title and Contents
  heading. However if I export to anything else such as html it 
  works, and
  shows me code and results.
  Hi Ben,
 
  Are you sure this problem concerns babel/R? What happens when you 
  export
  an Org document to pdf without any babel stuff?
 
  Can you provide an example Org file that you are having trouble
  exporting to pdf? The problem is probably in your local configuration,
  so if no-one can jump to the solution then start from a minimal working
  config and try to find the part of your .emacs which is causing the
  problem.
 
  Dan
 
  Hi, I've tried exporting an org file that has no code in it to PDF and
  it works without any trouble.
 
  The file I'm trying to export is:
  #+TITLE: Test
  #+AUTHOR: Ben J. Ward
  #+LATEX_CLASS: article
  #+BABEL: :session *R* :results output
  \pagebreak
 
  Test:
 
  #+begin_src R :exports both
  x-c(1,2,3,4,5)
  y-c(5,10,15,20)
  x
  y
  xy-(x*y)
  xy
  #+end_src
  When I use your example and export it to LaTeX,
 
  I get this:
 
  #
  % Created 2011-02-28 Mon 12:21
  \documentclass[11pt]{article}
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage{fixltx2e}
  \usepackage{graphicx}
  \usepackage{longtable}
  \usepackage{float}
  \usepackage{wrapfig}
  \usepackage{soul}
  \usepackage{textcomp}
  \usepackage{marvosym}
  \usepackage{wasysym}
  \usepackage{latexsym}
  \usepackage{amssymb}
  \usepackage{hyperref}
  \tolerance=1000
  \usepackage{color}
  \usepackage{listings}
  \providecommand{\alert}[1]{\textbf{#1}}
  \begin{document}
 
 
 
  \title{Test}
  \author{Ben J. Ward}
  \date{28 February 2011}
  \maketitle
 
  \setcounter{tocdepth}{3}
  \tableofcontents
  \vspace*{1cm}
  The file I'm trying to export is:
  \pagebreak
 
  Test:
 
  \lstset{language=R}
  \begin{lstlisting}
  x-c(1,2,3,4,5)
  y-c(5,10,15,20)
  x
  y
  xy-(x*y)
  xy
  \end{lstlisting}
 
  \begin{verbatim}
[1] 1 2 3 4 5
[1]  5 10 15 20
Warning message:
In x * y : longer object length is not a multiple of shorter object 
  length
[1]  5 20 45 80 25
  \end{verbatim}
 
 
 
  \end{document}
  #
  So it works for me - have you tried to export to LaTex? If that works,
  it is a LaTeX / pdf issue.
 
  Rainer
 
  Hi, I've just tried and I still get the same as before, but it works to 
  latex, when there is no src code chunks.
  This is my .emacs:
  
  (require 'ess-site)
  (require 'org-install)
  (add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
  (global-set-key \C-cl 'org-store-link)
  (global-set-key \C-cc 'org-capture)
  (global-set-key \C-ca 'org-agenda)
  (global-set-key \C-cb 'org-iswitchb)
  (transient-mark-mode 1)
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((R . t)
 (emacs-lisp . t)
 ))
  
  (custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
   '(org-confirm-babel-evaluate nil))
  (custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
   )
  
  Thanks,
  Ben W.
  
  I can include my .emacs although it's lengthy.
 
  I uninstalled all of my emacs stuff, and installed it from the vanilla
  downloads on their respective sites, and I'm still getting the same
  result. I'm considering removing all my tex stuff and installing the
  vanilla texlive too.
 
  Thanks,
  Ben W.
 
  I've tried even installing a version of org
  mode from source, using the build system my

[Orgmode] Org-Babel and R - no latex output

2011-02-27 Thread Ben Ward
Hi,

I recently installed emacs, org-mode fresh on a new install of Arch
Linux. Before I had it working on Ubuntu.

I've installed everything as before and used the same .emacs file I had,
but if I use org to write out some R script and export to pdf via latex,
then I get an empty pdf document, with only the title and Contents
heading. However if I export to anything else such as html it works, and
shows me code and results. I've tried even installing a version of org
mode from source, using the build system my distro has, so as it's made
and installed to exactly the right place, but I still don't have any
luck. The texlive version I'm using is from my distro's package manager.
Using C-c C-c to evaluate on the fly works. I had an issue getting org
and babel to work with R on Windows 7 as well, but it was because
certain tex packages were missing and I recieved a message when I tried
to export, but nothing comes up here. 

Would the recent change:
Org-babel is now inside org, remove (require 'org-babel-init) 
  and alike from your .emacs.
  Look at http://orgmode.org/Changes.html#ob-configuration-changes 
  for overview of the settings.
Be causing the entire issue?

The .tex file I get out is thus:
% Created 2011-02-28 Mon 03:47
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\providecommand{\alert}[1]{\textbf{#1}}
\begin{document}



\title{Test}
\author{Ben J. Ward}
\date{28 February 2011}
\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\end{document}

Thanks,
Ben W.


___
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


[Orgmode] Org Babel and R issue with pdf latex export

2011-02-27 Thread Ben Ward
Hi,

I recently installed emacs, org-mode fresh on a new install of Arch
Linux. Before I had it working on Ubuntu.

I've installed everything as before and used the same .emacs file I had,
but if I use org to write out some R script and export to pdf via latex,
then I get an empty pdf document, with only the title and Contents
heading. However if I export to anything else such as html it works, and
shows me code and results. I've tried even installing a version of org
mode from source, using the build system my distro has, so as it's made
and installed to exactly the right place, but I still don't have any
luck. The texlive version I'm using is from my distro's package manager.
Using C-c C-c to evaluate on the fly works. I had an issue getting org
and babel to work with R on Windows 7 as well, but it was because
certain tex packages were missing and I recieved a message when I tried
to export, but nothing comes up here. 

Would the recent change:
Org-babel is now inside org, remove (require 'org-babel-init) 
  and alike from your .emacs.
  Look at http://orgmode.org/Changes.html#ob-configuration-changes 
  for overview of the settings.
Be causing the entire issue?

The .tex file I get out is thus:
% Created 2011-02-28 Mon 03:47
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\providecommand{\alert}[1]{\textbf{#1}}
\begin{document}



\title{Test}
\author{Ben J. Ward}
\date{28 February 2011}
\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\end{document}

Thanks,
Ben W.
(Apologies if this has been sent twice, first time an error occured)


___
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


[Orgmode] Re: Org Babel and R issue with pdf latex export

2011-02-27 Thread Ben Ward
On Sun, 2011-02-27 at 21:35 -0800, Dan Davison wrote:
 Ben Ward benjamin.w...@bathspa.org writes:
 
  Hi,
 
  I recently installed emacs, org-mode fresh on a new install of Arch
  Linux. Before I had it working on Ubuntu.
 
  I've installed everything as before and used the same .emacs file I had,
  but if I use org to write out some R script and export to pdf via latex,
  then I get an empty pdf document, with only the title and Contents
  heading. However if I export to anything else such as html it works, and
  shows me code and results.
 
 Hi Ben,
 
 Are you sure this problem concerns babel/R? What happens when you export
 an Org document to pdf without any babel stuff?
 
 Can you provide an example Org file that you are having trouble
 exporting to pdf? The problem is probably in your local configuration,
 so if no-one can jump to the solution then start from a minimal working
 config and try to find the part of your .emacs which is causing the
 problem.
 
 Dan
 
Hi, I've tried exporting an org file that has no code in it to PDF and
it works without any trouble. 

The file I'm trying to export is:
#+TITLE: Test
#+AUTHOR: Ben J. Ward
#+LATEX_CLASS: article
#+BABEL: :session *R* :results output
\pagebreak

Test:

#+begin_src R :exports both
x-c(1,2,3,4,5)
y-c(5,10,15,20)
x
y
xy-(x*y)
xy
#+end_src

I can include my .emacs although it's lengthy.

I uninstalled all of my emacs stuff, and installed it from the vanilla
downloads on their respective sites, and I'm still getting the same
result. I'm considering removing all my tex stuff and installing the
vanilla texlive too.

Thanks,
Ben W.

 
  I've tried even installing a version of org
  mode from source, using the build system my distro has, so as it's made
  and installed to exactly the right place, but I still don't have any
  luck. The texlive version I'm using is from my distro's package manager.
  Using C-c C-c to evaluate on the fly works. I had an issue getting org
  and babel to work with R on Windows 7 as well, but it was because
  certain tex packages were missing and I recieved a message when I tried
  to export, but nothing comes up here. 
 
  Would the recent change:
  Org-babel is now inside org, remove (require 'org-babel-init) 
and alike from your .emacs.
Look at http://orgmode.org/Changes.html#ob-configuration-changes 
for overview of the settings.
  Be causing the entire issue?
 
  The .tex file I get out is thus:
  % Created 2011-02-28 Mon 03:47
  \documentclass[11pt]{article}
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage{fixltx2e}
  \usepackage{graphicx}
  \usepackage{longtable}
  \usepackage{float}
  \usepackage{wrapfig}
  \usepackage{soul}
  \usepackage{textcomp}
  \usepackage{marvosym}
  \usepackage{wasysym}
  \usepackage{latexsym}
  \usepackage{amssymb}
  \usepackage{hyperref}
  \tolerance=1000
  \providecommand{\alert}[1]{\textbf{#1}}
  \begin{document}
 
 
 
  \title{Test}
  \author{Ben J. Ward}
  \date{28 February 2011}
  \maketitle
 
  \setcounter{tocdepth}{3}
  \tableofcontents
  \vspace*{1cm}
 
  \end{document}
 
  Thanks,
  Ben W.
  (Apologies if this has been sent twice, first time an error occured)
 
 
  ___
  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
 



___
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


[Orgmode] Images from R in LaTeX and PDF

2011-01-07 Thread Ben Ward

Hi All,

I've been doing some work with babel and R to generate graphs that I've 
then been including useing attr latex.


But when I include images the always appear very very small, even when I 
mess about with the width settings of the attr latex line and remove the 
options for wrap and such.


Does anybody else use R with images and org, and could tell me how they 
handle including R graphics in their documents?


Thanks,
Ben. W

___
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


Re: [Orgmode] Images from R in LaTeX and PDF

2011-01-07 Thread Ben Ward


#+begin_src R :exports both
 full - read.csv(file=~/Documents/BSc Biology/Third Year/BY6001-40 - 
Dissertation/Data and Analysis/Evolution Results.csv, head=T)

 library(lattice)
 ecoli = subset(full, Bacterium==E.coli)
 edett = subset(ecoli, Cleaner==Dettol)
 egarl = subset(ecoli, Cleaner==Garlic)
MIC.mod = lm(MIC. ~ 1+Challenge*Cleaner*Replicate, data=ecoli)
#+end_src

#+begin_src R :file fig1.pdf
 xyplot( MIC.+fitted(MIC.mod) ~ Challenge, data=ecoli, 
xlab=Challenge, ylab=MIC %, auto.key=TRUE)

#+end_src

#+attr_latex: width=0.6\textwidth wrap placement={h}{0.4\textwidth}
#+label: fig:one
#+caption: Linar Plot of real data and fitted model values
#+results: fig1
[[file:fig1.pdf]]

In the case of this code, actually altering size works, but it keeps 
putting the image at the end of my document. Then other images, placed 
with pretty much the same code, give or take for filenames and such, 
won't increace in size, but will alter their movement.

I'm wondering if using pure latex for my images would be an easier solution.

Cheers,
Ben.


On 07/01/2011 18:30, Thomas S. Dye wrote:

Aloha Ben,

Can you share an example that doesn't work for you?

All the best,
Tom

On Jan 7, 2011, at 7:23 AM, Ben Ward wrote:


Hi All,

I've been doing some work with babel and R to generate graphs that 
I've then been including useing attr latex.


But when I include images the always appear very very small, even 
when I mess about with the width settings of the attr latex line and 
remove the options for wrap and such.


Does anybody else use R with images and org, and could tell me how 
they handle including R graphics in their documents?


Thanks,
Ben. W

___
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







___
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


Re: [Orgmode] Images from R in LaTeX and PDF

2011-01-07 Thread Ben Ward
I'm using 7.4, which I think (unless a new versions recently arisen), 
the latest one, as it was recommended for interacting with R through babel.


Thanks,
Ben W.
On 07/01/2011 19:45, Erik Iverson wrote:

And what version of org are you using?

Ben Ward wrote:


#+begin_src R :exports both
 full - read.csv(file=~/Documents/BSc Biology/Third Year/BY6001-40 
- Dissertation/Data and Analysis/Evolution Results.csv, head=T)

 library(lattice)
 ecoli = subset(full, Bacterium==E.coli)
 edett = subset(ecoli, Cleaner==Dettol)
 egarl = subset(ecoli, Cleaner==Garlic)
MIC.mod = lm(MIC. ~ 1+Challenge*Cleaner*Replicate, data=ecoli)
#+end_src

#+begin_src R :file fig1.pdf
 xyplot( MIC.+fitted(MIC.mod) ~ Challenge, data=ecoli, 
xlab=Challenge, ylab=MIC %, auto.key=TRUE)

#+end_src

#+attr_latex: width=0.6\textwidth wrap placement={h}{0.4\textwidth}
#+label: fig:one
#+caption: Linar Plot of real data and fitted model values
#+results: fig1
[[file:fig1.pdf]]

In the case of this code, actually altering size works, but it keeps 
putting the image at the end of my document. Then other images, 
placed with pretty much the same code, give or take for filenames and 
such, won't increace in size, but will alter their movement.
I'm wondering if using pure latex for my images would be an easier 
solution.


Cheers,
Ben.


On 07/01/2011 18:30, Thomas S. Dye wrote:

Aloha Ben,

Can you share an example that doesn't work for you?

All the best,
Tom

On Jan 7, 2011, at 7:23 AM, Ben Ward wrote:


Hi All,

I've been doing some work with babel and R to generate graphs that 
I've then been including useing attr latex.


But when I include images the always appear very very small, even 
when I mess about with the width settings of the attr latex line 
and remove the options for wrap and such.


Does anybody else use R with images and org, and could tell me how 
they handle including R graphics in their documents?


Thanks,
Ben. W

___
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







___
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






___
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


Re: [Orgmode] Babel and R issue when exporting to PDF via LaTeX in Windows 7

2011-01-03 Thread Ben Ward

On 03/01/2011 15:57, Erik Iverson wrote:



Ben Ward wrote:

Hi, all, I hope someone can help with this issue,

Unfortunately I'm having a work PC upgrade, and it means Windows 7 
and the order not to install any other system on it for compatibility 
and for the IT experts - I use the term loosely, to only need to know 
how to use one system.


Im trying to get org-mode set up with emacs so I can icorporate R 
code in my documents - like Sweave functionality. I have this 
achieved in Arch Linux. Howeer when I export to PDF in Windows 7 I'm 
just getting a PDF with Titl, Author, Date, and Contents and then no 
R stuff.


Is R in your path?  ESS uses its own tricks to find a valid version
of R on your system, but I think org-mode will just use your system
path, if I recall correctly.



Thats it! It works now =] I didn't realise/forgot Windows 7 needed stuff 
to be added to the path manually, I've not needed to do it on my other 
systems. I assumed the lovely .exe installer wizards would take care of 
such things when installing stuff.


Thanks,
Ben.

___
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


[Orgmode] Babel and R issue when exporting to PDF via LaTeX in Windows 7

2011-01-02 Thread Ben Ward

Hi, all, I hope someone can help with this issue,

Unfortunately I'm having a work PC upgrade, and it means Windows 7 and 
the order not to install any other system on it for compatibility and 
for the IT experts - I use the term loosely, to only need to know how to 
use one system.


Im trying to get org-mode set up with emacs so I can icorporate R code 
in my documents - like Sweave functionality. I have this achieved in 
Arch Linux. Howeer when I export to PDF in Windows 7 I'm just getting a 
PDF with Titl, Author, Date, and Contents and then no R stuff.


I have set up emacs by extracting emacs-23.2-bin-i386. Program Files, 
and I ran addpm.exe. My home is set to C:\Users\My Name and in that 
location, I have a folder .emacs.d, which contains my init.el, because 
it's awkward to begin a filename with a dot.


I extracted the vaniall ESS zip file to C:\Program 
Files\emacs-23.2-bin-i386\site-lisp, and I did the same for org 7.4.


I then had the following init.el setup:

 ;; Loading ESS
 (require 'ess-site)

 ;; Loading Org-Mode
 (require 'org-install)
 (add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
 (global-set-key \C-cl 'org-store-link)
 (global-set-key \C-ca 'org-agenda)
 (global-set-key \C-cb 'org-iswitchb)
 (global-font-lock-mode 1)
 (transient-mark-mode 1)

 ;; Babel Configuration
 (org-babel-do-load-languages 'org-babel-load-languages '((R . 
t)(ditaa . t)(dot . t)(emacs-lisp . t)(gnuplot . nil)(haskell . 
nil)(latex . t)(ocaml . nil)(perl . t)(python . t)(ruby . t)(screen . 
nil)(sh . t)(sql . nil)(sqlite . nil)))


This in Linux: the extraction and installation of ess, and install of 
org 7.4 (in Linux I would use make install, but in Windows when I just 
extract it to site-lisp, and then go into Emacs with the above init file 
and do M-x org and show the version number it changes from the old 5.** 
to 7.4, so it's clearly loading the right stuff), would normally be 
enough for everything to work. However in Windows I'm getting blank 
PDF's without any R stuff, although I did do a HTML export and the R 
code and results did get included into that.


The org file with test R code is really very simple:

 #+TITLE: A Test of the org-babel features with the R Stats Language, 
with a Windows 7 setup.

#+AUTHOR: Ben J. Ward
#+BABEL: :session *R* :results output

Below is code generating a vector calld data, and then a call of it's 
name that should display the numbers that make it up:


#+begin_src R :exports both
data - c(1,2,3,4,5)
data
#+end_src

I've tried first with TeXLive and then with MiKTeX and I've had trouble 
with both. Yet the evaluation through ESS is definately working: I can 
do C-c C-c on code chunks and get the familar #+results: line in my org 
file as I do it.


My Linux install uses TeXLive - incase it's relevant.

If anyone can give me some advice or instruction with this I'd be 
eternally grateful.


Thanks,
Ben Ward.

--
For extra information, you can see the intermediate .tex file produced, 
below - it doesent contain any verbatim of code or output of R:


 % Created 2011-01-02 Sun 19:25

 \documentclass[11pt]{article}

 \usepackage[latin1]{inputenc}

 \usepackage[T1]{fontenc}

 \usepackage{fixltx2e}

 \usepackage{graphicx}

 \usepackage{longtable}

 \usepackage{float}

 \usepackage{wrapfig}

 \usepackage{soul}

 \usepackage{textcomp}

 \usepackage{marvosym}

 \usepackage{wasysym}

 \usepackage{latexsym}

 \usepackage{amssymb}

 \usepackage{hyperref}

 \tolerance=1000

 \providecommand{\alert}[1]{\textbf{#1}}

 \begin{document}

 \title{A Test of the org-babel features with the R Stats Language, 
with a Windows 7 setup.}


 \author{Ben J. Ward}

 \date{02 January 2011}

 \maketitle

 \setcounter{tocdepth}{3}

 \tableofcontents

 \vspace*{1cm}

 \end{document}




___
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