texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Wed, 14 Feb 2024 16:53:44 -0500 (EST)

branch: master
commit 20c61c3157c1aa0a7fd87db28159fd18b29f9c7e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Feb 14 22:50:06 2024 +0100

    * tp/Texinfo/XS/main/manipulate_indices.c (get_sort_key)
    (setup_sortable_index_entries): do not uppercase sort strings in
    get_sort_key, as it is not right to do so for letters that are already
    uppercased.  Instead uppercase sort string in
    setup_sortable_index_entries before calling get_sort_key.
    
    * tp/t/09indices.t ($encoding_index_text): add @ordf{} and @ordm{},
    which are interesting to test as their uppercase representation is a
    lowercase letter.
    
    * tp/Texinfo/XS/main/manipulate_indices.c (print_bytes): add to help
    debugging.
    
    * tp/Texinfo/Indices.pm (sort_indices_by_letter): rename $entry_key as
    $sort_string.
---
 ChangeLog                                          |  18 +++
 tp/Texinfo/Indices.pm                              |   8 +-
 tp/Texinfo/XS/main/manipulate_indices.c            |  45 ++++--
 tp/t/09indices.t                                   |   2 +
 tp/t/results/indices/encoding_index_ascii.pl       | 152 +++++++++++++++++----
 .../encoding_index_ascii/res_html/chap.html        |  16 +++
 .../res_info/encoding_index_ascii.info             | Bin 4329 -> 4475 bytes
 .../res_plaintext/encoding_index_ascii.txt         |   2 +
 .../encoding_index_ascii_enable_encoding.pl        | 152 +++++++++++++++++----
 .../res_html/chap.html                             |  16 +++
 .../encoding_index_ascii_enable_encoding.info      | Bin 4377 -> 4523 bytes
 .../encoding_index_ascii_enable_encoding.txt       |   2 +
 12 files changed, 343 insertions(+), 70 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0e3783dc01..f8d2b54d55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,24 @@
        Document DOCUMENTLANGUAGE_COLLATION.
        (@documentlanguage): Reference DOCUMENTLANGUAGE_COLLATION.
 
+2024-02-14  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/manipulate_indices.c (get_sort_key)
+       (setup_sortable_index_entries): do not uppercase sort strings in
+       get_sort_key, as it is not right to do so for letters that are already
+       uppercased.  Instead uppercase sort string in
+       setup_sortable_index_entries before calling get_sort_key.
+
+       * tp/t/09indices.t ($encoding_index_text): add @ordf{} and @ordm{},
+       which are interesting to test as their uppercase representation is a
+       lowercase letter.
+
+       * tp/Texinfo/XS/main/manipulate_indices.c (print_bytes): add to help
+       debugging.
+
+       * tp/Texinfo/Indices.pm (sort_indices_by_letter): rename $entry_key as
+       $sort_string.
+
 2024-02-14  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/manipulate_indices.c (setup_collator): warn if
