mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 21:02:51 +00:00
LaTeX export: Modify the structure of the listings name option.
The variable `org-export-latex-listings-langs' is now an alist.
This commit is contained in:
parent
a48fe32c4c
commit
0a7e8ab221
|
@ -1,3 +1,12 @@
|
||||||
|
2009-08-23 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-format-source-code-or-example): Deal wit
|
||||||
|
the new structure of the `org-export-latex-listings-langs'
|
||||||
|
variable.
|
||||||
|
|
||||||
|
* org-latex.el (org-export-latex-listings-langs): Change structure
|
||||||
|
of the variable from plist to alist.
|
||||||
|
|
||||||
2009-08-21 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-08-21 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org.el (org-in-commented-line): New function.
|
* org.el (org-in-commented-line): New function.
|
||||||
|
|
|
@ -2323,9 +2323,13 @@ INDENT was the original indentation of the block."
|
||||||
(if org-export-latex-listings
|
(if org-export-latex-listings
|
||||||
(concat
|
(concat
|
||||||
(if lang
|
(if lang
|
||||||
(let* ((lang-sym (intern (concat ":" lang)))
|
(let*
|
||||||
(lstlang (or (plist-get org-export-latex-listings-langs
|
((lang-sym (intern lang))
|
||||||
lang-sym)
|
(lstlang
|
||||||
|
(or (cadr
|
||||||
|
(assq
|
||||||
|
lang-sym
|
||||||
|
org-export-latex-listings-langs))
|
||||||
lang)))
|
lang)))
|
||||||
(format "\\lstset{language=%s}\n" lstlang))
|
(format "\\lstset{language=%s}\n" lstlang))
|
||||||
"")
|
"")
|
||||||
|
|
|
@ -318,21 +318,27 @@ for example using customize, or with something like
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defcustom org-export-latex-listings-langs
|
(defcustom org-export-latex-listings-langs
|
||||||
'(:emacs-lisp "Lisp" :lisp "Lisp"
|
'((emacs-lisp "Lisp") (lisp "Lisp")
|
||||||
:c "C" :cc "C++"
|
(c "C") (cc "C++")
|
||||||
:fortran "fortran"
|
(fortran "fortran")
|
||||||
:perl "Perl" :cperl "Perl" :python "Python" :ruby "Ruby"
|
(perl "Perl") (cperl "Perl") (python "Python") (ruby "Ruby")
|
||||||
:html "HTML" :xml "XML"
|
(html "HTML") (xml "XML")
|
||||||
:tex "TeX" :latex "TeX"
|
(tex "TeX") (latex "TeX")
|
||||||
:shell-script "bash"
|
(shell-script "bash")
|
||||||
:gnuplot "Gnuplot"
|
(gnuplot "Gnuplot")
|
||||||
:ocaml "Caml" :caml "Caml"
|
(ocaml "Caml") (caml "Caml")
|
||||||
:sql "SQL")
|
(sql "SQL"))
|
||||||
"Property list mapping languages to their listing language counterpart.
|
"Alist mapping languages to their listing language counterpart.
|
||||||
The key is the major mode symbol, the value is the string that should be
|
The key is a symbol, the major mode symbol without the \"-mode\".
|
||||||
inserted as the language parameter for the listings package."
|
The value is the string that should be inserted as the language parameter
|
||||||
|
for the listings package. If the mode name and the listings name are
|
||||||
|
the same, the language does not need an entry in this list - but it does not
|
||||||
|
hurt if it is present."
|
||||||
:group 'org-export-latex
|
:group 'org-export-latex
|
||||||
:type 'plist)
|
:type '(repeat
|
||||||
|
(list
|
||||||
|
(symbol :tag "Major mode ")
|
||||||
|
(string :tag "Listings language"))))
|
||||||
|
|
||||||
(defcustom org-export-latex-remove-from-headlines
|
(defcustom org-export-latex-remove-from-headlines
|
||||||
'(:todo nil :priority nil :tags nil)
|
'(:todo nil :priority nil :tags nil)
|
||||||
|
|
Loading…
Reference in a new issue