It would be nice if the DocBook output generated for @part
would include an id attribute. This is used for setting the filename
in "chunked html" output in the standard DocBook XSLT scripts.
The attacked patch is definitely broken (it fails on the example
in the texinfo manual with an @* in the part name). However, it does do what I
need it to do. It would be much appreciated if someone who knows what they're
doing could clean it up and check it in.
--
--Per Bothner
[email protected] http://per.bothner.com/
Index: tp/Texinfo/Convert/DocBook.pm
===================================================================
--- tp/Texinfo/Convert/DocBook.pm (revision 5920)
+++ tp/Texinfo/Convert/DocBook.pm (working copy)
@@ -640,6 +640,12 @@
if ($root->{'extra'} and $root->{'extra'}->{'associated_node'}) {
$attribute .= " id=\"$root->{'extra'}->{'associated_node'}->{'extra'}->{'normalized'}\"";
}
+ elsif ($root->{'cmdname'} eq 'part' && $root->{'args'} and $root->{'args'}->[0]) {
+ my ($arg, $end_line)
+ = $self->_convert_argument_and_end_line($root->{'args'}->[0]);
+ $arg = Texinfo::Convert::NodeNameNormalization::_unicode_to_protected($arg);
+ $attribute .= " id=\"$arg\"";
+ }
$result .= "<$command${attribute}>\n";
if ($root->{'args'} and $root->{'args'}->[0]) {
my ($arg, $end_line)