emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel and R issue when exporting to PDF via LaTeX in Windows 7
@ 2011-01-02 19:31 Ben Ward
  2011-01-03 15:57 ` Erik Iverson
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Ward @ 2011-01-02 19:31 UTC (permalink / raw)
  To: emacs-orgmode

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}

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

* Re: Babel and R issue when exporting to PDF via LaTeX in Windows 7
  2011-01-02 19:31 Babel and R issue when exporting to PDF via LaTeX in Windows 7 Ben Ward
@ 2011-01-03 15:57 ` Erik Iverson
  2011-01-03 17:34   ` Ben Ward
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Iverson @ 2011-01-03 15:57 UTC (permalink / raw)
  To: Ben Ward; +Cc: emacs-orgmode



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.

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

* Re: Babel and R issue when exporting to PDF via LaTeX in Windows 7
  2011-01-03 15:57 ` Erik Iverson
@ 2011-01-03 17:34   ` Ben Ward
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Ward @ 2011-01-03 17:34 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode

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.

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

end of thread, other threads:[~2011-01-03 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-02 19:31 Babel and R issue when exporting to PDF via LaTeX in Windows 7 Ben Ward
2011-01-03 15:57 ` Erik Iverson
2011-01-03 17:34   ` Ben Ward

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