diff --git a/tp/Texinfo/Indices.pm b/tp/Texinfo/Indices.pm
index be8f1f0af7..1623237a8d 100644
--- a/tp/Texinfo/Indices.pm
+++ b/tp/Texinfo/Indices.pm
@@ -650,18 +650,18 @@ sub sort_indices_by_letter($$$;$$)
     my $sortable_index_entries = $index_sortable_index_entries->{$index_name};
     my $index_letter_hash = {};
     foreach my $sortable_entry (@{$sortable_index_entries}) {
-      my $entry_key
+      my $sort_string
         = $sortable_entry->{'entry_strings_alpha'}->[0]->{'sort_string'};
       # the following line leads to each accented letter being separate
-      # $letter = uc(substr($entry_key, 0, 1));
-      my $letter_string = uc(substr($entry_key, 0, 1));
+      # $letter = uc(substr($sort_string, 0, 1));
+      my $letter_string = uc(substr($sort_string, 0, 1));
       # determine main letter by decomposing and removing diacritics
       my $letter = Unicode::Normalize::NFKD($letter_string);
       $letter =~ s/\p{NonspacingMark}//g;
       # following code is less good, as the upper-casing may lead to
       # two letters in case of the german Eszett that becomes SS.  So
       # it is better to upper-case first and remove diacritics after.
-      #my $normalized_string = Unicode::Normalize::NFKD(uc($entry_key));
+      #my $normalized_string = Unicode::Normalize::NFKD(uc($sort_string));
       #$normalized_string =~ s/\p{NonspacingMark}//g;
       #$letter = substr($normalized_string, 0, 1);
 
diff --git a/tp/Texinfo/XS/main/manipulate_indices.c 
b/tp/Texinfo/XS/main/manipulate_indices.c
index c9ea4f2a7c..5799b98ef5 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.c
+++ b/tp/Texinfo/XS/main/manipulate_indices.c
@@ -18,6 +18,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <locale.h>
+#include <ctype.h>
 #include "uniconv.h"
 #include "unictype.h"
 #include "unistr.h"
@@ -287,15 +288,14 @@ static BYTES_STRING *
 get_sort_key (INDEX_COLLATOR *collator, const char *sort_string)
 {
   BYTES_STRING *sort_key;
-  char *uc_sort_string = to_upper_or_lower_multibyte (sort_string, 1);
   switch (collator->type)
     {
       case ctn_no_unicode:
         sort_key = (BYTES_STRING *) malloc (sizeof (BYTES_STRING));
-        sort_key->len = strlen (uc_sort_string);
+        sort_key->len = strlen (sort_string);
         sort_key->bytes = (unsigned char *)
            malloc (sizeof (unsigned char) * sort_key->len);
-        memcpy (sort_key->bytes, (unsigned char *) uc_sort_string,
+        memcpy (sort_key->bytes, (unsigned char *) sort_string,
                 sort_key->len);
         break;
       #ifdef HAVE_STRXFRM_L
@@ -304,9 +304,9 @@ get_sort_key (INDEX_COLLATOR *collator, const char 
*sort_string)
           size_t check_len;
           char *char_sort_key;
           sort_key = (BYTES_STRING *) malloc (sizeof (BYTES_STRING));
-          sort_key->len = strxfrm_l (0, uc_sort_string, 0, collator->locale);
+          sort_key->len = strxfrm_l (0, sort_string, 0, collator->locale);
           char_sort_key = (char *) malloc (sizeof (char) * sort_key->len);
-          check_len = strxfrm_l (char_sort_key, uc_sort_string, sort_key->len,
+          check_len = strxfrm_l (char_sort_key, sort_string, sort_key->len,
                                  collator->locale);
           sort_key->bytes = (unsigned char *)
                      malloc (sizeof (unsigned char) * sort_key->len);
@@ -322,10 +322,9 @@ get_sort_key (INDEX_COLLATOR *collator, const char 
*sort_string)
       case ctn_language_collation:
       default: /* !HAVE_STRXFRM_L && ctn_locale_collation */
         sort_key = call_collator_getSortKey (collator->sv,
-                                             uc_sort_string);
+                                             sort_string);
         break;
     }
-  free (uc_sort_string);
   return sort_key;
 }
 
@@ -677,6 +676,7 @@ setup_sortable_index_entries (INDEX_COLLATOR *collator,
 
               for (k = 0; k < index_entry_sort_string->subentries_number; k++)
                 {
+                  char *uc_sort_string;
                   SORTABLE_INDEX_SUBENTRY *sortable_subentry
                     = &sortable_entry->sortable_subentries[k];
                   INDEX_SUBENTRY_SORT_STRING *subenty_sort_string
@@ -685,8 +685,11 @@ setup_sortable_index_entries (INDEX_COLLATOR *collator,
                   sortable_subentry->sort_string
                     = strdup (subenty_sort_string->sort_string);
                   sortable_subentry->alpha = subenty_sort_string->alpha;
+                  uc_sort_string = to_upper_or_lower_multibyte
+                                         (subenty_sort_string->sort_string, 1);
                   sortable_subentry->sort_key = get_sort_key (collator,
-                                           subenty_sort_string->sort_string);
+                                                            uc_sort_string);
+                  free (uc_sort_string);
                 }
             }
         }
@@ -718,6 +721,32 @@ setup_sort_sortable_strings_collator (DOCUMENT *document,
   return index_sortable_index_entries;
 }
 
+
+/* for debugging purposes, printable representation of sort keys bytes */
+/*
+static
+*/
+char *
+print_bytes (BYTES_STRING *bytes)
+{
+  size_t i;
+  TEXT text;
+  text_init (&text);
+  text_append (&text, "");
+
+  char *p = (char *)bytes->bytes;
+  for (i = 0; i < bytes->len; i++)
+    {
+      char c = *p;
+      if (((c & ~0x7f) == 0) && c != '\\' && isprint (c))
+        text_append_n (&text, p, 1);
+      else
+        text_printf (&text, "\\%02X", c);
+      p++;
+    }
+  return text.text;
+}
+
 typedef struct LETTER_SORTABLE_ENTRIES {
     char *letter;
     BYTES_STRING *letter_sort_key;
diff --git a/tp/t/09indices.t b/tp/t/09indices.t
index b13e8671d3..f98652cdeb 100644
--- a/tp/t/09indices.t
+++ b/tp/t/09indices.t
@@ -1026,6 +1026,8 @@ my $encoding_index_text = '
 @cindex @exclamdown{}
 @cindex @TH{}
 @cindex @DH{}
+@cindex @ordf{}
+@cindex @ordm{}
 @cindex @textdegree{}
 @cindex 0
 @cindex 9
diff --git a/tp/t/results/indices/encoding_index_ascii.pl 
b/tp/t/results/indices/encoding_index_ascii.pl
index b976429ed4..c47aea95e6 100644
--- a/tp/t/results/indices/encoding_index_ascii.pl
+++ b/tp/t/results/indices/encoding_index_ascii.pl
@@ -2003,7 +2003,7 @@ $result_trees{'encoding_index_ascii'} = {
                       'type' => 'brace_command_arg'
                     }
                   ],
-                  'cmdname' => 'textdegree',
+                  'cmdname' => 'ordf',
                   'source_info' => {
                     'line_nr' => 50
                   }
@@ -2042,7 +2042,15 @@ $result_trees{'encoding_index_ascii'} = {
             {
               'contents' => [
                 {
-                  'text' => '0'
+                  'args' => [
+                    {
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'ordm',
+                  'source_info' => {
+                    'line_nr' => 51
+                  }
                 }
               ],
               'info' => {
@@ -2078,7 +2086,15 @@ $result_trees{'encoding_index_ascii'} = {
             {
               'contents' => [
                 {
-                  'text' => '9'
+                  'args' => [
+                    {
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'textdegree',
+                  'source_info' => {
+                    'line_nr' => 52
+                  }
                 }
               ],
               'info' => {
@@ -2109,6 +2125,78 @@ $result_trees{'encoding_index_ascii'} = {
           },
           'type' => 'index_entry_command'
         },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '0'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'element_node' => {},
+            'index_entry' => [
+              'cp',
+              45
+            ]
+          },
+          'info' => {
+            'command_name' => 'cindex',
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 53
+          },
+          'type' => 'index_entry_command'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '9'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'element_node' => {},
+            'index_entry' => [
+              'cp',
+              46
+            ]
+          },
+          'info' => {
+            'command_name' => 'cindex',
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 54
+          },
+          'type' => 'index_entry_command'
+        },
         {
           'args' => [
             {
@@ -2121,7 +2209,7 @@ $result_trees{'encoding_index_ascii'} = {
                   ],
                   'cmdname' => 'quotedblleft',
                   'source_info' => {
-                    'line_nr' => 53
+                    'line_nr' => 55
                   }
                 }
               ],
@@ -2139,7 +2227,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              45
+              47
             ]
           },
           'info' => {
@@ -2149,7 +2237,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 53
+            'line_nr' => 55
           },
           'type' => 'index_entry_command'
         },
@@ -2165,7 +2253,7 @@ $result_trees{'encoding_index_ascii'} = {
                   ],
                   'cmdname' => 'geq',
                   'source_info' => {
-                    'line_nr' => 54
+                    'line_nr' => 56
                   }
                 }
               ],
@@ -2183,7 +2271,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              46
+              48
             ]
           },
           'info' => {
@@ -2193,7 +2281,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 54
+            'line_nr' => 56
           },
           'type' => 'index_entry_command'
         },
