When writing a UNIX manual page, I realized that some phrase occurs multiple times. I'd like to define it once and reuse it (not by copying with the editor). I see that I can use variables (.ds
) for multi-line text, but it fails when the phrase includes dot commands (like .B foo
). Is there a solution (other than include files and the C preprocessor) for this?
How can I reuse a text portion with commands in nroff?
123 Views Asked by U. Windl At
1
You could make your multi-line text into a macro. The downside is that to insert it you must invoke the macro rather than interpolating the string.
If you just need bolding inside your strings, you can include font changes: