From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Annotating org exporters Date: Tue, 10 May 2016 08:19:58 -0700 Message-ID: <87lh3indnl.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> References: <87futqvwy6.fsf@uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b09R9-0001Gu-7H for emacs-orgmode@gnu.org; Tue, 10 May 2016 11:19:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b09R5-00007z-Cg for emacs-orgmode@gnu.org; Tue, 10 May 2016 11:19:02 -0400 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:36077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b09R5-000067-35 for emacs-orgmode@gnu.org; Tue, 10 May 2016 11:18:59 -0400 Received: by mail-pf0-x22e.google.com with SMTP id c189so7203312pfb.3 for ; Tue, 10 May 2016 08:18:55 -0700 (PDT) In-Reply-To: <87futqvwy6.fsf@uwaterloo.ca> 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" To: sfischme@uwaterloo.ca, emacs-orgmode@gnu.org Hi Sebasitan, Sebastian Fischmeister 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