From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ista Zahn Subject: Re: Problem with org-mode and minted Date: Wed, 8 Apr 2015 15:37:00 -0400 Message-ID: References: <55251ADD.3010700@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfvms-00012e-Mx for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 15:37:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfvmr-0006hj-L8 for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 15:37:22 -0400 Received: from mail-ob0-x236.google.com ([2607:f8b0:4003:c01::236]:33942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfvmr-0006hb-Gq for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 15:37:21 -0400 Received: by obbgh1 with SMTP id gh1so145930225obb.1 for ; Wed, 08 Apr 2015 12:37:20 -0700 (PDT) In-Reply-To: <55251ADD.3010700@acm.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: azubi Cc: emacs-orgmode Mailinglist I think you just need to customize org-latex-minted-langs so that it maps C to c, e.g., (add-to-list 'org-latex-minted-langs '(C "c")) Best, Ista On Wed, Apr 8, 2015 at 8:11 AM, azubi wrote: > Hi all > > I've recently discovered babel (of org-mode) and I try to learn it. > I've discovered a little problem that I cannot solve. > > Consider the following (almost) minimal example: > > ==================================================== > * First example with language "c" > > #+BEGIN_SRC c :EXPORT results > printf ("First example \n"); > #+END_SRC > > * Second example with language "C" > > #+BEGIN_SRC C :EXPORT results > printf ("second example \n"); > #+END_SRC > > #+RESULTS: > : second example > ==================================================== > > The first example cannot be evaluated by a C-c C-c (?? due to the small "c" > ??). The second example is evaluated without any problem. > > I've configured org-mode to use "minted" to colorize the source code when it > is exported to latex. > > For the file above, the function "org-export-latex-to-pdf" gives the > expected result for the first example but nothing for the second one (?? due > to the big "C" ??). Minted understand "c" as a language but not "C". The > latex code produced by the command is (without the very long standard > preamble): > > ======================================================== > \begin{document} > > \maketitle > \tableofcontents > > \section{First example with language "c"} > \label{sec-1} > > \begin{minted}[]{c} > printf ("First example \n"); > \end{minted} > \section{Second example with language "C"} > \label{sec-2} > > \begin{minted}[]{C} > printf ("second example \n"); > \end{minted} > % Emacs 24.3.1 (Org mode 8.2.4) > \end{document} > =========================================================== > > What have I done wrong ? > > Thank you in advance for your help. > >