Hi Walter, On Fri Feb 7, 2025 at 7:46 PM CET, Walter Alejandro Iglesias wrote: > [...] > Titles and subtitles (I'm referring to those in the body of the > document, not those in the header and footer) look better when they have > more space above than below. I've recently been studying how to achieve > this without altering the line spacing. So far I've been doing > something like this: > > .\" ------------------------------ > .vs 15 > .ds adjust \v'\\n[.v]u/5u'\Z'\\$*' > .de h1 > . br > . ps 14 > . sp > . ds prev \\$0 > .. > .de pp > . br > . ps 12 > . if '\\*[prev]'h1' .sp > .. > .pp > This is a paragraph. > .h1 > \*[adjust "This is a title"] > .pp > This is another paragraph. > .\" -------------------------------- > > How can I achieve that trick (or alike) from the macro? (Thus avoid > having to add the label to each title in the document.)
Your approach seems unnecessarily complicated. Unless I am missing something, what you are trying to do with \v'\\n[.v]u/5u' can be achieved via .sp 0.2v or its equivalent .sp 0.2 ~ onf