@@ -2209,7 +2297,7 @@ $result_trees{'encoding_index_ascii'} = {
                   ],
                   'cmdname' => 'comma',
                   'source_info' => {
-                    'line_nr' => 55
+                    'line_nr' => 57
                   }
                 }
               ],
@@ -2227,7 +2315,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              47
+              49
             ]
           },
           'info' => {
@@ -2237,7 +2325,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 55
+            'line_nr' => 57
           },
           'type' => 'index_entry_command'
         },
@@ -2263,7 +2351,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              48
+              50
             ]
           },
           'info' => {
@@ -2273,7 +2361,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 56
+            'line_nr' => 58
           },
           'type' => 'index_entry_command'
         },
@@ -2299,7 +2387,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              49
+              51
             ]
           },
           'info' => {
@@ -2309,7 +2397,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 57
+            'line_nr' => 59
           },
           'type' => 'index_entry_command'
         },
@@ -2335,7 +2423,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              50
+              52
             ]
           },
           'info' => {
@@ -2345,7 +2433,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 58
+            'line_nr' => 60
           },
           'type' => 'index_entry_command'
         },
@@ -2371,7 +2459,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              51
+              53
             ]
           },
           'info' => {
@@ -2381,7 +2469,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 59
+            'line_nr' => 61
           },
           'type' => 'index_entry_command'
         },
