[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

conditionally add heading to tree on export

From: Matt Price
Subject: conditionally add heading to tree on export
Date: Mon, 12 Jul 2021 17:47:38 -0400

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


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
:CUSTOM_ID: 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]