[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5309] * tp/Texinfo/Structuring.pm: set @ command_unnumbered for
From: |
Patrice Dumas |
Subject: |
[5309] * tp/Texinfo/Structuring.pm: set @ command_unnumbered for the toplevel |
Date: |
Mon, 12 Aug 2013 22:03:13 +0000 |
Revision: 5309
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5309
Author: pertusus
Date: 2013-08-12 22:03:00 +0000 (Mon, 12 Aug 2013)
Log Message:
-----------
* tp/Texinfo/Structuring.pm: set @command_unnumbered for the toplevel
@-command if not @top. Report from Karl.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Structuring.pm
trunk/tp/t/30sectioning.t
Added Paths:
-----------
trunk/tp/t/results/sectioning/section_below_unnumbered_no_top.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-08-12 20:47:44 UTC (rev 5308)
+++ trunk/ChangeLog 2013-08-12 22:03:00 UTC (rev 5309)
@@ -2,6 +2,8 @@
* tp/init/chm.pm: sort indices names to get a reproducible output.
Report by Karl.
+ * tp/Texinfo/Structuring.pm: set @command_unnumbered for the toplevel
+ @-command if not @top. Report from Karl.
2013-08-11 Karl Berry <address@hidden>
Modified: trunk/tp/Texinfo/Structuring.pm
===================================================================
--- trunk/tp/Texinfo/Structuring.pm 2013-08-12 20:47:44 UTC (rev 5308)
+++ trunk/tp/Texinfo/Structuring.pm 2013-08-12 22:03:00 UTC (rev 5309)
@@ -303,7 +303,17 @@
$sec_root->{'level'} = $level - 1;
$sec_root->{'section_childs'} = [$content];
$number_top_level = $level;
+ # if $level of top sectioning element is 0, which means that
+ # it is a @top, $number_top_level is 1 as it is associated to
+ # the level of chapter/unnumbered...
$number_top_level++ if (!$number_top_level);
+ if ($content->{'cmdname'} ne 'top') {
+ if (!$unnumbered_commands{$content->{'cmdname'}}) {
+ $command_unnumbered[$content->{'level'}] = 0;
+ } else {
+ $command_unnumbered[$content->{'level'}] = 1;
+ }
+ }
}
if (!defined($command_numbers[$content->{'level'}])) {
if ($unnumbered_commands{$content->{'cmdname'}}) {
Modified: trunk/tp/t/30sectioning.t
===================================================================
--- trunk/tp/t/30sectioning.t 2013-08-12 20:47:44 UTC (rev 5308)
+++ trunk/tp/t/30sectioning.t 2013-08-12 22:03:00 UTC (rev 5309)
@@ -367,6 +367,10 @@
@bye
'],
+['section_below_unnumbered_no_top',
+'@unnumbered U
address@hidden S
+'],
['top_no_argument_and_content',
'@top
Added: trunk/tp/t/results/sectioning/section_below_unnumbered_no_top.pl
===================================================================
--- trunk/tp/t/results/sectioning/section_below_unnumbered_no_top.pl
(rev 0)
+++ trunk/tp/t/results/sectioning/section_below_unnumbered_no_top.pl
2013-08-12 22:03:00 UTC (rev 5309)
@@ -0,0 +1,234 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'section_below_unnumbered_no_top'} = {
+ 'contents' => [
+ {
+ 'contents' => [],
+ 'parent' => {},
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'U'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'unnumbered',
+ 'contents' => [],
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ],
+ 'spaces_after_command' => {}
+ },
+ 'level' => 1,
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'S'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'section',
+ 'contents' => [],
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ],
+ 'spaces_after_command' => {}
+ },
+ 'level' => 2,
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[0]{'parent'} =
$result_trees{'section_below_unnumbered_no_top'};
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[1];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[1];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'extra'}{'misc_content'}[0]
=
$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'extra'}{'spaces_after_command'}
=
$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[1]{'parent'} =
$result_trees{'section_below_unnumbered_no_top'};
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[2];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'parent'}
= $result_trees{'section_below_unnumbered_no_top'}{'contents'}[2];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'extra'}{'misc_content'}[0]
=
$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[1];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'extra'}{'spaces_after_command'}
=
$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'section_below_unnumbered_no_top'}{'contents'}[2]{'parent'} =
$result_trees{'section_below_unnumbered_no_top'};
+
+$result_texis{'section_below_unnumbered_no_top'} = '@unnumbered U
address@hidden S
+';
+
+
+$result_texts{'section_below_unnumbered_no_top'} = 'U
+*
+S
+=
+';
+
+$result_sectioning{'section_below_unnumbered_no_top'} = {
+ 'level' => 0,
+ 'section_childs' => [
+ {
+ 'cmdname' => 'unnumbered',
+ 'extra' => {},
+ 'level' => 1,
+ 'section_childs' => [
+ {
+ 'cmdname' => 'section',
+ 'extra' => {},
+ 'level' => 2,
+ 'section_up' => {}
+ }
+ ],
+ 'section_up' => {}
+ }
+ ]
+};
+$result_sectioning{'section_below_unnumbered_no_top'}{'section_childs'}[0]{'section_childs'}[0]{'section_up'}
= $result_sectioning{'section_below_unnumbered_no_top'}{'section_childs'}[0];
+$result_sectioning{'section_below_unnumbered_no_top'}{'section_childs'}[0]{'section_up'}
= $result_sectioning{'section_below_unnumbered_no_top'};
+
+$result_errors{'section_below_unnumbered_no_top'} = [];
+
+
+
+$result_converted{'plaintext'}->{'section_below_unnumbered_no_top'} = 'U
+*
+
+S
+=
+
+';
+
+
+$result_converted{'html'}->{'section_below_unnumbered_no_top'} = '<!DOCTYPE
html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Untitled Document</title>
+
+<meta name="description" content="Untitled Document">
+<meta name="keywords" content="Untitled Document">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.indentedblock {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style:oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nocodebreak {white-space:nowrap}
+span.nolinebreak {white-space:nowrap}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#800080" alink="#FF0000">
+<a name="U"></a>
+<h2 class="unnumbered">U</h2>
+<a name="S"></a>
+<h3 class="section">S</h3>
+<hr>
+
+
+
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'section_below_unnumbered_no_top'} = [
+ {
+ 'error_line' => 'warning: must specify a title with a title command or @top
+',
+ 'text' => 'must specify a title with a title command or @top',
+ 'type' => 'warning'
+ }
+];
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5309] * tp/Texinfo/Structuring.pm: set @ command_unnumbered for the toplevel,
Patrice Dumas <=