From: Ihor Radchenko <yantar92@posteo.net>
To: sebastien.miquel@posteo.eu
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [POLL] Naming of "export features"
Date: Fri, 24 Feb 2023 10:27:04 +0000 [thread overview]
Message-ID: <874jrbs6iv.fsf@localhost> (raw)
In-Reply-To: <27a9349f-2171-d065-d257-6074f627c1ef@posteo.eu>
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
> What benefits does that bring over making enabled features available in
> =info= for the usual transcoders and advising them ?
We should indeed make the features/condition available via info.
However, advising is (1) bad practice unless we have no choice; (2) not
as flexible. I will illustrate below.
> Your initial example of adding a comment to the end and beginning of the
> document can be done by advising, say, =org-latex-template= and
> concatenating some strings with its =content= argument.
What you suggest is indeed an OK alternative for my specific example of
adding text to the beginning/end of the document.
However, it will be much harder to add something in the middle of the
exported contents.
Consider that you want to redefine a LaTeX command after certain
\usepackage{foo} call in LaTeX preamble, but before another
\usepackage{bar} call.
Let's assume that the preamble template has the following:
(:template .
(...
(:name 'foo :snippet "\\usepackage{foo}")
...
(:name 'bar :snippet "\\usepackage{bar}")
...))
Now, we can simply add the following snippet to the template:
(:snippet "<define LaTeX command>" :after 'foo :before 'bar)
and the definition will be automatically inserted at the right place in
the middle of the LaTeX preamble.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-02-24 10:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 17:20 [PATCH] Introduce "export features" Timothy
2023-02-11 11:37 ` Ihor Radchenko
2023-02-20 17:41 ` Timothy
2023-02-24 12:51 ` Sébastien Miquel
2023-02-24 12:59 ` Ihor Radchenko
2023-02-24 21:47 ` Sébastien Miquel
2023-02-26 12:19 ` Ihor Radchenko
2023-02-26 13:04 ` Sébastien Miquel
2023-02-27 19:05 ` Ihor Radchenko
2023-02-25 3:15 ` Timothy
2023-02-21 14:22 ` [POLL] Naming of " Timothy
2023-02-22 1:46 ` Dr. Arne Babenhauserheide
2023-02-22 2:40 ` Timothy
2023-02-23 15:55 ` No Wayman
2023-02-23 16:17 ` No Wayman
2023-02-22 12:23 ` Ihor Radchenko
2023-02-23 15:31 ` No Wayman
2023-02-23 16:04 ` Bruce D'Arcus
2023-02-23 19:04 ` Ihor Radchenko
2023-02-23 19:55 ` Sébastien Miquel
2023-02-24 10:27 ` Ihor Radchenko [this message]
2023-02-24 12:46 ` Sébastien Miquel
2023-02-24 13:03 ` Ihor Radchenko
2023-02-24 21:38 ` Sébastien Miquel
2023-02-26 12:28 ` Ihor Radchenko
2023-02-26 14:06 ` Sébastien Miquel
2023-02-27 19:32 ` Ihor Radchenko
[not found] <mailman.336.1676990100.5072.emacs-orgmode@gnu.org>
2023-02-23 15:06 ` No Wayman
-- strict thread matches above, loose matches on Subject: below --
2023-03-01 8:26 Pedro Andres Aranda Gutierrez
2023-03-01 9:41 ` Ihor Radchenko
2023-03-01 11:38 ` Pedro Andres Aranda Gutierrez
2023-03-02 11:30 ` Ihor Radchenko
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=874jrbs6iv.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=sebastien.miquel@posteo.eu \
/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.