emacs-orgmode
[Top][All Lists]
Advanced

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

[O] PATCH -- allow user to set minted style


From: Michael Weylandt
Subject: [O] PATCH -- allow user to set minted style
Date: Fri, 4 Apr 2014 11:11:55 -0400

Here's a small patch which allows the user to set the Minted highlighting style 
for latex export. 

This requires a different mechanism than org-latex-minted-options since it's a 
global/preamble option. 

Apologies for the badly formatted patch. I'm not at my own computer and wanted 
to give Bastien a chance to include it in 8.2.6. I do not have FSF papers 
signed but I believe this falls under the TINYCHANGE rule. 

Patch applies against a6485af3. 

Michael

--- ox-latex.el.orij    2014-04-04 10:45:17.530492000 -0400
+++ ox-latex.el    2014-04-04 10:51:42.447567000 -0400
@@ -751,6 +751,18 @@
      (string :tag "Minted option name ")
      (string :tag "Minted option value"))))

+(defcustom org-latex-minted-default-style "default"
+  "The default minted style used; will be inserted in a
+ \\usemintedstyle{} block if org-latex-listings is set to
+ 'minted. A list of available styles can be obtained with:
+
+ pygmentize -L styles"
+  :group 'org-export-latex
+  :type '(repeat
+      (list
+       (symbol :tag "Minted style name")
+       (symbol :tag "Minted style value"))))
+
(defvar org-latex-custom-lang-environments nil
  "Alist mapping languages to language-specific LaTeX environments.

@@ -1126,6 +1138,9 @@
          (or (plist-get info :description) "")
          (if (not (plist-get info :with-creator)) ""
        (plist-get info :creator))))
+     ;; Using minted formatting style
+     (when (eq org-latex-listings 'minted)
+       (format "\\usemintedstyle{%s}"))
     ;; Document start.
     "\\begin{document}\n\n"
     ;; Title command.





reply via email to

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