From: SourceForge.net <no...@so...> - 2006-03-09 09:21:15
|
Bugs item #1446015, was opened at 2006-03-09 08:40 Message generated for change (Comment added) made by xmldoc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1446015&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: manpages >Status: Pending Resolution: None Priority: 5 Submitted By: Daniel Leidert (dleidert) >Assigned to: Michael Smith (xmldoc) Summary: man: nesting bold and italic elements doesn't work well Initial Comment: A simple example of nesting a bold element with an italic one: <arg choice="plain"><option>--path "<replaceable class="option">PATHS</replaceable>"</option></arg> In the output, the ending quotation marks are not bold, but they should be, because the belong to the option element. The reason is, that the current stylesheets do not test for the parent element, when they run <xsl:template mode="bold" match="*"> ... </xsl:template> <xsl:template mode="italic" match="*"> ... </xsl:template> So the result is \fB .option. \fI .replaceable. \fR .option. \fR ^^^ But it should be: \fB .option. \fI .replaceable. \fB .option. \fR ^^^ So the templates need a test for the parent element, in which they need to check: a) if a "bold" element has an "italic" parent b) if an "italic" element has an "bold" parent A sample code snippet I used to customize the related template in the docbook-xsl 1.68.1 package: <xsl:template match="replaceable"> <xsl:choose> <xsl:when test="parent::option"> <xsl:text>\fI</xsl:text> <xsl:apply-templates/> <xsl:text>\fB</xsl:text> </xsl:when> <xsl:otherwise> <xsl:apply-imports/> </xsl:otherwise> </xsl:choose> </xsl:template> This snippet should only show the way to solve that problem. Regards, Daniel ---------------------------------------------------------------------- >Comment By: Michael Smith (xmldoc) Date: 2006-03-09 18:21 Message: Logged In: YES user_id=118135 Hi Daniel, What version of the stylesheets are you testing with? I believe this problem is fixed in v1.69.1 and later. Certainly it's fixed in the latest snapshot - http://docbook.sourceforge.net/snapshots/ If possible, please try testing with that and let me know if you see the same problem. I just ran a test case with your source fragment and the following is the groff output that I get. \fB\-\-path\ "\fR\fB\fIPATHS\fR\fR\fB"\fR So the closing quotation mark is getting boldfaced as you would expect. (Yeah, I know that groff output has redundancies and is not so pretty, but it gets the job done.) ---------------------------------------------------------------------- Comment By: Michael Smith (xmldoc) Date: 2006-03-09 18:21 Message: Logged In: YES user_id=118135 A fix for this issue has been added to the current codebase. Please test the fix with the latest snapshot from: http://docbook.sourceforge.net/snapshots/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=1446015&group_id=21935 |