From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Weylandt Subject: PATCH -- allow user to set minted style Date: Fri, 4 Apr 2014 11:11:55 -0400 Message-ID: <130448E3-E9CF-4414-9447-8FEDE6C53224@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW5mu-0004g3-F9 for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 11:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WW5ml-0005xu-4u for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 11:12:12 -0400 Received: from mail-qa0-x234.google.com ([2607:f8b0:400d:c00::234]:35591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW5mk-0005xl-Vq for emacs-orgmode@gnu.org; Fri, 04 Apr 2014 11:12:03 -0400 Received: by mail-qa0-f52.google.com with SMTP id m5so3186862qaj.25 for ; Fri, 04 Apr 2014 08:12:02 -0700 (PDT) Received: from [10.131.154.174] (mobile-198-228-199-071.mycingular.net. [198.228.199.71]) by mx.google.com with ESMTPSA id s111sm11437547qge.19.2014.04.04.08.12.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 08:12:01 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Here's a small patch which allows the user to set the Minted highlighting st= yle for latex export.=20 This requires a different mechanism than org-latex-minted-options since it's= a global/preamble option.=20 Apologies for the badly formatted patch. I'm not at my own computer and want= ed 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.=20 Patch applies against a6485af3.=20 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.