emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Problem with org-mode and minted


From: azubi
Subject: [O] Problem with org-mode and minted
Date: Wed, 08 Apr 2015 14:11:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]