[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (set_informativ
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (set_informative_command_value), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename _informative_command() as set_informative_command_value(). |
Date: |
Tue, 07 Sep 2021 18:02:25 -0400 |
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 44d4330 * tp/Texinfo/Convert/Converter.pm
(set_informative_command_value), tp/Texinfo/Convert/DocBook.pm,
tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm,
tp/Texinfo/Convert/Plaintext.pm: rename _informative_command() as
set_informative_command_value().
44d4330 is described below
commit 44d43307469bae84a56a718cf33ad2af32cf8ae7
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Sep 8 00:02:17 2021 +0200
* tp/Texinfo/Convert/Converter.pm (set_informative_command_value),
tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm:
rename _informative_command() as set_informative_command_value().
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/Converter.pm | 41 ++++++++++++++++++++++++-----------------
tp/Texinfo/Convert/DocBook.pm | 2 +-
tp/Texinfo/Convert/HTML.pm | 2 +-
tp/Texinfo/Convert/LaTeX.pm | 2 +-
tp/Texinfo/Convert/Plaintext.pm | 2 +-
6 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4365805..206c1a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2021-09-07 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Convert/Converter.pm (set_informative_command_value),
+ tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
+ tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm:
+ rename _informative_command() as set_informative_command_value().
+
+2021-09-07 Patrice Dumas <pertusus@free.fr>
+
* tp/Texinfo/Convert/Converter.pm (write_or_return)
tp/DebugTexinfo/DebugTree.pm, tp/Texinfo/Convert/DocBook.pm,
tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm,
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 8d5bd35..9709f4b 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -130,7 +130,7 @@ sub _informative_command_value($$)
# REMARK documentencoding handling is not reverted by resetting
# a value with set_conf, as the encodings are set using other
# informations (possibly based on @documentencoding) in converter.
-sub _informative_command($$)
+sub set_informative_command_value($$)
{
my $self = shift;
my $root = shift;
@@ -313,7 +313,7 @@ sub set_global_document_commands($$;$)
print STDERR "SET_global_multiple_commands($commands_location)
$global_command\n";
}
if (defined($root)) {
- $self->_informative_command($root);
+ $self->set_informative_command_value($root);
} else {
# commands not appearing in the document, this should set the
# same value, the converter initialization value
@@ -1392,6 +1392,20 @@ sub convert_accents($$$;$)
}
}
+# Add any index sub-entries specified with @subentry, separated by commas.
+sub convert_index_subentries {
+ my ($self, $entry) = @_;
+
+ my $result = '';
+ my $tmp = $entry->{'command'};
+ while ($tmp->{'extra'} and $tmp->{'extra'}->{'subentry'}) {
+ $tmp = $tmp->{'extra'}->{'subentry'};
+ $result .= $self->convert_tree({'text' => ', '});
+ $result .= $self->convert_tree($tmp->{'args'}->[0]);
+ }
+ return $result;
+}
+
# This method allows to count words in elements and returns an array
# and a text already formatted.
sub sort_element_counts($$;$$)
@@ -1460,6 +1474,7 @@ sub sort_element_counts($$;$$)
return (\@sorted_name_counts_array, $result);
}
+
# XML related methods and variables that may be used in different
# XML Converters.
sub xml_protect_text($$)
@@ -1476,21 +1491,6 @@ sub xml_protect_text($$)
return $text;
}
-# Add any index sub-entries specified with @subentry, separated by commas.
-sub convert_index_subentries {
- my ($self, $entry) = @_;
-
- my $result = '';
- my $tmp = $entry->{'command'};
- while ($tmp->{'extra'} and $tmp->{'extra'}->{'subentry'}) {
- $tmp = $tmp->{'extra'}->{'subentry'};
- $result .= $self->convert_tree({'text' => ', '});
- $result .= $self->convert_tree($tmp->{'args'}->[0]);
- }
- return $result;
-}
-
-
# 'today' is not set here.
our %default_xml_no_arg_commands_formatting;
$default_xml_no_arg_commands_formatting{'normal'} = {
@@ -1866,6 +1866,13 @@ Returns the value of the Texinfo configuration option
I<$option_string>.
Set the Texinfo configuration option I<$option_string> to I<$value> if
not set as a converter option.
+=item $converter->set_informative_command_value($element)
+
+Set the Texinfo configuration option corresponding to the tree element
+C<$element>. The command associated to the tree element should be
+a command that sets some information, such as C<@documentlanguage>,
+C<@contents> or <@footnotestyle> for example.
+
=item $result = $converter->top_node_filename($document_name)
Returns a file name for the Top node file using either TOP_FILE
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 301a332..f528126 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -655,7 +655,7 @@ sub _convert($$;$)
} elsif (exists($docbook_misc_commands{$root->{'cmdname'}})) {
#warn " is dbk misc command\n";
if ($docbook_global_commands{$root->{'cmdname'}}) {
- $self->_informative_command($root);
+ $self->set_informative_command_value($root);
return '';
}
my $command;
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 7e626fb..220d337 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -3881,7 +3881,7 @@ sub _convert_informative_command($$$$)
return '' if ($self->in_string());
$cmdname = 'shortcontents' if ($cmdname eq 'summarycontents');
- $self->_informative_command($command);
+ $self->set_informative_command_value($command);
if ($self->get_conf('CONTENTS_OUTPUT_LOCATION') eq 'inline'
and ($cmdname eq 'contents' or $cmdname eq 'shortcontents')
and $self->get_conf($cmdname)
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 9515dba..835dfb3 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -2742,7 +2742,7 @@ sub _convert($$)
# in a way that can be reverted as with @firstparagraphindent.
# use of \usepackage{indentfirst} cannot be reverted.
} elsif ($informative_commands{$command}) {
- $self->_informative_command($root);
+ $self->set_informative_command_value($root);
if ($command eq 'documentlanguage') {
my $language = $self->get_conf('documentlanguage');
$language =~ s/_/-/;
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index c0198e0..3831172 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -2701,7 +2701,7 @@ sub _convert($$)
# all the @-commands that have an information for the formatting, like
# @paragraphindent, @frenchspacing...
} elsif ($informative_commands{$command}) {
- $self->_informative_command($root);
+ $self->set_informative_command_value($root);
return '';
} else {
$unknown_command = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (set_informative_command_value), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename _informative_command() as set_informative_command_value().,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/Converter.pm (write_or_return) tp/DebugTexinfo/DebugTree.pm, tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/TexinfoXML.pm: rename _output_text() as write_or_return().
- Next by Date:
branch master updated: * tp/Texinfo/Convert/Converter.pm (normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm: rename _sectioning_command_normalized_filename() as normalized_sectioning_command_filename().
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/Converter.pm (write_or_return) tp/DebugTexinfo/DebugTree.pm, tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/TexinfoXML.pm: rename _output_text() as write_or_return().
- Next by thread:
branch master updated: * tp/Texinfo/Convert/Converter.pm (normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm: rename _sectioning_command_normalized_filename() as normalized_sectioning_command_filename().
- Index(es):