emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* PATCH -- allow user to set minted style
@ 2014-04-04 15:11 Michael Weylandt
  2014-04-04 18:46 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Weylandt @ 2014-04-04 15:11 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

end of thread, other threads:[~2014-04-05  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 15:11 PATCH -- allow user to set minted style Michael Weylandt
2014-04-04 18:46 ` Nicolas Goaziou
2014-04-04 19:32   ` Michael Weylandt
2014-04-04 20:24     ` Nicolas Goaziou
2014-04-04 21:15       ` Michael Weylandt
2014-04-05  7:42         ` Nicolas Goaziou

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