From: Michael Weylandt <michael.weylandt@gmail.com>
To: emacs-orgmode@gnu.org
Subject: PATCH -- allow user to set minted style
Date: Fri, 4 Apr 2014 11:11:55 -0400 [thread overview]
Message-ID: <130448E3-E9CF-4414-9447-8FEDE6C53224@gmail.com> (raw)
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.
next reply other threads:[~2014-04-04 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 15:11 Michael Weylandt [this message]
2014-04-04 18:46 ` PATCH -- allow user to set minted style 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=130448E3-E9CF-4414-9447-8FEDE6C53224@gmail.com \
--to=michael.weylandt@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).