@@ -2407,7 +2495,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              52
+              54
             ]
           },
           'info' => {
@@ -2417,7 +2505,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 60
+            'line_nr' => 62
           },
           'type' => 'index_entry_command'
         },
@@ -2443,7 +2531,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              53
+              55
             ]
           },
           'info' => {
@@ -2453,7 +2541,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 61
+            'line_nr' => 63
           },
           'type' => 'index_entry_command'
         },
@@ -2479,7 +2567,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              54
+              56
             ]
           },
           'info' => {
@@ -2489,7 +2577,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 62
+            'line_nr' => 64
           },
           'type' => 'index_entry_command'
         },
@@ -2515,7 +2603,7 @@ $result_trees{'encoding_index_ascii'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              55
+              57
             ]
           },
           'info' => {
@@ -2525,7 +2613,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 63
+            'line_nr' => 65
           },
           'type' => 'index_entry_command'
         },
@@ -2563,7 +2651,7 @@ $result_trees{'encoding_index_ascii'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 65
+            'line_nr' => 67
           }
         }
       ],
@@ -2639,6 +2727,8 @@ 
$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[52]{'extra'}{'e
 
$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[53]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii'}{'contents'}[3];
 
$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[54]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii'}{'contents'}[3];
 
$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[55]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii'}{'contents'}[3];
+$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[56]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii'}{'contents'}[3];
+$result_trees{'encoding_index_ascii'}{'contents'}[3]{'contents'}[57]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii'}{'contents'}[3];
 
 $result_texis{'encoding_index_ascii'} = '
 @setfilename encoding_index_ascii.info
@@ -2689,6 +2779,8 @@ $result_texis{'encoding_index_ascii'} = '
 @cindex @exclamdown{}
 @cindex @TH{}
 @cindex @DH{}
+@cindex @ordf{}
+@cindex @ordm{}
 @cindex @textdegree{}
 @cindex 0
 @cindex 9
@@ -2804,6 +2896,7 @@ $result_indices_sort_strings{'encoding_index_ascii'} = {
     '9',
     'a',
     'A',
+    "\x{aa}",
     "\x{c6}",
     'b',
     'B',
@@ -2828,6 +2921,7 @@ $result_indices_sort_strings{'encoding_index_ascii'} = {
     'm',
     'n',
     'o',
+    "\x{ba}",
     'p',
     'q',
     'r',
diff --git a/tp/t/results/indices/encoding_index_ascii/res_html/chap.html 
b/tp/t/results/indices/encoding_index_ascii/res_html/chap.html
index 0d9d70a4b5..607c0f5415 100644
--- a/tp/t/results/indices/encoding_index_ascii/res_html/chap.html
+++ b/tp/t/results/indices/encoding_index_ascii/res_html/chap.html
@@ -78,6 +78,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="index-entry-id" id="index-_00a1"></a>
 <a class="index-entry-id" id="index-TH"></a>
 <a class="index-entry-id" id="index-D"></a>
+<a class="index-entry-id" id="index-a-1"></a>
+<a class="index-entry-id" id="index-o-1"></a>
 <a class="index-entry-id" id="index-_00b0"></a>
 <a class="index-entry-id" id="index-0"></a>
 <a class="index-entry-id" id="index-9"></a>
@@ -121,6 +123,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="summary-letter-printindex" href="#chap_cp_symbol-13"><b>9</b></a>
  &nbsp; 
 <br>
+<a class="summary-letter-printindex" href="#chap_cp_letter-a"><b>&ordf;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-A"><b>A</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" 
href="#chap_cp_letter-AE-1"><b>&AElig;</b></a>
@@ -155,6 +159,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-N"><b>N</b></a>
  &nbsp; 
+<a class="summary-letter-printindex" href="#chap_cp_letter-o"><b>&ordm;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-O"><b>O</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-P"><b>P</b></a>
@@ -229,6 +235,9 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <tr><th id="chap_cp_symbol-13">9</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-9">9</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
+<tr><th id="chap_cp_letter-a">&ordf;</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a 
href="#index-a-1">&ordf;</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
 <tr><th id="chap_cp_letter-A">A</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-a">a</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-A">A</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
@@ -288,6 +297,9 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <tr><th id="chap_cp_letter-N">N</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-n">n</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
+<tr><th id="chap_cp_letter-o">&ordm;</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a 
href="#index-o-1">&ordm;</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
 <tr><th id="chap_cp_letter-O">O</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-o">o</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
@@ -358,6 +370,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="summary-letter-printindex" href="#chap_cp_symbol-13"><b>9</b></a>
  &nbsp; 
 <br>
+<a class="summary-letter-printindex" href="#chap_cp_letter-a"><b>&ordf;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-A"><b>A</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" 
href="#chap_cp_letter-AE-1"><b>&AElig;</b></a>
@@ -392,6 +406,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-N"><b>N</b></a>
  &nbsp; 
+<a class="summary-letter-printindex" href="#chap_cp_letter-o"><b>&ordm;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-O"><b>O</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-P"><b>P</b></a>
diff --git 
a/tp/t/results/indices/encoding_index_ascii/res_info/encoding_index_ascii.info 
b/tp/t/results/indices/encoding_index_ascii/res_info/encoding_index_ascii.info
index b23c2fba18..4cd7906678 100644
Binary files 
a/tp/t/results/indices/encoding_index_ascii/res_info/encoding_index_ascii.info 
and 
b/tp/t/results/indices/encoding_index_ascii/res_info/encoding_index_ascii.info 
differ
diff --git 
a/tp/t/results/indices/encoding_index_ascii/res_plaintext/encoding_index_ascii.txt
 
b/tp/t/results/indices/encoding_index_ascii/res_plaintext/encoding_index_ascii.txt
index 922a8aa0a0..3368d39852 100644
--- 
a/tp/t/results/indices/encoding_index_ascii/res_plaintext/encoding_index_ascii.txt
+++ 
b/tp/t/results/indices/encoding_index_ascii/res_plaintext/encoding_index_ascii.txt
@@ -21,6 +21,7 @@ top
 * 9:                                     chap.                  (line 3)
 * a:                                     chap.                  (line 3)
 * A:                                     chap.                  (line 3)
+* a <1>:                                 chap.                  (line 3)
 * AE:                                    chap.                  (line 3)
 * b:                                     chap.                  (line 3)
 * B:                                     chap.                  (line 3)
@@ -45,6 +46,7 @@ top
 * m:                                     chap.                  (line 3)
 * n:                                     chap.                  (line 3)
 * o <1>:                                 chap.                  (line 3)
+* o <2>:                                 chap.                  (line 3)
 * p:                                     chap.                  (line 3)
 * q:                                     chap.                  (line 3)
 * r:                                     chap.                  (line 3)
diff --git a/tp/t/results/indices/encoding_index_ascii_enable_encoding.pl 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding.pl
index 0073affb91..06310ff354 100644
--- a/tp/t/results/indices/encoding_index_ascii_enable_encoding.pl
+++ b/tp/t/results/indices/encoding_index_ascii_enable_encoding.pl
@@ -2003,7 +2003,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
                       'type' => 'brace_command_arg'
                     }
                   ],
-                  'cmdname' => 'textdegree',
+                  'cmdname' => 'ordf',
                   'source_info' => {
                     'line_nr' => 50
                   }
@@ -2042,7 +2042,15 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             {
               'contents' => [
                 {
-                  'text' => '0'
+                  'args' => [
+                    {
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'ordm',
+                  'source_info' => {
+                    'line_nr' => 51
+                  }
                 }
               ],
               'info' => {
@@ -2078,7 +2086,15 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             {
               'contents' => [
                 {
-                  'text' => '9'
+                  'args' => [
+                    {
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'textdegree',
+                  'source_info' => {
+                    'line_nr' => 52
+                  }
                 }
               ],
               'info' => {
@@ -2109,6 +2125,78 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
           },
           'type' => 'index_entry_command'
         },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '0'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'element_node' => {},
+            'index_entry' => [
+              'cp',
+              45
+            ]
+          },
+          'info' => {
+            'command_name' => 'cindex',
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 53
+          },
+          'type' => 'index_entry_command'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => '9'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'element_node' => {},
+            'index_entry' => [
+              'cp',
+              46
+            ]
+          },
+          'info' => {
+            'command_name' => 'cindex',
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 54
+          },
+          'type' => 'index_entry_command'
+        },
         {
           'args' => [
             {
@@ -2121,7 +2209,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
                   ],
                   'cmdname' => 'quotedblleft',
                   'source_info' => {
-                    'line_nr' => 53
+                    'line_nr' => 55
                   }
                 }
               ],
@@ -2139,7 +2227,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              45
+              47
             ]
           },
           'info' => {
@@ -2149,7 +2237,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 53
+            'line_nr' => 55
           },
           'type' => 'index_entry_command'
         },
@@ -2165,7 +2253,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
                   ],
                   'cmdname' => 'geq',
                   'source_info' => {
-                    'line_nr' => 54
+                    'line_nr' => 56
                   }
                 }
               ],
