[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Annotating org exporters
From: |
Richard Lawrence |
Subject: |
Re: [O] Annotating org exporters |
Date: |
Tue, 10 May 2016 08:19:58 -0700 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) |
Hi Sebasitan,
Sebastian Fischmeister <address@hidden> writes:
> Is there a simple way to build regex-based extensions to the exporters?
> For example, I would like to convert this string "=>" to $\rightarrow$
> when converting the document to latex.
There's an example of how to do something like this in the "Advanced
Configuration" section of the Export section in the manual. Maybe you
could adapt it like this?
(defun my-latex-filter-rightarrow (text backend info)
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "=>" "$\rightarrow$" text)))
(add-to-list 'org-export-filter-plain-text-functions
'my-latex-filter-rightarrow)
Hope that helps!
Best,
Richard