From: Rasmus <rasmus@gmx.us>
To: rainer@krugs.de
Cc: emacs-orgmode@gnu.org
Subject: Re: Annotating org exporters
Date: Wed, 11 May 2016 00:29:24 +0200 [thread overview]
Message-ID: <87eg994ke3.fsf@gmx.us> (raw)
In-Reply-To: <m2h9e5iy1u.fsf@krugs.de> (Rainer M. Krug's message of "Tue, 10 May 2016 20:10:37 +0200")
Rainer M Krug <Rainer@krugs.de> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Sebastian Fischmeister <sfischme@uwaterloo.ca> 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
next prev parent reply other threads:[~2016-05-10 22:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 13:56 Annotating org exporters Sebastian Fischmeister
2016-05-10 15:04 ` Rainer M Krug
2016-05-10 15:19 ` Richard Lawrence
2016-05-11 5:31 ` Sebastian Fischmeister
2016-05-11 15:01 ` Richard Lawrence
2016-05-10 15:55 ` Rasmus
2016-05-10 18:10 ` Rainer M Krug
2016-05-10 22:29 ` Rasmus [this message]
2016-05-11 5:31 ` Sebastian Fischmeister
2016-05-11 9:49 ` Rasmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg994ke3.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
--cc=rainer@krugs.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.