Re: arg-or-separator - remove whitespace

Steve Cheng <[email protected]> Mon, 30 Jun 2003 16:26:12 -0400
Newsgroups gmane.text.docbook.docbook2x.general
Message-ID <[email protected]>
On June 30, 2003 12:36 pm, Michael Smith wrote:
> For example, if I want to render a synopsis like this:
>
>   imdirsync [-host <hostName>] [-con <N>]  [-run <dump|part|build|inst>]
>
> ..if I keep arg-or-separator set to the default " | " value, I get:
>
>   imdirsync [-host <hostName>] [-con <N>] [-run <dump | part | build |
>   inst>]
>
> That is, the group gets broken across a line -- definely not what I want
> or expect.

Yes, I see what you mean.
But I have an uneasy feeling that whether to insert whitespace depends on the 
situation. For example, python(1) does this:

# python [ -d ] [ -i ] [ -O ] [ -S ] [ -t ] [ -u ] [ -v ] [ -x ] [ -h ]
#       [ -V ] [ -W argument ]
#              [ -c command | script | - ] [ arguments ]

The whitespace for the -c parameter make sense, it seems, because
"command", "script" are meta-variables, and "-" is something totally different 
altogether. (Your example is different, I think, because "dump", "part", 
"build", "inst" essentially form a homogeneous list of tokens.)

In the TDG, HTML rendition (a fairly old version),
I notice that the example in the cmdsynopsis refentry does use whitespace.
(Of course, *that* is HTML and this is man pages.)

I wonder if there is a right/better way to fix it --- optional parameters, or 
even heuristic detection(!) of whether to put the whitespace or not.

-- 
Steve Cheng 
&#x912D;&#x541B;&#x535A;



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01