From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Annotating org exporters Date: Wed, 11 May 2016 00:29:24 +0200 Message-ID: <87eg994ke3.fsf@gmx.us> References: <87futqvwy6.fsf@uwaterloo.ca> <87vb2l52ma.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0G9m-0005BW-Gj for emacs-orgmode@gnu.org; Tue, 10 May 2016 18:29:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0G9h-0000kB-A4 for emacs-orgmode@gnu.org; Tue, 10 May 2016 18:29:33 -0400 Received: from mout.gmx.net ([212.227.17.22]:49242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0G9g-0000j4-Rq for emacs-orgmode@gnu.org; Tue, 10 May 2016 18:29:29 -0400 In-Reply-To: (Rainer M. Krug's message of "Tue, 10 May 2016 20:10:37 +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: rainer@krugs.de Cc: emacs-orgmode@gnu.org Rainer M Krug writes: > Rasmus writes: > >> Sebastian Fischmeister writes: >> >>> Is there a simple way to build regex-based extensions to the exporters? >> >> Yeah, filters. But I don=E2=80=99t think this is the best way to go abo= ut it. >> >>> For example, I would like to convert this string "=3D>" to $\rightarrow$ >>> when converting the document to latex. >>> >>> There are lots of other uses, where I could create my shortcuts and >>> insert them in orgmode files without creating a lot of clutter in the >>> file. >> >> This sounds a bit like org-entities. I use this together with cdlatex f= or >> quickly inserting such things. > > Great - learned something. Never knew about org-entities. > > Would it be possible to generate *easily* a pdf with all the org-entities? > Possibly include it in org as a kind of a cheat-sheet for org-entities? Might be nice... The styling would be essential. For personal use you might experiment with the below function? (I didn't try the resulting latex file). (defun rasmus-org-entities-as-latex (file) (with-current-buffer (or (get-file-buffer file) (find-file file)) (erase-buffer) (insert (mapconcat (lambda (e) (format "- =3D\\%s=3D :: \\%s \n" (nth 0 e) (nth 0 e))) (remove-if-not 'listp (append org-entities-user org-ent= ities)) "")) (save-buffer))) (rasmus-org-entities-as-latex "/tmp/entities.org") Rasmus --=20 Together we'll stand, divided we'll fall