Hi Ihor, that's spot on what I wanted to suggest, thanks!
-- Orm Am Samstag, den 27. Juli 2024 um 13:01:12 Uhr (+0000) schrieb Ihor Radchenko: > Orm Finnendahl <orm.finnend...@selma.hfmdk-frankfurt.de> writes: > > >> 1. You can use :filter-parse-tree in ox-html backend to replace the > >> original (org-data ...) AST with a list of ((org-page ...) > >> (org-page ...) ...) pseudo-elements and populate INFO channel > >> with auxiliary information you now compute in > >> `org-html-process-multipage' > > > > :filter-parse-tree kicks in before > > `org-export--collect-tree-properties' adds the headline-numbering, > > which needs to be present before the multipage code can do its work. > > Your concern raises a more important question on headline numbering > across individual pages. It may or may not be desirable to have > fall-through numbering of headings. I can see how some variants of > multipage export may choose to number headings either using continuous > numbering across the pages or to restart the numbering for each page > individually. > > Moreover, things like :headline-offset or citations may or may not need > to be computed across the pages. :headline-offset should probably be > limited to a single page, for example. For citations, multiple options > may be considered (think about numbered references that may either be > global across the pages or local, per-page). > > To address the above concerns, we will probably need to introduce global > :multipage setting alongside with multiple others (like settings > controlling headline numbering). Further, we will need to make sure that > the splitter runs last, after normal split functions, so that nothing > can interfere with it. > > But for now, let's do minimal required change that does not introduce too > many new things and simply modify `org-export--annotate-info' as the > following > > (setq tree (org-export-filter-apply-functions (plist-get info > :filter-parse-tree) tree info)) > (setq info (org-export--collect-tree-properties tree info)) > > (when (plist-get info :multipage) > (setq tree (org-export-filter-apply-functions (plist-get info > :multipage-split) tree info))) > > (when (plist-get info :with-cite-processors) > (org-cite-process-citations info) > (org-cite-process-bibliography info)) > > > :multipage-split and :multipage are new global export options. > > -- > 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> >