@@ -2183,7 +2271,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              46
+              48
             ]
           },
           'info' => {
@@ -2193,7 +2281,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 54
+            'line_nr' => 56
           },
           'type' => 'index_entry_command'
         },
@@ -2209,7 +2297,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
                   ],
                   'cmdname' => 'comma',
                   'source_info' => {
-                    'line_nr' => 55
+                    'line_nr' => 57
                   }
                 }
               ],
@@ -2227,7 +2315,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              47
+              49
             ]
           },
           'info' => {
@@ -2237,7 +2325,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 55
+            'line_nr' => 57
           },
           'type' => 'index_entry_command'
         },
@@ -2263,7 +2351,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              48
+              50
             ]
           },
           'info' => {
@@ -2273,7 +2361,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 56
+            'line_nr' => 58
           },
           'type' => 'index_entry_command'
         },
@@ -2299,7 +2387,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              49
+              51
             ]
           },
           'info' => {
@@ -2309,7 +2397,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 57
+            'line_nr' => 59
           },
           'type' => 'index_entry_command'
         },
@@ -2335,7 +2423,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              50
+              52
             ]
           },
           'info' => {
@@ -2345,7 +2433,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 58
+            'line_nr' => 60
           },
           'type' => 'index_entry_command'
         },
@@ -2371,7 +2459,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              51
+              53
             ]
           },
           'info' => {
@@ -2381,7 +2469,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 59
+            'line_nr' => 61
           },
           'type' => 'index_entry_command'
         },
