View Single Post
  #1   (View Single Post)  
Old 8th November 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
Join Date: May 2008
Location: USofA
Posts: 1,546
Default troff/nroff Q; how to put a linebreak in a tag labeled lists item

For a program I'm putting together, I've several flags that have both a positive and negative form (e.g. --foo, --no-foo) for things that are not implicitly set by other options. Each pair of options is done in both these forms + their corresponding short options where available. Each of which is described in a single paragraph, but I'm having trouble formatting the options.

.Bl -tag -width indent
.\" The item in question
.It  Cm --interactive, -i Cm --non-interactive, -b
paragraph describing the options
.\" other options, several of which are like the above
which produces just what you would expect:
      --interactive, -i --non-interactive, -b
              paragraph describing the options
but I would like the option flags to be shown as with a line break between the positive and negative forms of the option for legibilities sake, like this:

      --interactive, -i
      --non-interactive, -b
              paragraph describing the options
The first thing that occurred to me was to use the Pp macro in between, but that cuts off the second option, then displays the paragraph.

.It  Cm --interactive, -i Pp Cm --non-interactive, -b
paragraph describing the options

      --interactive, -i
              paragraph describing the options

I haven't been able to find anything by searching the web or in the mdoc(7) manual page. Before I end up splitting them up into separate list items, does anyone know how I might be able to do this?
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote