[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Add TOP_FOOTER_BUTTONS customization variable
From: |
Patrice Dumas |
Subject: |
branch master updated: Add TOP_FOOTER_BUTTONS customization variable |
Date: |
Sat, 16 Mar 2024 18:05:47 -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 c4db8577f0 Add TOP_FOOTER_BUTTONS customization variable
c4db8577f0 is described below
commit c4db8577f0b388ece7880fd3c4f5d0eee23d8720
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Mar 16 23:05:47 2024 +0100
Add TOP_FOOTER_BUTTONS customization variable
* doc/texi2any_api.texi (Simple Navigation Panel Customization),
tp/Texinfo/Convert/HTML.pm (%defaults, _default_format_element_footer)
(_set_variables_texi2html), tp/Texinfo/options_data.txt,
tp/init/book.pm: add a TOP_FOOTER_BUTTONS to be able to specify
seprately the Top node/@top header and footer.
---
ChangeLog | 10 +
doc/texi2any_api.texi | 5 +-
tp/Texinfo/Convert/HTML.pm | 8 +-
tp/Texinfo/options_data.txt | 1 +
tp/init/book.pm | 2 +-
.../double_contents_top.html | 2 +-
.../sectioning_directions_split_chapter/index.html | 210 +--------------------
.../res_parser/non_ascii_command_line/index.html | 2 +-
8 files changed, 27 insertions(+), 213 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 21e0bb1482..89a027e896 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-03-16 Patrice Dumas <pertusus@free.fr>
+
+ Add TOP_FOOTER_BUTTONS customization variable
+
+ * doc/texi2any_api.texi (Simple Navigation Panel Customization),
+ tp/Texinfo/Convert/HTML.pm (%defaults, _default_format_element_footer)
+ (_set_variables_texi2html), tp/Texinfo/options_data.txt,
+ tp/init/book.pm: add a TOP_FOOTER_BUTTONS to be able to specify
+ seprately the Top node/@top header and footer.
+
2024-03-16 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (_default_format_navigation_panel),
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index 8fe9367707..6e217194c2 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -1173,10 +1173,13 @@ Specifies the buttons appearing at the beginning of
special output units
and, if the output is split, at the end of such units.
@item LINKS_BUTTONS
-Used for @code{<link>} elements if they are output in the headers.
+Used for @code{<link>} elements if they are output in the HTML @code{<head>}.
@item TOP_BUTTONS
+@itemx TOP_FOOTER_BUTTONS
Specifies the buttons used in the top output unit (@pxref{Output Units}).
+@code{TOP_BUTTONS} buttons are used for the header and
@code{TOP_FOOTER_BUTTONS}
+are used for the footer.
@end vtable
Each array specifies which buttons are included, and how they are
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index d2ad06d5f5..253f263bb6 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -897,7 +897,7 @@ sub _get_target($$)
my $self = shift;
my $command = shift;
if (!defined($command)) {
- cluck("_get_target command not defined");
+ cluck("_get_target command argument not defined");
}
if ($self->{'targets'}->{$command}) {
@@ -2495,7 +2495,7 @@ foreach my $buttons ('CHAPTER_BUTTONS', 'MISC_BUTTONS',
'TOP_BUTTONS') {
$defaults{$buttons} = [@{$defaults{'SECTION_BUTTONS'}}];
}
-foreach my $buttons ('CHAPTER_FOOTER_BUTTONS') {
+foreach my $buttons ('CHAPTER_FOOTER_BUTTONS', 'TOP_FOOTER_BUTTONS') {
$defaults{$buttons} = [@{$defaults{'SECTION_FOOTER_BUTTONS'}}];
}
@@ -8179,7 +8179,7 @@ sub _default_format_element_footer($$$$;$)
or ($self->get_conf('SPLIT')
and $self->get_conf('SPLIT') ne 'node')))) {
if ($is_top) {
- $buttons = $self->get_conf('TOP_BUTTONS');
+ $buttons = $self->get_conf('TOP_FOOTER_BUTTONS');
} else {
$buttons = $self->get_conf('MISC_BUTTONS');
}
@@ -13566,6 +13566,8 @@ sub _set_variables_texi2html($)
'Top', 'Contents', 'Index', 'About' ]],
['TOP_BUTTONS', ['Back', 'Forward', ' ',
'Contents', 'Index', 'About']],
+ ['TOP_FOOTER_BUTTONS', ['Back', 'Forward', ' ',
+ 'Contents', 'Index', 'About']],
['MISC_BUTTONS', [ 'Top', 'Contents', 'Index', 'About' ]],
['CHAPTER_BUTTONS', [ 'FastBack', 'FastForward', ' ',
diff --git a/tp/Texinfo/options_data.txt b/tp/Texinfo/options_data.txt
index 64751aac9e..7877687655 100644
--- a/tp/Texinfo/options_data.txt
+++ b/tp/Texinfo/options_data.txt
@@ -335,6 +335,7 @@ XS_STRXFRM_COLLATION_LOCALE converter_customization
undef char
# Not strings
LINKS_BUTTONS converter_other undef buttons
TOP_BUTTONS converter_other undef buttons
+TOP_FOOTER_BUTTONS converter_other undef buttons
SECTION_BUTTONS converter_other undef buttons
CHAPTER_FOOTER_BUTTONS converter_other undef buttons
SECTION_FOOTER_BUTTONS converter_other undef buttons
diff --git a/tp/init/book.pm b/tp/init/book.pm
index dde4919c2f..b63510de55 100644
--- a/tp/init/book.pm
+++ b/tp/init/book.pm
@@ -43,7 +43,7 @@ foreach my $buttons ('SECTION_BUTTONS', 'CHAPTER_BUTTONS',
'TOP_BUTTONS') {
my @book_footer_buttons = ('Contents', 'Index', 'About');
foreach my $buttons ('MISC_BUTTONS', 'SECTION_FOOTER_BUTTONS',
- 'CHAPTER_FOOTER_BUTTONS') {
+ 'CHAPTER_FOOTER_BUTTONS', 'TOP_FOOTER_BUTTONS') {
texinfo_set_from_init_file($buttons, \@book_footer_buttons);
}
diff --git
a/tp/tests/customization/res_parser/double_contents_after_title_book_chapter/double_contents_top.html
b/tp/tests/customization/res_parser/double_contents_after_title_book_chapter/double_contents_top.html
index 4fccb8c24b..e01c703d89 100644
---
a/tp/tests/customization/res_parser/double_contents_after_title_book_chapter/double_contents_top.html
+++
b/tp/tests/customization/res_parser/double_contents_after_title_book_chapter/double_contents_top.html
@@ -47,7 +47,7 @@ ul.toc-numbered-mark {list-style: none}
<a class="top" id="Double-contents"></a><hr>
<div class="nav-panel">
<p>
-[<a href="double_contents_1.html#chapter" title="Next section in reading
order" accesskey="n" rel="next"> > </a>] [<a href="#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>]</p>
+[<a href="#SEC_Contents" title="Table of contents"
rel="contents">Contents</a>]</p>
</div>
diff --git
a/tp/tests/customization/res_parser/sectioning_directions_split_chapter/index.html
b/tp/tests/customization/res_parser/sectioning_directions_split_chapter/index.html
index 3c94ecc1b1..bba9ec00ed 100644
---
a/tp/tests/customization/res_parser/sectioning_directions_split_chapter/index.html
+++
b/tp/tests/customization/res_parser/sectioning_directions_split_chapter/index.html
@@ -277,214 +277,12 @@ description here
</div>
<hr>
<table class="nav-panel" cellpadding="1" cellspacing="1" border="0">
-<tr><td>|</td>
-<td>node-Up</td>
-<td></td>
-<td>href-Up</td>
-<td></td>
-<td>name-Up</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-Forward</td>
-<td>First node</td>
-<td>href-Forward</td>
-<td>First-node.html#First-node</td>
-<td>name-Forward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-Back</td>
-<td></td>
-<td>href-Back</td>
-<td></td>
-<td>name-Back</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-Next</td>
-<td></td>
-<td>href-Next</td>
-<td></td>
-<td>name-Next</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-Prev</td>
-<td></td>
-<td>href-Prev</td>
-<td></td>
-<td>name-Prev</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FastForward</td>
-<td>First node</td>
-<td>href-FastForward</td>
-<td>First-node.html#First-node</td>
-<td>name-FastForward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-FastBack</td>
-<td></td>
-<td>href-FastBack</td>
-<td></td>
-<td>name-FastBack</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-This</td>
-<td>Top</td>
-<td>href-This</td>
-<td>#Top</td>
-<td>name-This</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-NodeUp</td>
-<td></td>
-<td>href-NodeUp</td>
-<td></td>
-<td>name-NodeUp</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-NodePrev</td>
-<td>(dir)</td>
-<td>href-NodePrev</td>
-<td>../dir_html/index.html</td>
-<td>name-NodePrev</td>
-<td>(dir)</td>
-<td>|</td>
-<td>|</td>
-<td>node-NodeNext</td>
-<td>First node</td>
-<td>href-NodeNext</td>
-<td>First-node.html#First-node</td>
-<td>name-NodeNext</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-NodeForward</td>
-<td>First node</td>
-<td>href-NodeForward</td>
-<td>First-node.html#First-node</td>
-<td>name-NodeForward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-NodeBack</td>
-<td></td>
-<td>href-NodeBack</td>
-<td></td>
-<td>name-NodeBack</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileUp</td>
-<td></td>
-<td>href-FirstInFileUp</td>
-<td></td>
-<td>name-FirstInFileUp</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileForward</td>
-<td>First node</td>
-<td>href-FirstInFileForward</td>
-<td>First-node.html#First-node</td>
-<td>name-FirstInFileForward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileBack</td>
-<td></td>
-<td>href-FirstInFileBack</td>
-<td></td>
-<td>name-FirstInFileBack</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNext</td>
-<td></td>
-<td>href-FirstInFileNext</td>
-<td></td>
-<td>name-FirstInFileNext</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFilePrev</td>
-<td></td>
-<td>href-FirstInFilePrev</td>
-<td></td>
-<td>name-FirstInFilePrev</td>
+<tr><td></td>
<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileFastForward</td>
-<td>First node</td>
-<td>href-FirstInFileFastForward</td>
-<td>First-node.html#First-node</td>
-<td>name-FirstInFileFastForward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileFastBack</td>
-<td></td>
-<td>href-FirstInFileFastBack</td>
<td></td>
-<td>name-FirstInFileFastBack</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileThis</td>
-<td>Top</td>
-<td>href-FirstInFileThis</td>
-<td>#Top</td>
-<td>name-FirstInFileThis</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNodeUp</td>
-<td></td>
-<td>href-FirstInFileNodeUp</td>
-<td></td>
-<td>name-FirstInFileNodeUp</td>
-<td></td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNodePrev</td>
-<td>(dir)</td>
-<td>href-FirstInFileNodePrev</td>
-<td>../dir_html/index.html</td>
-<td>name-FirstInFileNodePrev</td>
-<td>(dir)</td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNodeNext</td>
-<td>First node</td>
-<td>href-FirstInFileNodeNext</td>
-<td>First-node.html#First-node</td>
-<td>name-FirstInFileNodeNext</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNodeForward</td>
-<td>First node</td>
-<td>href-FirstInFileNodeForward</td>
-<td>First-node.html#First-node</td>
-<td>name-FirstInFileNodeForward</td>
-<td>1 first node chapter</td>
-<td>|</td>
-<td>|</td>
-<td>node-FirstInFileNodeBack</td>
-<td></td>
-<td>href-FirstInFileNodeBack</td>
-<td></td>
-<td>name-FirstInFileNodeBack</td>
-<td></td>
-<td>|</td>
+<td> </td>
+<td>[<a href="sectioning_toc.html#SEC_Contents" title="Table of contents"
rel="contents">Contents</a>]</td>
+<td>[Index]</td>
</tr></table>
diff --git a/tp/tests/encoded/res_parser/non_ascii_command_line/index.html
b/tp/tests/encoded/res_parser/non_ascii_command_line/index.html
index f4cadb9493..979efdf224 100644
--- a/tp/tests/encoded/res_parser/non_ascii_command_line/index.html
+++ b/tp/tests/encoded/res_parser/non_ascii_command_line/index.html
@@ -56,7 +56,7 @@ Next: <a href="Chapteur.html" accesskey="n"
rel="next">Chapteùr</a> [<a
<hr>
<div class="nav-panel">
<p>
-Next: <a href="Chapteur.html" accesskey="n" rel="next">Chapteùr</a> [<a
href="osé_utf8_abt.html#SEC_About" title="About (help)" rel="help"> ? </a>]</p>
+Next: <a href="Chapteur.html" accesskey="n" rel="next">Chapteùr</a> </p>
</div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Add TOP_FOOTER_BUTTONS customization variable,
Patrice Dumas <=