Carl Worth <cworth@cworth.org> wrote Fri, Dec 01, 2006:The problem is that a newline is not inserted before the ".sp". I (and apparently a lot of other people on #git) thought it was just something broken by the system. It appears that the DocBook XSL files got broken between 1.69.0 and 1.69.1, but it appears to have been fixed upstream (I didn't try it by from looking at the xsl/manpages/block.xsl file it seems to insert a newline again before inserting a ".sp") Git already has a custom XSL file to handle callouts so this might be the right place to insert a workaround for this although I don't know if it breaks systems that do not have this problem. The patch that I have included is based on what I plan to add to tig. It would be great to hear if it breaks manpages build on systems that do not have this ".sp" problem. I also have another small fix to insert an empty line after a code block. Currently, the following paragraph will immediately follow the code block which hurts readability a bit. BTW, it might make sense to rename callouts.xsl to manpage.xsl if something like this and the other fix I mentioned is acceptable. diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl index ad03755..d016b3b 100644 --- a/Documentation/callouts.xsl +++ b/Documentation/callouts.xsl @@ -13,4 +13,44 @@ <xsl:apply-templates/> <xsl:text>.br </xsl:text> </xsl:template> +<xsl:template match="simpara"> + <xsl:variable name="content"> + <xsl:apply-templates/> + </xsl:variable> + <xsl:value-of select="normalize-space($content)"/> + <xsl:text> </xsl:text> + <xsl:text>.sp </xsl:text> +</xsl:template> + +<xsl:template match="address|literallayout|programlisting|screen|synopsis"> + <!-- * Yes, address and synopsis are verbatim environments. --> + + <xsl:choose> + <!-- * Check to see if this verbatim item is within a parent element that --> + <!-- * allows mixed content. --> + <!-- * --> + <!-- * If it is within a mixed-content parent, then a line space is --> + <!-- * already added before it by the mixed-block template, so we don't --> + <!-- * need to add one here. --> + <!-- * --> + <!-- * If it is not within a mixed-content parent, then we need to add a --> + <!-- * line space before it. --> + <xsl:when test="parent::caption|parent::entry|parent::para| + parent::td|parent::th" /> <!-- do nothing --> + <xsl:otherwise> + <xsl:text> </xsl:text> + <xsl:text>.sp </xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>.nf </xsl:text> + <xsl:apply-templates/> + <xsl:text> </xsl:text> + <xsl:text>.fi </xsl:text> + <!-- * if first following sibling node of this verbatim --> + <!-- * environment is a text node, output a line of space before it --> + <xsl:if test="following-sibling::node()[1][name(.) = '']"> + <xsl:text> </xsl:text> + <xsl:text>.sp </xsl:text> + </xsl:if> +</xsl:template> </xsl:stylesheet> -- Jonas Fonseca - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| David Newall | Re: Slow DOWN, please!!! |
| Ian Campbell | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Matthias Scheler | Re: HEADS UP: timecounters (branch simonb-timecounters) merged into -current |
| Greg Troxel | Re: Interface to change NFS exports |
| Thor Lancelot Simon | metadata cache and memory fragmentation |
| YAMAMOTO Takashi | amap memory allocation |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | [GIT]: Networking |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
