Since I sometimes use the open-source statistics environment R (http://www.r-project.org) as well as ConTeXt, I thought a module that could typeset R code as well as evaluate it on the fly would be useful. Borrowing largely without understanding but lots of trial and eror from m-gnustep.tex, I came up with the attached. Limited testing indicates it works, but at least one problem is apparent: the R code snippets have one unnecessary line break to start them and two after the end. How can I fix that? Of course, any other suggestions are also welcome. A recent R needs to be in the path, but given that, it seems to work on Windows XP as well as Linux. Regards, Johan PS Emacs users may appreciate the following to get r-mode where appropriate: (require 'mmm-mode) (setq mmm-global-mode 'maybe) (setq mmm-submode-decoration-level 2) (mmm-add-group 'context-plus '((context-MP :submode metapost-mode :face mmm-code-submode-face :front ".*\\\\start\\w*MP\\w*\\({\\w*}\\|\\[\\w*\\]\\|\\)\\W" :back ".*\\\\stop\\w*MP") (context-R :submode r-mode :face mmm-comment-submode-face :front ".*\\\\startR.*\\W" :back ".*\\\\stopR.*"))) (add-to-list 'mmm-mode-ext-classes-alist '(context-mode nil context-plus)) -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden "What is wanted is not the will to believe, but the will to find out, which is the exact opposite" - Bertrand Russell