From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Ward Subject: Babel and R issue when exporting to PDF via LaTeX in Windows 7 Date: Sun, 2 Jan 2011 19:31:39 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=48724 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZTee-0002NN-H1 for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:31:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZTea-0006v7-Sd for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:31:46 -0500 Received: from blu0-omc1-s26.blu0.hotmail.com ([65.55.116.37]:22389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZTea-0006v1-QI for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:31:44 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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}