- Package:
- docbook-xsl
- Source:
- docbook-xsl
- Submitter:
- Ben Hutchings
- Date:
- 2022-04-18 18:57:05 UTC
- Severity:
- normal
- Tags:
Example output in linux-manual-2.6.32
(/usr/share/man/man9/__scsi_device_lookup_by_target.9.gz):
.SH "SYNOPSIS"
.HP \w'struct\ scsi_device\ *\ __scsi_device_lookup_by_target('u
.BI "struct scsi_device * __scsi_device_lookup_by_target(struct\ scsi_target\ *\ " "starget" ", uint\ " "lun" ");"
Given a wide enough terminal this renders nicely as:
SYNOPSIS
struct scsi_device * __scsi_device_lookup_by_target(struct scsi_target * starget, uint lun);
but on an 80-column terminal it renders as:
SYNOPSIS
struct scsi_device *
__scsi_device_lookup_
by_target(struct scsi_target * starget,
uint lun);
It seems to me that there should be a break point between the open
parenthesis and the first parameter and that indentation of the
following lines should be limited to about half the output width.
Ben.
tags 569828 + patch thanks Here's a patch to do this. Unfortunately the '<?' operator is a GNU roff extension and therefore may not be acceptable upstream. Ben.--- docbook-xsl-1.75.2+dfsg.orig/manpages/synop.xsl +++ docbook-xsl-1.75.2+dfsg/manpages/synop.xsl @@ -271,6 +271,8 @@ <xsl:apply-templates select="funcdef"/> </xsl:variable> <xsl:call-template name="synopsis-block-start"/> + <!-- * If the synopsis must be wrapped, indent to just after the --> + <!-- * open-parenthesis, or by 32 en, whichever is smaller. --> <xsl:text>.HP </xsl:text> <xsl:text>\w'</xsl:text> <xsl:variable name="funcdef"> @@ -282,6 +284,7 @@ <xsl:with-param name="replacement" select="'\ '"/> </xsl:call-template> <xsl:text>('u</xsl:text> + <xsl:text><?32n</xsl:text> <xsl:text> </xsl:text> <xsl:text>.</xsl:text> <xsl:value-of select="$man.font.funcprototype"/> @@ -294,6 +297,8 @@ <xsl:text>"</xsl:text> <xsl:value-of select="normalize-space($funcprototype)"/> <xsl:text>(</xsl:text> + <!-- * Allow line-break here. --> + <xsl:text>\:</xsl:text> <xsl:choose> <xsl:when test="not($style = 'ansi')"> <xsl:apply-templates select="*[local-name() != 'funcdef']" mode="kr"/> --- END ---
Is this still an existing issue? I noticed this bug was forwarded to sf, but there have been no reactions to that in almost 8 years. I think it's very unlike that will change as f.e. the project itself has moved to https://github.com/docbook/xslt10-stylesheets and a search for this bug number resulted in 0 hits. If it's still useful to get this fixed, then a new submission to the GH project is more useful. Otherwise it may be better to just close the bug?
The kernel documentation no longer uses DocBook. But if no fix has been applied then other projects are probably still be affected. Ben.
Control: affects -1 - src:linux In that case it seems appropriate to remove the 'affects' tag. I personally don't find it (generally) useful to keep bugs open where it's unlikely to effect any action to resolve it. And if someone was still (practically) affected, they should file a bug in the current issue tracker. I'll leave it up to the maintainer whether any new action should be taken, especially since there's also a patch. It came onto my radar when I tried to see whether I could reduce the bug list here: https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=linux and removing the affects has that effect. Cheers, Diederik