First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
Hello,
I’d like the first and last lines framing a block of text between two headings to have spacing (top and bottom): how do I have to code this, please?
I thought the discussion below had solved my problem, but in fact the vertical spacing effected by the “padding” coding only works on the lines inside the text block, but not on the first or last: is this normal?
I’m not sure that’s entirely possible to do “programmatically” meaning so that it’d always do the desired formatting automatically.
As far as I can tell the padding you want to exist when unfolded is the same attribute that defines the padding between the closed headers. But please someone say otherwise, I’m not sure this is correct.
In the meantime you can go “low-tech” and just add an empty line after and before headings, combined with this snippet: