[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Annotating org exporters
From: |
Rasmus |
Subject: |
Re: [O] Annotating org exporters |
Date: |
Wed, 11 May 2016 00:29:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Rainer M Krug <address@hidden> writes:
> Rasmus <address@hidden> writes:
>
>> Sebastian Fischmeister <address@hidden> writes:
>>
>>> Is there a simple way to build regex-based extensions to the exporters?
>>
>> Yeah, filters. But I don’t think this is the best way to go about it.
>>
>>> For example, I would like to convert this string "=>" 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 for
>> 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 "- =\\%s= :: \\%s \n"
(nth 0 e)
(nth 0 e)))
(remove-if-not 'listp
(append org-entities-user
org-entities))
""))
(save-buffer)))
(rasmus-org-entities-as-latex "/tmp/entities.org")
Rasmus
--
Together we'll stand, divided we'll fall