From: James Harkins <jamshark70@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Problem writing my first export filter
Date: Wed, 21 Aug 2013 09:55:30 +0800 [thread overview]
Message-ID: <871u5nst7x.wl%jamshark70@dewdrop-world.net> (raw)
Referring to [1]:
I just tried the following, so that I could maintain a list of special cases where org's default latex export doesn't do what I want.
(setq hjh-org-latex-macros '(("`em" "'em")))
(defun hjh-latex-filter-macros (text backend info)
"hjh: Replace special cases listed in hjh-org-latex-macros."
(when (org-export-derived-backend-p backend 'latex)
(dolist (element hjh-org-latex-macros)
(replace-regexp-in-string (car element) (car (cdr element)) text))))
First I tried
(setq org-export-filter-plain-text-functions '(hjh-latex-filter-macros))
-- no result: `em passes through unchanged. So then I tried clearing plain-text-functions and using final-output-functions instead. Same thing: the filter didn't do anything.
I suppose I'm missing something simple.
Thanks in advance for advice,
hjh
[1] http://article.gmane.org/gmane.emacs.orgmode/75607
next reply other threads:[~2013-08-21 1:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 1:55 James Harkins [this message]
2013-08-21 7:48 ` Problem writing my first export filter 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871u5nst7x.wl%jamshark70@dewdrop-world.net \
--to=jamshark70@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.