emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ben Ward <benjamin.ward@bathspa.org>
To: emacs-orgmode@gnu.org
Subject: Babel and R issue when exporting to PDF via LaTeX in Windows 7
Date: Sun, 2 Jan 2011 19:31:39 +0000	[thread overview]
Message-ID: <BLU0-SMTP1882B18173EC09C56C77CCEF5060@phx.gbl> (raw)

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}

             reply	other threads:[~2011-01-02 19:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 19:31 Ben Ward [this message]
2011-01-03 15:57 ` Babel and R issue when exporting to PDF via LaTeX in Windows 7 Erik Iverson
2011-01-03 17:34   ` Ben Ward

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU0-SMTP1882B18173EC09C56C77CCEF5060@phx.gbl \
    --to=benjamin.ward@bathspa.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).