@@ -2407,7 +2495,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              52
+              54
             ]
           },
           'info' => {
@@ -2417,7 +2505,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 60
+            'line_nr' => 62
           },
           'type' => 'index_entry_command'
         },
@@ -2443,7 +2531,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              53
+              55
             ]
           },
           'info' => {
@@ -2453,7 +2541,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 61
+            'line_nr' => 63
           },
           'type' => 'index_entry_command'
         },
@@ -2479,7 +2567,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              54
+              56
             ]
           },
           'info' => {
@@ -2489,7 +2577,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 62
+            'line_nr' => 64
           },
           'type' => 'index_entry_command'
         },
@@ -2515,7 +2603,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             'element_node' => {},
             'index_entry' => [
               'cp',
-              55
+              57
             ]
           },
           'info' => {
@@ -2525,7 +2613,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 63
+            'line_nr' => 65
           },
           'type' => 'index_entry_command'
         },
@@ -2563,7 +2651,7 @@ $result_trees{'encoding_index_ascii_enable_encoding'} = {
             }
           },
           'source_info' => {
-            'line_nr' => 65
+            'line_nr' => 67
           }
         }
       ],
@@ -2639,6 +2727,8 @@ 
$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}
 
$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}[53]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3];
 
$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}[54]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3];
 
