emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Note/hint on latex export of listings w/ lstlistings


From: Robert Klein
Subject: [O] Note/hint on latex export of listings w/ lstlistings
Date: Thu, 09 Jan 2014 21:12:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi,

if you want to export e.g. config file snippets using src blocks,
you can

(add-to-list 'org-latex-listings-langs
             '(text " "))

in your configuration.


You have to take care to put a blank between the double quotes (" "
instead of "") or you can't run the export through (pdf)latex.


The reason is, the function org-latex--make-option-string returns
"language" for empty double quotes, resulting in e.g.:

\lstset{language,numbers=none}


A blank between the double quotes causes org-latex--make-option-string
to return "language= " and results in a latex-compilable:

\lstset{language= ,numbers=none}


This is nice to know, when you're documenting configurations or
configuration files.

Best regards
Robert






reply via email to

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