emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Problem writing my first export filter


From: James Harkins
Subject: [O] Problem writing my first export filter
Date: Wed, 21 Aug 2013 09:55:30 +0800
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]