emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* listing org source blocks in LaTeX
@ 2010-09-13 21:26 Thomas S. Dye
  2010-09-24 14:00 ` Sébastien Vauban
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas S. Dye @ 2010-09-13 21:26 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

Aloha all,

Has anyone configured the listings package to recognize org source  
code blocks?

On LaTeX export, I get this:

> \lstset{language=org}
>
> org-buffer-color() $\equiv$
> \begin{lstlisting}
> #+LaTeX_CLASS_OPTIONS: [color]
> \end{lstlisting}

The listings package throws an error when it sees language=org.  It  
does just fine with source code blocks in other languages.

All the best,
Tom


[-- Attachment #1.2: Type: text/html, Size: 1139 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: listing org source blocks in LaTeX
  2010-09-13 21:26 listing org source blocks in LaTeX Thomas S. Dye
@ 2010-09-24 14:00 ` Sébastien Vauban
  2010-09-24 15:26   ` Eric Schulte
  0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Vauban @ 2010-09-24 14:00 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Thomas,

"Thomas S. Dye" wrote:
> Has anyone configured the listings package to recognize org source code
> blocks?
>
> On LaTeX export, I get this:
>
>> \lstset{language=org}
>>
>> org-buffer-color() $\equiv$
>> \begin{lstlisting}
>> #+LaTeX_CLASS_OPTIONS: [color]
>> \end{lstlisting}
>
> The listings package throws an error when it sees language=org.

Normal. It is unknown... unluckily!


> It does just fine with source code blocks in other languages.

I remember that Dan or Eric once told us to play with the following var:

--8<---------------cut here---------------start------------->8---
;; mapping between languages (listings in LaTeX) and their major mode
;; (in Emacs)
(setq org-src-lang-modes
      '(("ocaml" . tuareg)
        ("elisp" . emacs-lisp)
        ;; ("Delphi" . perl)
        ("ditaa" . artist)
        ("asymptote" . asy)
        ("dot" . fundamental)))
--8<---------------cut here---------------end--------------->8---

Though, not sure it's set up in a right way. And, yes, this should be set up
properly in Org, I guess, instead of relying on the users to make this
customization?

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: listing org source blocks in LaTeX
  2010-09-24 14:00 ` Sébastien Vauban
@ 2010-09-24 15:26   ` Eric Schulte
  2010-09-24 19:00     ` Sébastien Vauban
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Schulte @ 2010-09-24 15:26 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

>>
>> The listings package throws an error when it sees language=org.
>
> Normal. It is unknown... unluckily!
>

I've used the following for org-mode listings

--8<---------------cut here---------------start------------->8---
  \lstdefinelanguage{org}
  {
    morekeywords={:results, :session, :var, :noweb, :exports},
    sensitive=false,
    morecomment=[l]{\#},
    morestring=[b]",
  }
--8<---------------cut here---------------end--------------->8---

Best -- Eric

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

* Re: listing org source blocks in LaTeX
  2010-09-24 15:26   ` Eric Schulte
@ 2010-09-24 19:00     ` Sébastien Vauban
  0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Vauban @ 2010-09-24 19:00 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

>>> The listings package throws an error when it sees language=org.
>>
>> Normal. It is unknown... unluckily!
>
> I've used the following for org-mode listings
>
>   \lstdefinelanguage{org}
>   {
>     morekeywords={:results, :session, :var, :noweb, :exports},
>     sensitive=false,
>     morecomment=[l]{\#},
>     morestring=[b]",
>   }

I'll try it out. Thanks!

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-09-24 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 21:26 listing org source blocks in LaTeX Thomas S. Dye
2010-09-24 14:00 ` Sébastien Vauban
2010-09-24 15:26   ` Eric Schulte
2010-09-24 19:00     ` Sébastien Vauban

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