Ista Zahn <istaz...@gmail.com> writes: > Hi all, > > I'm having trouble modifying the example at > http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-3 > to highlight R code blocks. The trouble seems to be that org-mode > identifies R blocks using uppercase R, while pygments looks for > lowercase r. > > For example, org exports > > \begin{minted}{R} > 2+2 > \end{minted} > > but pygments doesn't know how to highlight R. If I change to > > \begin{minted}{r} > 2+2 > \end{minted} > > (note the lower case r) then it works, but of course I don't want to > have to perform a find-and-replace every time. > > Do you know how to either a) make org-mode identify R blocks with a > lowercase r, or b) make pygments recognize uppercase R, or c) some > other solution I've overlooked? > > Thanks! > Ista > >
Hi Ista, Put the following expression: (add-to-list 'org-export-latex-minted-langs '(R "r")) in an emacs-lisp code block at the beginning of your org file (or in the *scratch* buffer) and evaluate it. Christophe -- Président, Nicolas Sarkozy représente une sorte de triomphe bouffon de l'égalitarisme français ; pour la première fois de notre histoire, nous avons un chef de l'État qui se comporte comme s'il ne valait pas mieux que les citoyens. C'est en réalité toujours le cas, mais cette vérité doit être cachée pour que les institutions et le système social tournent de façon, si ce n'est harmonieuse, du moins raisonnable. E. Todd, Après la démocratie. -- Christophe Pouzat MAP5 - Mathématiques Appliquées à Paris 5 CNRS UMR 8145 45, rue des Saints-Pères 75006 PARIS France tel: +33142863828 mobile: +33662941034 web: http://www.biomedicale.univ-paris5.fr/physcerv/C_Pouzat.html