texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp TODO Texinfo/Common.pm Texinfo/Conve...


From: Patrice Dumas
Subject: texinfo/tp TODO Texinfo/Common.pm Texinfo/Conve...
Date: Sun, 05 Aug 2012 14:34:14 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/08/05 14:34:14

Modified files:
        tp             : TODO 
        tp/Texinfo     : Common.pm 
        tp/Texinfo/Convert: HTML.pm Plaintext.pm 
        tp/t/init      : t2h_singular.init 
        tp/tests/formatting/res_parser/float_copying: 
                                                      Copying-and-floats.html 
                                                      index.html 
        tp/tests/layout: tests-parser.txt 

Log message:
        Replace SHORT_REF by FLOAT_NAME_IN_XREF for floats and 
ALWAYS_NODE_ARG_IN_XREF
        for the other cases.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.284&r2=1.285
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.146&r2=1.147
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.246&r2=1.247
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.220&r2=1.221
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/init/t2h_singular.init?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/res_parser/float_copying/Copying-and-floats.html?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/res_parser/float_copying/index.html?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/layout/tests-parser.txt?cvsroot=texinfo&r1=1.2&r2=1.3

Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -b -r1.284 -r1.285
--- TODO        4 Aug 2012 22:45:43 -0000       1.284
+++ TODO        5 Aug 2012 14:34:13 -0000       1.285
@@ -5,7 +5,7 @@
 Before next release
 ===================
 
-Document TEXTCONTENT_COMMENT.
+Document TEXTCONTENT_COMMENT, 'FLOAT_NAME_IN_XREF', 'ALWAYS_NODE_ARG_IN_XREF'
 
 
 Bugs

Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -b -r1.146 -r1.147
--- Texinfo/Common.pm   4 Aug 2012 23:07:19 -0000       1.146
+++ Texinfo/Common.pm   5 Aug 2012 14:34:13 -0000       1.147
@@ -138,7 +138,7 @@
 my @obsolete_variables = ('TOP_HEADING_AT_BEGINNING', 'USE_SECTIONS',
   'IDX_SUMMARY', 'I18N_PERL_HASH', 'USE_UNICODE', 'USE_NLS',
   'USE_UP_FOR_ADJACENT_NODES', 'SEPARATE_DESCRIPTION', 
-  'NEW_CROSSREF_STYLE',);
+  'NEW_CROSSREF_STYLE', 'SHORT_REF');
 
 my @variable_settables_not_used = ('COMPLETE_IMAGE_PATHS', 'TOC_FILE');
 
@@ -149,7 +149,7 @@
 my @variable_settables = (
   'DEBUG', 'FRAMES', 'FRAMESET_DOCTYPE', 'DOCTYPE', 'TEST', 'DUMP_TEXI',
   'TOP_FILE', 'SHOW_MENU', 'USE_NODES', 'TOC_LINKS', 'SHORTEXTN',
-  'PREFIX', 'SHORT_REF', 'DEF_TABLE', 'L2H', 'MONOLITHIC',
+  'PREFIX', 'DEF_TABLE', 'L2H', 'MONOLITHIC',
   'L2H_L2H', 'L2H_SKIP', 'L2H_TMP', 'L2H_FILE', 'L2H_CLEAN',
   'L2H_HTML_VERSION', 'IGNORE_PREAMBLE_TEXT', 'EXTERNAL_DIR', 'USE_ISO',
   'SPLIT_INDEX', 'IN_ENCODING',
@@ -187,7 +187,7 @@
   'TEXI2HTML', 'IMAGE_LINK_PREFIX', 'FIX_TEXINFO',
   'TREE_TRANSFORMATIONS', 'BASEFILENAME_LENGTH',
 # FIXME document
-  'TEXTCONTENT_COMMENT',
+  'TEXTCONTENT_COMMENT', 'FLOAT_NAME_IN_XREF', 'ALWAYS_NODE_ARG_IN_XREF',
 # FIXME Not strings. To be documented.
   'LINKS_BUTTONS', 'TOP_BUTTONS', 'SECTION_BUTTONS', 'BUTTONS_TEXT',
   'BUTTONS_ACCESSKEY', 'BUTTONS_REL', 'BUTTONS_GOTO',

Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -b -r1.246 -r1.247
--- Texinfo/Convert/HTML.pm     5 Aug 2012 09:09:23 -0000       1.246
+++ Texinfo/Convert/HTML.pm     5 Aug 2012 14:34:13 -0000       1.247
@@ -432,7 +432,7 @@
   return $href;
 }
 
