[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Structuring.pm Texinfo/...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Structuring.pm Texinfo/... |
Date: |
Sun, 02 Oct 2011 13:15:22 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/10/02 13:15:22
Modified files:
tp : TODO
tp/Texinfo : Structuring.pm
tp/Texinfo/Convert: HTML.pm
Added files:
tp/t/init : only_toc_out.init
Log message:
Put special elements in element_next/element_prev chain, but not a
as Forward or Back of the last normal element.
Compare filenames to determine if at end of page; Also verify that
it is indeed the end of the page by checking the file counter.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.185&r2=1.186
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.92&r2=1.93
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.167&r2=1.168
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/init/only_toc_out.init?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -b -r1.185 -r1.186
--- TODO 2 Oct 2011 09:01:43 -0000 1.185
+++ TODO 2 Oct 2011 13:15:21 -0000 1.186
@@ -271,6 +271,14 @@
sectioning/
node_footnote_end
+--> following changed when element_next for special elements became
+set. Nothing tests that in the test suite.
+ node_footnote_use_node
+ no_node_chapter_split
+ nodes_after_top_before_section_use_nodes_chapter
+ nodes_after_top_before_chapter_use_nodes_chapter
+ test_refs_chapter
+ test_refs_nodes
equivalent_nodes mainly for equivalent_nodes-noderename.cnf parsing and renamed
nodes handling.
@@ -290,6 +298,7 @@
NO_MONOLITHIC
in layout/no_monolithic
+ no_monolithic_only_toc_out
done: test/invalid. Not completly incorporated
error_in_footnote_caption.texi (at least partly done in
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -b -r1.92 -r1.93
--- Texinfo/Structuring.pm 2 Oct 2011 09:01:43 -0000 1.92
+++ Texinfo/Structuring.pm 2 Oct 2011 13:15:21 -0000 1.93
@@ -768,9 +768,17 @@
my $directions;
$directions->{'This'} = $element;
$directions->{'Forward'} = $element->{'element_next'}
- if ($element->{'element_next'});
+ if ($element->{'element_next'}
+ and (($element->{'extra'}->{'special_element'}
+ and $element->{'element_next'}->{'extra'}->{'special_element'})
+ or (!$element->{'extra'}->{'special_element'}
+ and
!$element->{'element_next'}->{'extra'}->{'special_element'})));
$directions->{'Back'} = $element->{'element_prev'}
- if ($element->{'element_prev'});
+ if ($element->{'element_prev'}
+ and (($element->{'extra'}->{'special_element'}
+ and $element->{'element_prev'}->{'extra'}->{'special_element'})
+ or (!$element->{'extra'}->{'special_element'}
+ and
!$element->{'element_prev'}->{'extra'}->{'special_element'})));
if ($element->{'extra'}->{'node'}) {
my $node = $element->{'extra'}->{'node'};
foreach my $direction(['NodeUp', 'node_up'], ['NodeNext', 'node_next'],
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -b -r1.167 -r1.168
--- Texinfo/Convert/HTML.pm 2 Oct 2011 09:01:43 -0000 1.167
+++ Texinfo/Convert/HTML.pm 2 Oct 2011 13:15:21 -0000 1.168
@@ -3865,9 +3865,15 @@
# no 'parent' defined happens if there are no pages, and there are elements
# which should only happen when called with $self->get_conf('OUTFILE')
# set to ''.
+ #print STDERR "$element $element->{'parent'}->{'filename'}
$self->{'file_counters'}->{$element->{'parent'}->{'filename'}}\n";
+ #print STDERR "next: $element->{'element_next'}->{'parent'}->{'filename'}\n"
if ($element->{'element_next'});
my $end_page = (!$element->{'element_next'}
or (defined($element->{'parent'})
- and $element->{'parent'} ne
$element->{'element_next'}->{'parent'}));
+ and $element->{'parent'}->{'filename'} ne
$element->{'element_next'}->{'parent'}->{'filename'}
+ and $self->{'file_counters'}->{$element->{'parent'}->{'filename'}}
== 1));
+ #my $end_page = (!$element->{'element_next'}
+ # or (defined($element->{'parent'})
+ # and $element->{'parent'} ne
$element->{'element_next'}->{'parent'}));
my $is_special = $element->{'extra'}->{'special_element'};
if (($end_page or $next_is_top or $next_is_special)
@@ -3919,7 +3925,13 @@
and !$is_special))) {
$rule = $self->get_conf('BIG_RULE');
}
- if ($end_page and $self->get_conf('footnotestyle') eq 'end') {
+
+ # FIXME the next is almost a duplication of end_page except that the
+ # file counter needs not be 1
+ if ((!$element->{'element_next'}
+ or (defined($element->{'parent'})
+ and $element->{'parent'}->{'filename'} ne
$element->{'element_next'}->{'parent'}->{'filename'}))
+ and $self->get_conf('footnotestyle') eq 'end') {
$result .= &{$self->{'footnotes_text'}}($self);
}
if (!$self->get_conf('PROGRAM_NAME_IN_FOOTER')
@@ -4710,8 +4722,7 @@
}
}
}
- # FIXME there add the special element pages
- # also set next_page/prev_page for the special element pages
+
foreach my $page (@$pages) {
if (defined($Texinfo::Config::page_file_name)) {
# FIXME pass the information that it is associated with @top or @node
Top?
@@ -4724,6 +4735,7 @@
if ($self->get_conf('DEBUG'));
}
if ($special_pages) {
+ my $previous_element = $pages->[-1]->{'contents'}->[-1];
my $previous_page = $pages->[-1];
foreach my $page (@$special_pages) {
my $filename
@@ -4735,6 +4747,9 @@
$previous_page = $page;
print STDERR "Special page $page:
$page->{'filename'}($self->{'file_counters'}->{$page->{'filename'}})\n"
if ($self->get_conf('DEBUG'));
+ $page->{'contents'}->[0]->{'element_prev'} = $previous_element;
+ $previous_element->{'element_next'} = $page->{'contents'}->[0];
+ $previous_element = $page->{'contents'}->[0];
}
}
}
@@ -5199,7 +5214,6 @@
$valid_types{$no_number_type .'_nonumber'} = 1;
}
-# FIXME global targets
sub _element_direction($$$$;$)
{
my $self = shift;
Index: t/init/only_toc_out.init
===================================================================
RCS file: t/init/only_toc_out.init
diff -N t/init/only_toc_out.init
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/init/only_toc_out.init 2 Oct 2011 13:15:22 -0000 1.1
@@ -0,0 +1,24 @@
+use strict;
+
+use vars qw($special_element_target_file_name);
+
+$special_element_target_file_name = \&toc_out_element_file_name;
+
+sub toc_out_element_file_name($$$$$)
+{
+ my $converter = shift;
+ my $element = shift;
+ my $target = shift;
+ my $id = shift;
+ my $filename = shift;
+
+ my $prefix = $converter->{'document_name'};
+ my $type = $element->{'extra'}->{'special_element'};
+ if ($type and $type ne 'Contents')
+ {
+ $filename = "$prefix.".$converter->get_conf('EXTENSION');
+ }
+ return ($target, $id, $filename);
+}
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Structuring.pm Texinfo/...,
Patrice Dumas <=