Next in thread → Next in month →

Re: [docbook-apps] db2man: *roff macro incorrectly rendered, messes up man page

From
Michael Smith <>
Date
2005-03-24T04:35:53+00:00
ID
Thread
Re: [docbook-apps] db2man: *roff macro incorrectly rendered, messes up man page
Denis Bradford <> writes:

> In the db2man stylesheet, whitespace in the ref page can cause groff 
> macros to be indented, as in the following output:
> ==============================================
> (1)
> 
> NAME
>        sb-config - a tool used to determine compiler and linker flags
> 
> SYNOPSIS
>            .ad l
> 
>        sb-config [option]
> 
> ==============================================
> 
> Notice the indented .ad 1 macro line above, which causes it
> to display verbatim in the man page.

Bug. Please submit a manpages bug report:

  http://sourceforge.net/tracker/?atid=516914&group_id=21935&func=browse

Actually, there may be one there already. Please check before you submit.

> Below is the source for the above example. If you remove the
> leading spaces before <cmdsynopsis>, the .ad 1 line is
> left-aligned and the man page renders correctly.

The are other whitespace bugs like this in the current manpages
stylesheet. The way I personally have worked around them for now
for now is to to some post-processing using perl. For example,
here is a single-line perl command that will fix the problem of
any groff macro that has leading whitespace in front of it:

  perl -p -e 's/^\s+\././g' sb-config.1

Yeah, I know it should be fixed in the stylesheets themselves. I'm
just suggesting the above as a way to work around it for now.

  --Mike

-- 
Michael Smith
http://logopoeia.com/  http://www.oreillynet.com/pub/au/890
Next in thread → Next in month →