Automatically inserting headings with an ID counter upon render #13177
-
DescriptionI'm developing a workflow to implement paragraph numbering, inspired by #1608 and the work of @Jmuccigr (specifucally: https://github.com/Jmuccigr/css/blob/master/clean_para_numbering.css, documented here: https://jmuccigr.github.io/blog/2015/06/10/self-publishing-with-pandoc-etc/). This works by appending a H6 heading before each paragraph, which is then picked up by the css tweaks. Each of these headings has to have a unique ID. For example:
I would like it if I didn't have to manually write in the H6 headings before each paragraph. Is it possible to implement this automatically, with a counter for each paragraph ID? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Use a Lua filter to walk through Note that Para does not support directly an identifier. |
Beta Was this translation helpful? Give feedback.
After searching some more, I found an existing lua filter that does what I need: https://github.com/cysouw/count-para