-sub command_text($$$)
+sub command_text($$;$)
 {
   my $self = shift;
   my $command = shift;
@@ -945,7 +945,8 @@
   'USE_REL_REV'          => 1,
   'NODE_NAME_IN_MENU'    => 1,
   'NODE_NAME_IN_INDEX'   => 1,
-  'SHORT_REF'            => 1,
+  'ALWAYS_NODE_ARG_IN_XREF' => 1,
+  'FLOAT_NAME_IN_XREF'   => 0,
   'OVERVIEW_LINK_TO_TOC' => 1,
   'COMPLEX_FORMAT_IN_TABLE' => 0,
   'WORDS_IN_PAGE'        => 300,
@@ -3036,7 +3037,18 @@
          and $node->{'extra'}->{'associated_section'}) {
         $command = $node->{'extra'}->{'associated_section'};
         $name = $self->command_text($command, 'text_nonumber');
-      } elsif (!$self->get_conf('SHORT_REF')) {
+      } elsif ($node->{'cmdname'} eq 'float') {
+        if ($self->get_conf('FLOAT_NAME_IN_XREF')) {
+          $name = $self->command_text($command);
+        }
+        if (!defined($name) or $name eq '') {
+          if (defined($args->[0]->{'monospace'})) {
+            $name = $args->[0]->{'monospace'};
+          } else {
+            $name = '';
+          }
+        }
+      } elsif (!$self->get_conf('ALWAYS_NODE_ARG_IN_XREF')) { 
         $name = $self->command_text($command, 'text_nonumber');
         #die "$command $command->{'normalized'}" if (!defined($name));
       } elsif (defined($args->[0]->{'monospace'})) {
@@ -3074,6 +3086,7 @@
          { 'reference_name' => {'type' => '_converted', 'text' => $reference} 
});
     }
   } else {
+    # external reference
     my $node_entry = {};
     $node_entry->{'node_content'} = 
$root->{'extra'}->{'node_argument'}->{'node_content'}
       if ($root->{'extra'}->{'node_argument'}
@@ -7535,7 +7548,8 @@
   ['SPLIT_INDEX', 100],
   ['PROGRAM_NAME_IN_FOOTER', 1],
   ['HEADER_IN_TABLE', 1],
-  ['SHORT_REF', 0],
+  ['ALWAYS_NODE_ARG_IN_XREF', 0],
+  ['FLOAT_NAME_IN_XREF', 1],
   ['USE_TITLEPAGE_FOR_TITLE', 1],
   ['MENU_ENTRY_COLON', ''],
   ['INDEX_ENTRY_COLON', ''],

Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -b -r1.220 -r1.221
--- Texinfo/Convert/Plaintext.pm        5 Aug 2012 08:07:02 -0000       1.220
+++ Texinfo/Convert/Plaintext.pm        5 Aug 2012 14:34:13 -0000       1.221
@@ -1778,7 +1778,7 @@
             and $root->{'extra'}->{'label'}->{'cmdname'} eq 'float') {
           my $float = $root->{'extra'}->{'label'};
 
-          my $name = $self->_float_type_number($float);;
+          my $name = $self->_float_type_number($float);
           $args[1] = $name->{'contents'};
         }
         if ($command eq 'inforef' and scalar(@args) == 3) {

Index: t/init/t2h_singular.init
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/init/t2h_singular.init,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/init/t2h_singular.init    12 Jan 2012 00:23:26 -0000      1.6
+++ t/init/t2h_singular.init    5 Aug 2012 14:34:14 -0000       1.7
@@ -23,8 +23,8 @@
 # if set, creates one html file per node
 set_from_init_file('SPLIT', 'node');
 
-#if set cross-references are given without section numbers
-set_from_init_file('SHORT_REF', 1);
+#if set cross-references use the xref node name argument
+set_from_init_file('ALWAYS_NODE_ARG_IN_XREF', 1);
 
 # if set, chatter about what we are doing
 set_from_init_file('VERBOSE', 1);

Index: tests/formatting/res_parser/float_copying/Copying-and-floats.html
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/tests/formatting/res_parser/float_copying/Copying-and-floats.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tests/formatting/res_parser/float_copying/Copying-and-floats.html   25 Feb 
2012 13:15:58 -0000      1.2
+++ tests/formatting/res_parser/float_copying/Copying-and-floats.html   5 Aug 
2012 14:34:14 -0000       1.3
@@ -80,22 +80,22 @@
 <p>Public domain is not really a licence, as it means than 
 the author abandon his copyright.
 </p>
-</div><p><strong>Copyright notice 1: </strong>The Public Domain notice<a 
name="DOCF1_2" href="float_copying_fot.html#FOOT1_2">(2)</a>
+<div class="float-caption"><p><strong>Copyright notice 1: </strong>The Public 
Domain notice<a name="DOCF1_2" href="float_copying_fot.html#FOOT1_2">(2)</a>
 </p>
 <a name="public-domain-anchor"></a><a name="index-copying-indexed-caption"></a>
 <a name="index-copying-indexed-caption-function"></a>
-
+</div></div>
 
 <div class="float"><a name="public-domain"></a>
 
 <p>Public domain is not really a licence, as it means than 
 the author abandon his copyright.
 </p>
-</div><p><strong>Copyright notice 1: </strong>The Public Domain notice<a 
name="DOCF1_3" href="float_copying_fot.html#FOOT1_3">(3)</a>
+<div class="float-caption"><p><strong>Copyright notice 1: </strong>The Public 
Domain notice<a name="DOCF1_3" href="float_copying_fot.html#FOOT1_3">(3)</a>
 </p>
 <a name="public-domain-anchor"></a><a name="index-copying-indexed-caption"></a>
 <a name="index-copying-indexed-caption-function"></a>
-
+</div></div>
 
 <a name="listoffloats"></a>
 <h3 class="subheading">listoffloats</h3>

Index: tests/formatting/res_parser/float_copying/index.html
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/tests/formatting/res_parser/float_copying/index.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tests/formatting/res_parser/float_copying/index.html        25 Feb 2012 
13:15:58 -0000      1.2
+++ tests/formatting/res_parser/float_copying/index.html        5 Aug 2012 
14:34:14 -0000       1.3
@@ -72,11 +72,11 @@
 <p>Public domain is not really a licence, as it means than 
 the author abandon his copyright.
 </p>
-</div><p><strong>Copyright notice 1: </strong>The Public Domain notice<a 
name="DOCF1" href="float_copying_fot.html#FOOT1">(1)</a>
+<div class="float-caption"><p><strong>Copyright notice 1: </strong>The Public 
Domain notice<a name="DOCF1" href="float_copying_fot.html#FOOT1">(1)</a>
 </p>
 <a name="public-domain-anchor"></a><a name="index-copying-indexed-caption"></a>
 <a name="index-copying-indexed-caption-function"></a>
-
+</div></div>
 
 <table class="menu" border="0" cellspacing="0">
 <tr><td align="left" valign="top"><a 
href="Copying-and-floats.html#Copying-and-floats">Appendix A Copying and 
floats</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">

Index: tests/layout/tests-parser.txt
===================================================================
RCS file: /sources/texinfo/texinfo/tp/tests/layout/tests-parser.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tests/layout/tests-parser.txt       28 Jul 2012 23:47:38 -0000      1.2
+++ tests/layout/tests-parser.txt       5 Aug 2012 14:34:14 -0000       1.3
@@ -29,7 +29,7 @@
 #formatting_mediawiki ../coverage/formatting.texi --init mediawiki.pm
 formatting_html32 ../coverage/formatting.texi --init html32.pm
 formatting_regions formatting_regions.texi
-formatting_exotic ../coverage/formatting.texi --split section --no-header 
--no-number-sections --set-customization-variable 'TOC_LINKS 1' 
--set-customization-variable 'DEF_TABLE 1' --set-customization-variable 
'SHORT_REF 1' --footnote-style=end --css-ref 
http://www.environnement.ens.fr/perso/dumas/background-color.css 
--internal-links=/dev/null --set-customization-variable 
'USE_TITLEPAGE_FOR_TITLE 0'
+formatting_exotic ../coverage/formatting.texi --split section --no-header 
--no-number-sections --set-customization-variable 'TOC_LINKS 1' 
--set-customization-variable 'DEF_TABLE 1' --set-customization-variable 
'ALWAYS_NODE_ARG_IN_XREF 1' --footnote-style=end --css-ref 
http://www.environnement.ens.fr/perso/dumas/background-color.css 
--internal-links=/dev/null --set-customization-variable 
'USE_TITLEPAGE_FOR_TITLE 0'
 formatting_fr_icons ../coverage/formatting.texi --document-language fr --init 
icons.init
 formatting_singular ../coverage/formatting.texi --init-file t2h_singular.init 
--set-customization-variable 'L2H 1' --set-customization-variable 'SHORTEXTN 1' 
--set-customization-variable 'PREFIX sing' --set-customization-variable 
'TOP_FILE index.htm' --no-verbose
 #formatting_makeinfo ../coverage/formatting.texi --init makeinfo.pm --no-warn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]