OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] [PATCH] make funcsysopsisinfo verbatim in manpages

Joe Orton <jorton@redhat.com> writes:

> funcsynopsisinfo is supposed to be a verbatim environment; I haven't 
> tested this patch because I failed to get a working CVS build setup. Is 
> this OK?

> -<xsl:template match="address|literallayout|programlisting|screen|synopsis">
> -  <!-- * Yes, address and synopsis are verbatim environments. -->
> +<xsl:template match="address|literallayout|programlisting|screen|synopsis|funcsynopsisinfo">
> +  <!-- * Yes, address, synopsis, and funcsynopsisinfo are verbatim environments. -->

> -<xsl:template match="funcsynopsisinfo">
> -  <xsl:text>.PP&#10;</xsl:text>
> -  <xsl:apply-templates mode="bold" select="."/>
> -  <xsl:text>&#10;</xsl:text>
> -</xsl:template>
> +<!-- * Note that funcsynopsisinfo is a verbatim environment and so -->
> +<!-- * is handled in block.xsl, and is not bold-ified for that reason -->

It should be handled as a verbatim, so the part of the patch that
adds it to the match for verbatims is great.

But I think we need to (re)add some other handling to also make it
bold again.

The reason is that the man(7) man page says this:

  For functions, the arguments are always specified using italics,
  even in the SYNOPSIS section, where the rest of the function is
  specified in bold.

I realize the Funcsynopsis content is not technically part of
"the rest of the function", but looking through examples of
existing man pages for functions in my /usr/share/man/man2
directory, I see that everything in the SYNOPSIS sections for all
of them is either in bold or italic.

For example, if I run "man 2 open", I get this:

    open, creat - open and possibly create a file or device

    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>

    int open(const char *pathname, int flags);
    int open(const char *pathname, int flags, mode_t mode);
    int creat(const char *pathname, mode_t mode);

And everything in that SYNOPSIS section that is not in italics is
rendered in bold, including the "#include" lines -- which would be
marked up with Funcsynopsisinfo in DocBook source.


Michael(tm) Smith


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]