From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb)
Date: Sun, 14 Apr 2013 21:26:26 +0200 [thread overview]
Message-ID: <87zjx07w2l.fsf@gmail.com> (raw)
In-Reply-To: <87mwt1dmw7.fsf@gmail.com> (Eric Schulte's message of "Sun, 14 Apr 2013 11:48:08 -0600")
Eric Schulte <schulte.eric@gmail.com> writes:
> Please see the attached patch, I'd love for this to be applied.
You can use a filter function that will replace default "verbatim" with
whatever you want:
#+begin_src emacs-lisp
(defun my-latex-custom-verbatim (element backend info)
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string
"\\`\\\\begin{\\(verbatim\\)}" "Verbatim"
(replace-regexp-in-string
"\\\\end{\\(verbatim\\)}\n*\\'" "Verbatim" element nil nil 1)
nil nil 1)))
(add-to-list 'org-export-filter-example-block-functions
'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-fixed-width-functions
'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-quote-section-functions
'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-src-block-functions
'my-latex-custom-verbatim)
(add-to-list 'org-export-filter-table-functions
'my-latex-custom-verbatim)
#+end_src
I'm not sure a new variable is needed here. After all, that's what
filters are for.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-04-14 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 17:48 [patch] ox-latex.el to allow customization of verbatim environments (e.g., to use fancyvrb) Eric Schulte
2013-04-14 19:26 ` Nicolas Goaziou [this message]
2013-04-14 23:25 ` Bastien
2013-04-15 0:07 ` Thomas S. Dye
2013-04-15 0:25 ` Eric Schulte
2013-04-15 5:40 ` Nicolas Goaziou
2013-04-14 20:02 ` Daimrod
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=87zjx07w2l.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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).