emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* conditionally add heading to tree on export
@ 2021-07-12 21:47 Matt Price
  0 siblings, 0 replies; only message in thread
From: Matt Price @ 2021-07-12 21:47 UTC (permalink / raw)
  To: Org Mode

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-12 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 21:47 conditionally add heading to tree on export Matt Price

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).