$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}[55]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3];
+$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}[56]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3];
+$result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3]{'contents'}[57]{'extra'}{'element_node'}
 = $result_trees{'encoding_index_ascii_enable_encoding'}{'contents'}[3];
 
 $result_texis{'encoding_index_ascii_enable_encoding'} = '
 @setfilename encoding_index_ascii_enable_encoding.info
@@ -2689,6 +2779,8 @@ $result_texis{'encoding_index_ascii_enable_encoding'} = '
 @cindex @exclamdown{}
 @cindex @TH{}
 @cindex @DH{}
+@cindex @ordf{}
+@cindex @ordm{}
 @cindex @textdegree{}
 @cindex 0
 @cindex 9
@@ -2804,6 +2896,7 @@ 
$result_indices_sort_strings{'encoding_index_ascii_enable_encoding'} = {
     '9',
     'a',
     'A',
+    "\x{aa}",
     "\x{c6}",
     'b',
     'B',
@@ -2828,6 +2921,7 @@ 
$result_indices_sort_strings{'encoding_index_ascii_enable_encoding'} = {
     'm',
     'n',
     'o',
+    "\x{ba}",
     'p',
     'q',
     'r',
diff --git 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_html/chap.html 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_html/chap.html
index 0d9d70a4b5..607c0f5415 100644
--- 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_html/chap.html
+++ 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_html/chap.html
@@ -78,6 +78,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="index-entry-id" id="index-_00a1"></a>
 <a class="index-entry-id" id="index-TH"></a>
 <a class="index-entry-id" id="index-D"></a>
+<a class="index-entry-id" id="index-a-1"></a>
+<a class="index-entry-id" id="index-o-1"></a>
 <a class="index-entry-id" id="index-_00b0"></a>
 <a class="index-entry-id" id="index-0"></a>
 <a class="index-entry-id" id="index-9"></a>
@@ -121,6 +123,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="summary-letter-printindex" href="#chap_cp_symbol-13"><b>9</b></a>
  &nbsp; 
 <br>
+<a class="summary-letter-printindex" href="#chap_cp_letter-a"><b>&ordf;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-A"><b>A</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" 
href="#chap_cp_letter-AE-1"><b>&AElig;</b></a>
@@ -155,6 +159,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-N"><b>N</b></a>
  &nbsp; 
+<a class="summary-letter-printindex" href="#chap_cp_letter-o"><b>&ordm;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-O"><b>O</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-P"><b>P</b></a>
@@ -229,6 +235,9 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <tr><th id="chap_cp_symbol-13">9</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-9">9</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
+<tr><th id="chap_cp_letter-a">&ordf;</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a 
href="#index-a-1">&ordf;</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
 <tr><th id="chap_cp_letter-A">A</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-a">a</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-A">A</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
@@ -288,6 +297,9 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <tr><th id="chap_cp_letter-N">N</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-n">n</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
+<tr><th id="chap_cp_letter-o">&ordm;</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a 
href="#index-o-1">&ordm;</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
 <tr><th id="chap_cp_letter-O">O</th></tr>
 <tr><td></td><td class="printindex-index-entry"><a 
href="#index-o">o</a></td><td class="printindex-index-section"><a 
href="#chap">chap</a></td></tr>
 <tr><td colspan="3"><hr></td></tr>
@@ -358,6 +370,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
 <a class="summary-letter-printindex" href="#chap_cp_symbol-13"><b>9</b></a>
  &nbsp; 
 <br>
+<a class="summary-letter-printindex" href="#chap_cp_letter-a"><b>&ordf;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-A"><b>A</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" 
href="#chap_cp_letter-AE-1"><b>&AElig;</b></a>
@@ -392,6 +406,8 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a> &nbsp; [<a href=
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-N"><b>N</b></a>
  &nbsp; 
+<a class="summary-letter-printindex" href="#chap_cp_letter-o"><b>&ordm;</b></a>
+ &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-O"><b>O</b></a>
  &nbsp; 
 <a class="summary-letter-printindex" href="#chap_cp_letter-P"><b>P</b></a>
diff --git 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_info/encoding_index_ascii_enable_encoding.info
 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_info/encoding_index_ascii_enable_encoding.info
index c2d0ec6f93..6812493088 100644
Binary files 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_info/encoding_index_ascii_enable_encoding.info
 and 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_info/encoding_index_ascii_enable_encoding.info
 differ
diff --git 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_plaintext/encoding_index_ascii_enable_encoding.txt
 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_plaintext/encoding_index_ascii_enable_encoding.txt
index 922a8aa0a0..3368d39852 100644
--- 
a/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_plaintext/encoding_index_ascii_enable_encoding.txt
+++ 
b/tp/t/results/indices/encoding_index_ascii_enable_encoding/res_plaintext/encoding_index_ascii_enable_encoding.txt
@@ -21,6 +21,7 @@ top
 * 9:                                     chap.                  (line 3)
 * a:                                     chap.                  (line 3)
 * A:                                     chap.                  (line 3)
+* a <1>:                                 chap.                  (line 3)
 * AE:                                    chap.                  (line 3)
 * b:                                     chap.                  (line 3)
 * B:                                     chap.                  (line 3)
@@ -45,6 +46,7 @@ top
 * m:                                     chap.                  (line 3)
 * n:                                     chap.                  (line 3)
 * o <1>:                                 chap.                  (line 3)
+* o <2>:                                 chap.                  (line 3)
 * p:                                     chap.                  (line 3)
 * q:                                     chap.                  (line 3)
 * r:                                     chap.                  (line 3)



reply via email to

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