[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/DocBook.pm (_convert): outpu
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/DocBook.pm (_convert): output <term> when table_term container is seen and not for @item, to also enclose index entries in table_term before the @item (same as in html). |
Date: |
Sat, 26 Nov 2022 18:31:57 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 3a55b7b910 * tp/Texinfo/Convert/DocBook.pm (_convert): output <term>
when table_term container is seen and not for @item, to also enclose index
entries in table_term before the @item (same as in html).
3a55b7b910 is described below
commit 3a55b7b910d804718c4972601427737434bd2b51
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Nov 27 00:31:47 2022 +0100
* tp/Texinfo/Convert/DocBook.pm (_convert): output <term> when
table_term container is seen and not for @item, to also enclose
index entries in table_term before the @item (same as in html).
---
ChangeLog | 8 +++++++-
tp/Texinfo/Convert/DocBook.pm | 6 +++++-
tp/t/results/xtable/comment_and_itemx_before_item.pl | 2 +-
tp/t/results/xtable/inter_item_commands_in_table.pl | 8 ++++----
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8a0dd790b0..b79d0bc3cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2022-11-26 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/DocBook.pm (_convert): output <term> when
+ table_term container is seen and not for @item, to also enclose
+ index entries in table_term before the @item (same as in html).
+
2022-11-26 Gavin Smith <gavinsmith0123@gmail.com>
- * doc/texinfo.texi: Movee index commands before @item in @table
+ * doc/texinfo.texi: Move index commands before @item in @table
throughout.
2022-11-26 Gavin Smith <gavinsmith0123@gmail.com>
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 31fda20baa..6111db21bf 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -748,7 +748,7 @@ sub _convert($$;$)
and $element->{'parent'}->{'type'}
and $element->{'parent'}->{'type'} eq 'table_term') {
- $result .= "<term>";
+ $result .= "<term>" if ($element->{'cmdname'} eq 'itemx');
$result .= $self->_index_entry($element);
if ($element->{'args'}->[0]
and $element->{'args'}->[0]->{'contents'}) {
@@ -1616,6 +1616,10 @@ sub _convert($$;$)
pop @{$self->{'document_context'}};
$result .= "</synopsis>";
$result .= "\n";
+ } elsif ($element->{'type'} eq 'table_term') {
+ # should be closed by the @item. Allows to have the index entries in
+ # term, which is better than out.
+ $result .= "<term>";
}
}
diff --git a/tp/t/results/xtable/comment_and_itemx_before_item.pl
b/tp/t/results/xtable/comment_and_itemx_before_item.pl
index c507a4db0d..ef0e3868bf 100644
--- a/tp/t/results/xtable/comment_and_itemx_before_item.pl
+++ b/tp/t/results/xtable/comment_and_itemx_before_item.pl
@@ -182,7 +182,7 @@ $result_converted{'xml'}->{'comment_and_itemx_before_item'}
= '<table commandarg
$result_converted{'docbook'}->{'comment_and_itemx_before_item'} =
'<variablelist><!-- comment -->
-<varlistentry><term><literal>in itemx</literal>
+<varlistentry><term><term><literal>in itemx</literal>
</term></varlistentry></variablelist>';
1;
diff --git a/tp/t/results/xtable/inter_item_commands_in_table.pl
b/tp/t/results/xtable/inter_item_commands_in_table.pl
index 0cdcc44cfe..d11e0a1a58 100644
--- a/tp/t/results/xtable/inter_item_commands_in_table.pl
+++ b/tp/t/results/xtable/inter_item_commands_in_table.pl
@@ -3220,14 +3220,14 @@
$result_converted{'docbook'}->{'inter_item_commands_in_table'} = '<chapter label
<varlistentry><term>‘<literal>asamp--bb2</literal>’
</term></varlistentry></variablelist>
<variablelist>
-<varlistentry><indexterm role="cp"><primary>cindex after
line</primary></indexterm>
-<term>‘<literal>asamp--bb2</literal>’
+<varlistentry><term><indexterm role="cp"><primary>cindex after
line</primary></indexterm>
+‘<literal>asamp--bb2</literal>’
</term></varlistentry></variablelist>
<variablelist><indexterm role="cp"><primary>cindex first</primary></indexterm>
<!-- commant -->
-<varlistentry><indexterm role="cp"><primary>second</primary></indexterm>
+<varlistentry><term><indexterm role="cp"><primary>second</primary></indexterm>
<indexterm role="cp"><primary>third</primary></indexterm>
-<term>‘<literal>asamp--bb2</literal>’
+‘<literal>asamp--bb2</literal>’
</term></varlistentry></variablelist>
</chapter>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/DocBook.pm (_convert): output <term> when table_term container is seen and not for @item, to also enclose index entries in table_term before the @item (same as in html).,
Patrice Dumas <=