From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: conditionally add heading to tree on export
Date: Mon, 12 Jul 2021 17:47:38 -0400 [thread overview]
Message-ID: <CAN_Dec-O_xjXHbv+Xom4v4qFwwGdoCeL5WZWn49hzSS+0Cxh-Q@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
Hi everyone,
Now that org-cite is working (!!!), I am incrementally updating all my
lecture slides to use proper citations. This is mostly quite simple, but I
find that in the rush before class I am often forgetting to add a new slide
with *both* the
#+print_bibliography:
line that will generate a bibliography, *and* a :CUSTOM_ID: property set to
~bibliography~, which is required for working links around citation
objects.
I'd like to check to see whether a slide with :CUSTOM_ID of ~bibliography~
exists, and if not, insert a heading at the end of the exported text
(either the file or a subtree), something like
** Sources
:PROPERTIES:
:CUSTOM_ID: bibliography
:END:
#+print_bibliography:
What is the appropriate way for me to do this as an end user who doesn't
want to write his own derived backend? Is the appropriate process to write
a function that inspects and modifies the parse tree, and then add that
function to ~org-export-filter-body-functions~?
In fact, I wonder if I want to do this for all HTML export that contains
citation objects. What do other people think about that idea?
Thanks as always,
Matt
[-- Attachment #2: Type: text/html, Size: 1444 bytes --]
reply other threads:[~2021-07-12 21:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN_Dec-O_xjXHbv+Xom4v4qFwwGdoCeL5WZWn49hzSS+0Cxh-Q@mail.gmail.com \
--to=moptop99@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).