emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-mode latex-export minted problem
@ 2011-11-16 11:48 Piotr Kaźmierczak
  2011-11-16 12:55 ` Niels Giesen
  0 siblings, 1 reply; 2+ messages in thread
From: Piotr Kaźmierczak @ 2011-11-16 11:48 UTC (permalink / raw)
  To: emacs-orgmode

Hi, 

I'm having a hard time configuring org-mode LaTeX export to work with minted package for code listings. I put 

#+LaTeX_HEADER: \usepackage{minted}
#+LaTeX_HEADER: \usemintedstyle{emacs}

in the header of my org mode file, and then 

#+BEGIN_SRC haskell :exports code
some haskell code here
#+END_SRC

when I wanted to put the code listing. My .emacs has a proper minted configuration for org-mode set, too:

; minted latex export
(setq org-export-latex-listings 'minted)
(setq org-export-latex-minted-options
      '(("frame" "lines")
        ("fontsize" "\\scriptsize")
        ("linenos" "")))
(setq org-latex-to-pdf-process
      '("pdflatex -shell-escape -interaction nonstopmode %s"
        "pdflatex -shell-escape -interaction nonstopmode %s"
        "pdflatex -shell-escape -interaction nonstopmode %s"))

but whenever I export the org-mode buffer to LaTeX, I get my listings wrapped around \begin{lstlisting} and \end{lstlisting}. 

What am I missing here?

cheers;
Piotr
--
Dept. of Computer Engineering, Bergen University College
Postboks 7030, 5020 Bergen, Norway
(+47) 55 58 75 88
http://soundandcomplete.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Org-mode latex-export minted problem
  2011-11-16 11:48 Org-mode latex-export minted problem Piotr Kaźmierczak
@ 2011-11-16 12:55 ` Niels Giesen
  0 siblings, 0 replies; 2+ messages in thread
From: Niels Giesen @ 2011-11-16 12:55 UTC (permalink / raw)
  To: Orgmode; +Cc: iotr Kaźmierczak

Piotr Kaźmierczak <p.h.kazmierczak@gmail.com> writes:

> Hi, 
>
> I'm having a hard time configuring org-mode LaTeX export to work with minted package for code listings. I put 
>
> #+LaTeX_HEADER: \usepackage{minted}
> #+LaTeX_HEADER: \usemintedstyle{emacs}
>
> in the header of my org mode file, and then 
>
> #+BEGIN_SRC haskell :exports code
> some haskell code here
> #+END_SRC
>
> when I wanted to put the code listing. My .emacs has a proper minted configuration for org-mode set, too:
>
> ; minted latex export
> (setq org-export-latex-listings 'minted)
> (setq org-export-latex-minted-options
>       '(("frame" "lines")
>         ("fontsize" "\\scriptsize")
>         ("linenos" "")))
> (setq org-latex-to-pdf-process
>       '("pdflatex -shell-escape -interaction nonstopmode %s"
>         "pdflatex -shell-escape -interaction nonstopmode %s"
>         "pdflatex -shell-escape -interaction nonstopmode %s"))
>
Hi Piotr,

Try and narrow down the problem:

1. Start Emacs with the -q option,
2. Open test.org, which is

* Test minted export

#+begin_src emacs-lisp
;; minted latex export
(setq org-export-latex-listings 'minted
      org-export-latex-minted-options
      '(("frame" "lines")
        ("fontsize" "\\scriptsize")
        ("linenos" "")))
#+end_src


3. Evaluate the emacs-lisp block in test.org
4. Press C-c C-e L

With me, this outputs the src block correctly, namely as

\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{common-lisp}
; minted latex export
(setq org-export-latex-listings 'minted
      org-export-latex-minted-options
      '(("frame" "lines")
        ("fontsize" "\\scriptsize")
        ("linenos" "")))
\end{minted}

If you get the same output, something else in your .emacs or custom.el
or so must play you parts, if not, you may have to check your org mode
version.

Regards, Niels.

-- 
http://pft.github.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-16 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 11:48 Org-mode latex-export minted problem Piotr Kaźmierczak
2011-11-16 12:55 ` Niels Giesen

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).