[xml/sgml-pkgs] Bug#631078: docbook2x produces manpages which don't pass "hyphen-used-as-minus-sign" lintian check

Samuel Thibault sthibault at debian.org
Wed Sep 6 20:50:37 BST 2023


Hello,

Gabriele Giacone, le lun. 20 juin 2011 01:09:38 +0200, a ecrit:
> Gnash manpages are built with docbook2x (xslt -> Man-XML -> man)
> 
> e.g. Input is findmicrophones.man-xml file [1]
> 
>  $ db2x_xsltproc -s man findmicrophones.man-xml -o findmicrophones.mxml
>  $ db2x_manxml --solinks findmicrophones.mxml
> 
> Resulting findmicrophones.1 manpage has unescaped dashes which trigger
> "hyphen-used-as-minus-sign" lintian tag [2].
> 
> [1] http://deb.li/iQ6Wd
> [2] http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html

This is also posing problem in e.g. git buildpackage manpages, making
copying/pasting long option names problematic:

$ man gbp-import-orig
[... copy/paste ‐‐upstream‐vcs‐tag]
$ gbp import-orig ‐‐upstream‐vcs‐tag=foo --uscan
gbp:error: you can't pass both --uscan and a filename.

The attached patch at least fixes this for the commands and options
appearing in the synopsis. I have also submitted it on
https://salsa.debian.org/xml-sgml-team/docbook2x/-/merge_requests/2

The hyphen-used-as-minus-sign lintian tag is getting resurrected, see
Bug#1051357

Samuel
-------------- next part --------------
diff --git a/xslt/man/synop.xsl b/xslt/man/synop.xsl
index 9713a1b..e535b75 100644
--- a/xslt/man/synop.xsl
+++ b/xslt/man/synop.xsl
@@ -107,9 +107,9 @@
     <xsl:call-template name="cmdsynopsis-gentext-sepchar" />
   </xsl:if>
 
-  <b>
+  <xsl:call-template name="inline-bold-monospace">
     <xsl:apply-templates mode="cmdsynopsis" />
-  </b>
+  </xsl:call-template>
 </xsl:template>
 
 <xsl:template match="replaceable" mode="cmdsynopsis">


More information about the debian-xml-sgml-pkgs mailing list