I'm attempting to write a somewhat portable manpage, in which I need to describe the format of a particular string. I use the .BI
macro to switch between fixed and variable parts, however I have more than six components (which is non-portable), and also parts are optional.
The target formatting is
USBnum::manufacturer::product::serial[::type]
that is, "USB" and the double colons in bold, "num", "manufacturer", "product", "serial" and "type" in italics, and the square brackets without special formatting.
So far, I have
.BI USB num :: manufacturer :: product
.BI :: serial
.RB [ ::
.IB type ]
However this generates spaces after "product", "serial" and the last set of double colons. How can I avoid these, using syntax that is portable to a reasonable subset of roff implementations?