[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Rename BODYTEXT customization variable as BODY_EL
From: |
Patrice Dumas |
Subject: |
branch master updated: Rename BODYTEXT customization variable as BODY_ELEMENT_ATTRIBUTES |
Date: |
Wed, 03 Apr 2024 18:50:18 -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 85615f548e Rename BODYTEXT customization variable as
BODY_ELEMENT_ATTRIBUTES
85615f548e is described below
commit 85615f548e7195b6d5c6839da640cf0f29d56f6d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Apr 4 00:50:05 2024 +0200
Rename BODYTEXT customization variable as BODY_ELEMENT_ATTRIBUTES
* NEWS, doc/texinfo.texi (Customization of HTML Code Inserted)
(HTML Customization Variables List), doc/texi2any_api.texi,
tp/Texinfo/Convert/HTML.pm (%defaults, _file_header_information)
(output), tp/Texinfo/XS/convert/convert_html.c
(BEGIN_FILE_INFORMATION, destroy_begin_file_information)
(file_header_information, html_default_format_begin_file)
(html_default_format_node_redirection_page),
tp/Texinfo/options_data.txt, tp/init/html32.pm b/tp/init/html32.pm,
tp/t/init/t2h_singular.init: rename BODYTEXT customization variable as
BODY_ELEMENT_ATTRIBUTES. Change variable names and structure field to
be consistent.
---
ChangeLog | 16 +++++++++++++++
NEWS | 1 +
doc/texi2any_api.texi | 6 +++---
doc/texinfo.texi | 6 +++---
tp/Texinfo/Convert/HTML.pm | 38 ++++++++++++++++++------------------
tp/Texinfo/XS/convert/convert_html.c | 12 ++++++------
tp/Texinfo/options_data.txt | 2 +-
tp/init/html32.pm | 3 ++-
tp/t/init/t2h_singular.init | 3 ++-
9 files changed, 53 insertions(+), 34 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 17c828f024..3753654fcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-04-03 Patrice Dumas <pertusus@free.fr>
+
+ Rename BODYTEXT customization variable as BODY_ELEMENT_ATTRIBUTES
+
+ * NEWS, doc/texinfo.texi (Customization of HTML Code Inserted)
+ (HTML Customization Variables List), doc/texi2any_api.texi,
+ tp/Texinfo/Convert/HTML.pm (%defaults, _file_header_information)
+ (output), tp/Texinfo/XS/convert/convert_html.c
+ (BEGIN_FILE_INFORMATION, destroy_begin_file_information)
+ (file_header_information, html_default_format_begin_file)
+ (html_default_format_node_redirection_page),
+ tp/Texinfo/options_data.txt, tp/init/html32.pm b/tp/init/html32.pm,
+ tp/t/init/t2h_singular.init: rename BODYTEXT customization variable as
+ BODY_ELEMENT_ATTRIBUTES. Change variable names and structure field to
+ be consistent.
+
2024-04-03 Patrice Dumas <pertusus@free.fr>
Remove USE_UP_NODE_FOR_ELEMENT_UP customization variable
diff --git a/NEWS b/NEWS
index 61c19253c0..5d22d11f63 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ See the manual for detailed information.
. set CHECK_NORMAL_MENU_STRUCTURE in the default case.
. rename COMPLEX_FORMAT_IN_TABLE customization option as
INDENTED_BLOCK_COMMANDS_IN_TABLE.
+ . Rename BODYTEXT customization option as BODY_ELEMENT_ATTRIBUTES.
. some unused translation files have been removed for the
"texinfo_document" domain
. the us-ascii encoding is not tried anymore when looking for a document
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index 11abf97ba4..11917c1247 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -4716,11 +4716,11 @@ You can define the variable @code{EXTRA_HEAD} to add
text within the
@code{AFTER_BODY_OPEN} is added just after @code{<body>} is output.
These variables are empty by default.
-@c @vindex BODYTEXT@r{, in customization}
-@vindex BODYTEXT
+@c @vindex BODY_ELEMENT_ATTRIBUTES@r{, in customization}
+@vindex BODY_ELEMENT_ATTRIBUTES
@cindex @code{<body>} tag, attributes of
The @code{<body>} element attributes may be set by defining the
-customization variable @code{BODYTEXT}.
+customization variable @code{BODY_ELEMENT_ATTRIBUTES}.
@vindex OUTPUT_ENCODING_NAME
@cindex Encoding, in HTML output
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 610ac24c22..22dde12f1b 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -18380,7 +18380,7 @@ and set @code{BIG_RULE} for the wider separator
sometime used.
@vindex EXTRA_HEAD
@vindex AFTER_BODY_OPEN
@cindex @code{<head>} block, adding to
-@vindex BODYTEXT
+@vindex BODY_ELEMENT_ATTRIBUTES
You can set @code{HTML_ROOT_ELEMENT_ATTRIBUTES} to add attributes to
the @code{<html>} element.
You can define the variable @code{EXTRA_HEAD} to add text within the
@@ -18390,7 +18390,7 @@ These variables are empty by default.
@cindex @code{<body>} tag, attributes of
You can set the attributes of the @code{<body>} element by defining the
-customization variable @code{BODYTEXT}.
+customization variable @code{BODY_ELEMENT_ATTRIBUTES}.
By default, the @samp{lang} attribute is set to the document language
(@pxref{@code{@@documentlanguage}}).
@@ -18728,7 +18728,7 @@ special elements, but not for footers and headers;
default
@cindex @code{<body>} text, customizing
@opindex lang@r{, HTML attribute}
-@item BODYTEXT
+@item BODY_ELEMENT_ATTRIBUTES
The @code{<body>} attributes text. By default, sets the
HTML @code{lang} attribute to the document language
(@pxref{@code{@@documentlanguage}}).
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index f459df40b2..7f58948676 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2421,7 +2421,7 @@ my %defaults = (
# Customization option variables
'BIG_RULE' => '<hr>',
- 'BODYTEXT' => undef,
+ 'BODY_ELEMENT_ATTRIBUTES' => undef,
'CHAPTER_HEADER_LEVEL' => 2,
'CLOSE_QUOTE_SYMBOL' => undef,
'CONTENTS_OUTPUT_LOCATION' => 'after_top',
@@ -11100,10 +11100,10 @@ sub _file_header_information($$;$)
my $doctype = $self->get_conf('DOCTYPE');
my $root_html_element_attributes =
$self->_root_html_element_attributes_string();
- my $bodytext = $self->get_conf('BODYTEXT');
+ my $body_attributes = $self->get_conf('BODY_ELEMENT_ATTRIBUTES');
if ($self->get_conf('HTML_MATH') and $self->get_conf('HTML_MATH') eq
'mathjax'
and $self->get_file_information('mathjax', $filename)) {
- $bodytext .= ' class="tex2jax_ignore"';
+ $body_attributes .= ' class="tex2jax_ignore"';
}
my $copying_comment = $self->get_info('copying_comment');
$copying_comment = ''
@@ -11170,8 +11170,8 @@ MathJax = {
}
- return ($title, $description, $encoding, $date, $css_lines,
- $doctype, $root_html_element_attributes, $bodytext, $copying_comment,
+ return ($title, $description, $encoding, $date, $css_lines, $doctype,
+ $root_html_element_attributes, $body_attributes, $copying_comment,
$after_body_open, $extra_head, $program_and_version,
$program_homepage,
$program, $generator);
}
@@ -11228,11 +11228,11 @@ sub _default_format_begin_file($$$)
}
}
- my ($title, $description, $encoding, $date, $css_lines,
- $doctype, $root_html_element_attributes, $bodytext, $copying_comment,
- $after_body_open, $extra_head, $program_and_version,
$program_homepage,
- $program, $generator) =
$self->_file_header_information($command_for_title,
- $filename);
+ my ($title, $description, $encoding, $date, $css_lines, $doctype,
+ $root_html_element_attributes, $body_attributes, $copying_comment,
+ $after_body_open, $extra_head, $program_and_version, $program_homepage,
+ $program, $generator)
+ = $self->_file_header_information($command_for_title, $filename);
my $links = $self->_get_links($filename, $output_unit, $node_command);
@@ -11258,7 +11258,7 @@ ${links}$css_lines
$extra_head
</head>
-<body $bodytext>
+<body $body_attributes>
$after_body_open";
return $result;
@@ -11278,11 +11278,11 @@ sub _default_format_node_redirection_page($$;$)
{ 'href' => {'type' => '_converted', 'text' => $direction }}),
'Tr redirection sentence');
- my ($title, $description, $encoding, $date, $css_lines,
- $doctype, $root_html_element_attributes, $bodytext, $copying_comment,
- $after_body_open, $extra_head, $program_and_version,
$program_homepage,
- $program, $generator) = $self->_file_header_information($command,
- $filename);
+ my ($title, $description, $encoding, $date, $css_lines, $doctype,
+ $root_html_element_attributes, $body_attributes, $copying_comment,
+ $after_body_open, $extra_head, $program_and_version, $program_homepage,
+ $program, $generator) = $self->_file_header_information($command,
+ $filename);
my $result = "$doctype
<html${root_html_element_attributes}>
@@ -11307,7 +11307,7 @@ $description\n".
"$extra_head
</head>
-<body $bodytext>
+<body $body_attributes>
$after_body_open
<p>$string</p>
</body>
@@ -12888,10 +12888,10 @@ sub output($$)
# pass to XS.
_XS_reset_output_init_conf($self);
- # set BODYTEXT
+ # set BODY_ELEMENT_ATTRIBUTES
$self->set_global_document_commands('preamble', ['documentlanguage']);
my $structure_preamble_document_language =
$self->get_conf('documentlanguage');
- $self->set_conf('BODYTEXT',
+ $self->set_conf('BODY_ELEMENT_ATTRIBUTES',
'lang="' . $structure_preamble_document_language . '"');
$self->set_global_document_commands('before', ['documentlanguage']);
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 86aa6e689b..6b60e5e839 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -6726,7 +6726,7 @@ typedef struct BEGIN_FILE_INFORMATION {
char *encoding;
char *css_lines;
char *root_html_element_attributes;
- char *bodytext;
+ char *body_attributes;
char *generator;
char *extra_head;
} BEGIN_FILE_INFORMATION;
@@ -6739,7 +6739,7 @@ destroy_begin_file_information (BEGIN_FILE_INFORMATION
*begin_info)
free (begin_info->encoding);
free (begin_info->css_lines);
free (begin_info->root_html_element_attributes);
- free (begin_info->bodytext);
+ free (begin_info->body_attributes);
free (begin_info->generator);
free (begin_info->extra_head);
@@ -7011,7 +7011,7 @@ file_header_information (CONVERTER *self, const ELEMENT
*command,
begin_info->root_html_element_attributes = strdup ("");
text_reset (&text);
- text_append (&text, self->conf->BODYTEXT.string);
+ text_append (&text, self->conf->BODY_ELEMENT_ATTRIBUTES.string);
if (self->conf->HTML_MATH.string
&& !strcmp (self->conf->HTML_MATH.string, "mathjax")
&& html_get_file_information (self, "mathjax", filename, &status) > 0)
@@ -7019,7 +7019,7 @@ file_header_information (CONVERTER *self, const ELEMENT
*command,
text_append_n (&text, " class=\"tex2jax_ignore\"", 23);
}
- begin_info->bodytext = strdup (text.text);
+ begin_info->body_attributes = strdup (text.text);
text_reset (&text);
if (self->conf->PROGRAM.string && strlen (self->conf->PROGRAM.string))
@@ -7225,7 +7225,7 @@ html_default_format_begin_file (CONVERTER *self, const
char *filename,
if (begin_info->extra_head)
text_append (&result, begin_info->extra_head);
text_append_n (&result, "\n</head>\n\n", 10);
- text_printf (&result, "<body %s>\n", begin_info->bodytext);
+ text_printf (&result, "<body %s>\n", begin_info->body_attributes);
if (self->conf->AFTER_BODY_OPEN.string)
text_append (&result, self->conf->AFTER_BODY_OPEN.string);
@@ -8307,7 +8307,7 @@ html_default_format_node_redirection_page (CONVERTER
*self,
if (begin_info->extra_head)
text_append (&result, begin_info->extra_head);
text_append_n (&result, "\n</head>\n\n", 10);
- text_printf (&result, "<body %s>\n", begin_info->bodytext);
+ text_printf (&result, "<body %s>\n", begin_info->body_attributes);
if (self->conf->AFTER_BODY_OPEN.string)
text_append (&result, self->conf->AFTER_BODY_OPEN.string);
diff --git a/tp/Texinfo/options_data.txt b/tp/Texinfo/options_data.txt
index 5ae1dcd225..986b83ff3f 100644
--- a/tp/Texinfo/options_data.txt
+++ b/tp/Texinfo/options_data.txt
@@ -204,7 +204,7 @@ AUTO_MENU_MAX_WIDTH converter_customization
undef integer
BEFORE_SHORT_TOC_LINES converter_customization undef char
BEFORE_TOC_LINES converter_customization undef char
BIG_RULE converter_customization undef char
-BODYTEXT converter_customization undef char
+BODY_ELEMENT_ATTRIBUTES converter_customization undef char
# for LaTeX
CLASS_BEGIN_USEPACKAGE converter_customization undef char
COPIABLE_LINKS converter_customization undef integer
diff --git a/tp/init/html32.pm b/tp/init/html32.pm
index 952ec1afdb..59a3caa314 100644
--- a/tp/init/html32.pm
+++ b/tp/init/html32.pm
@@ -44,7 +44,8 @@
texinfo_set_from_init_file('INDENTED_BLOCK_COMMANDS_IN_TABLE', 1);
texinfo_set_from_init_file('DOCTYPE', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
3.2//EN" "http://www.w3.org/TR/html32/loose.dtd">');
-texinfo_set_from_init_file('BODYTEXT', 'bgcolor="#FFFFFF" text="#000000"
link="#0000FF" vlink="#800080" alink="#FF0000"');
+texinfo_set_from_init_file('BODY_ELEMENT_ATTRIBUTES',
+ 'bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080"
alink="#FF0000"');
texinfo_set_from_init_file('BEFORE_SHORT_TOC_LINES', '');
texinfo_set_from_init_file('AFTER_SHORT_TOC_LINES', '');
diff --git a/tp/t/init/t2h_singular.init b/tp/t/init/t2h_singular.init
index c38b5c7a55..fc290e1758 100644
--- a/tp/t/init/t2h_singular.init
+++ b/tp/t/init/t2h_singular.init
@@ -35,7 +35,8 @@ texinfo_set_from_init_file('VERBOSE', 1);
my $T2H_SING_base_images = '../singular_images/';
# inside <BODY ..>
-texinfo_set_from_init_file('BODYTEXT','lang="en"
background="'.${T2H_SING_base_images}.'Mybg.png"');
+texinfo_set_from_init_file('BODY_ELEMENT_ATTRIBUTES','lang="en" background="'
+ .${T2H_SING_base_images}.'Mybg.png"');
# after <BODY>
texinfo_set_from_init_file('AFTER_BODY_OPEN', "\n");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Rename BODYTEXT customization variable as BODY_ELEMENT_ATTRIBUTES,
Patrice Dumas <=