From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Annotating org exporters Date: Wed, 11 May 2016 11:49:44 +0200 Message-ID: <8737poc4av.fsf@gmx.us> References: <87futqvwy6.fsf@uwaterloo.ca> <87vb2l52ma.fsf@gmx.us> <87zirxp3lk.fsf@uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0QmN-00072r-IG for emacs-orgmode@gnu.org; Wed, 11 May 2016 05:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0QmG-0000ID-TR for emacs-orgmode@gnu.org; Wed, 11 May 2016 05:50:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:43225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0QmG-0000Hv-2H for emacs-orgmode@gnu.org; Wed, 11 May 2016 05:50:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b0Qm8-0006hw-KH for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:49:52 +0200 Received: from 46.166.190.185 ([46.166.190.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2016 11:49:52 +0200 Received: from rasmus by 46.166.190.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2016 11:49:52 +0200 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: emacs-orgmode@gnu.org Sebastian Fischmeister writes: >> >> This sounds a bit like org-entities. I use this together with cdlatex for > >> quickly inserting such things. >> >> Try to type \Rightarrow and type C-c C-x \ >> Also try to export to text (non-unicode). You will get the desired symbol. >> >> Alternatively, you can use one of the many input methods such as TeX or >> rfc1345 in which case you can get the ‘⇒’ by typing ‘\Rightarrow’ or >> ‘&=>’, respectively. In latex, you can setup unicode-math. > > That's interesting, because it's more robust to add something to the > org-entities-user list than to regexp replace a portion of the whole > document. > > However, there are two disadvantages to org-entities: (1) they have to > start with a backslash (e.g., \Rightarrow) and (2) they don't seem to > support alphabet-based names, so this doesn't work: > > (add-to-list 'org-entities-user '("=>" "\\rightarrow" t "=>" "=>" "»" "»")) Correct. You can add a hook to ‘org-export-before-parsing-hook’ to have a list of non-standard entities that are to be changed into "correct" entities beforehand, e.g. (("=>" . "\\rightarrow")). Or you can use something like cdlatex to quickly insert the "correct" entities, e.g. "\Rightarrow" is inserted with "’]" in my setup. The added benefit is that entities work out of the box so when I’m exporting on another computer it just works. Rasmus -- Sådan en god dansk lagereddike kan man slet ikke bruge mere