Re: [PATCH] manpage-bold-literal.xsl: provide namespaced template for "d:literal"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-10-30 at 20:41:04, Martin Ågren wrote:
>  I've kept thinking lately that "wow, are we behind on marking up stuff
>  to be monospaced/boldened"...
> 
>  I'm pretty sure about the background here, but I'm not at all sure 
>  that this is the prettiest or correctest fix.

This fix is correct.  Thanks for sending a patch for this, and sorry
about regressing our bolding behavior.

> diff --git a/Documentation/manpage-bold-literal.xsl b/Documentation/manpage-bold-literal.xsl
> index 608eb5df62..172388d6cf 100644
> --- a/Documentation/manpage-bold-literal.xsl
> +++ b/Documentation/manpage-bold-literal.xsl
> @@ -1,11 +1,20 @@
>  <!-- manpage-bold-literal.xsl:
>       special formatting for manpages rendered from asciidoc+docbook -->
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> +		xmlns:d="http://docbook.org/ns/docbook";
>  		version="1.0">
>  
>  <!-- render literal text as bold (instead of plain or monospace);
>       this makes literal text easier to distinguish in manpages
>       viewed on a tty -->
> +<xsl:template match="d:literal">
> +	<xsl:value-of select="$git.docbook.backslash"/>
> +	<xsl:text>fB</xsl:text>
> +	<xsl:apply-templates/>
> +	<xsl:value-of select="$git.docbook.backslash"/>
> +	<xsl:text>fR</xsl:text>
> +</xsl:template>
> +
>  <xsl:template match="literal">

If you want to avoid duplication, you can write the existing template as
follows:

  <xsl:template match="literal|d:literal">

That will match both literal and d:literal tags.  You still need the
namespace declaration you added, of course.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux