How to go back to last word end
Matteo Bini <[email protected]> Thu, 30 Jul 2026 21:34:38 +0200
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <[email protected]> |
Dear GNU roff users, I'm having an issue writing a simple macro. This is the code for my bold macro .de B . ft B \\$* . ft .. which works quite well, except when I want to add a punctuation mark right after the last bold word. .B my bold words , not so bold words This would be my desired output *my bold words*, not so bold words But I can't find a way to achieve it consistently. The best I could find was .B my bold words \h'-\w'\~\~'u' , not so bold words However this doesn't work when groff adds adjustment space, when it's in b or n adjust mode. Is there a way to go back to the last word end, before the space? And if there is, is it portable to other roff implementations? -- Matteo Bini