texlive[55316] Build/source/utils/xindy: support :attr on separator

commits+karl at tug.org commits+karl at tug.org
Thu May 28 20:10:09 CEST 2020


Revision: 55316
          http://tug.org/svn/texlive?view=revision&revision=55316
Author:   karl
Date:     2020-05-28 20:10:09 +0200 (Thu, 28 May 2020)
Log Message:
-----------
support :attr on separator markup, from J\"urgen S

Modified Paths:
--------------
    trunk/Build/source/utils/xindy/ChangeLog
    trunk/Build/source/utils/xindy/TLpatches/ChangeLog
    trunk/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range
    trunk/Build/source/utils/xindy/xindy-src/doc/manual-3.html
    trunk/Build/source/utils/xindy/xindy-src/src/markup.lsp

Added Paths:
-----------
    trunk/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr

Modified: trunk/Build/source/utils/xindy/ChangeLog
===================================================================
--- trunk/Build/source/utils/xindy/ChangeLog	2020-05-28 17:59:35 UTC (rev 55315)
+++ trunk/Build/source/utils/xindy/ChangeLog	2020-05-28 18:10:09 UTC (rev 55316)
@@ -1,13 +1,19 @@
 2020-05-28  J\"urgen Spitzm\"uller  <spitz at lyx.org>
 
-	These patches from
+	These patches from:
 	https://tug.org/pipermail/tex-live/2020-May/045760.html
 
+	* xindy-src/src/markup.lsp: support giving attributes to the
+	markup of separator with :attr.
+	* doc/manual-3.html: document this.
+	https://sourceforge.net/p/xindy/bugs/1/
+	
 	* xindy-src/modules/base/makeindex.xdy
 	(define-crossref-class, markup-crossref-list): handle
 	\see and \seealso added by hyperref.
 	* xindy-src/user-commands/texindy.in,
 	* xindy-src/user-commands/xindy.in: corresponding doc updates.
+	https://sourceforge.net/p/xindy/bugs/62/
 
 	* xindy-src/doc/faq-4.html,
 	* xindy-src/doc/manual-3.html: document workaround for

Modified: trunk/Build/source/utils/xindy/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/utils/xindy/TLpatches/ChangeLog	2020-05-28 17:59:35 UTC (rev 55315)
+++ trunk/Build/source/utils/xindy/TLpatches/ChangeLog	2020-05-28 18:10:09 UTC (rev 55316)
@@ -1,5 +1,6 @@
 2020-05-28  Karl Berry  <karl at tug.org>
 
+	* patch-06-markup-range-attr,
 	* patch-08-hyperref-seealso,
 	* patch-10-doc-min-range: new patches from J\"urgen S.
 	https://tug.org/pipermail/tex-live/2020-May/045760.html

Added: trunk/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr
===================================================================
--- trunk/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr	                        (rev 0)
+++ trunk/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr	2020-05-28 18:10:09 UTC (rev 55316)
@@ -0,0 +1,137 @@
+	https://sourceforge.net/p/xindy/bugs/1/
+	https://tug.org/pipermail/tex-live/2020-May/045760.html
+
+Index: xindy-src/doc/manual-3.html
+===================================================================
+--- xindy-src/doc/manual-3.html	(revision 55314)
++++ xindy-src/doc/manual-3.html	(working copy)
+@@ -927,6 +927,7 @@ location references in a hierarchical form. With t
+ <PRE>
+ (markup-range [:open string] [:close string] [:sep string]
+               [:class locref-class]
++              [:attr attribute]
+               [:length num] [:ignore-end])
+ </PRE>
+ </CODE></BLOCKQUOTE>
+@@ -933,11 +934,9 @@ location references in a hierarchical form. With t
+ <P>A range consists of two location references. Markup can be specified
+ with the <CODE>:open</CODE> and <CODE>:close</CODE> arguments and one separator given
+ by the argument <CODE>:sep</CODE>.
+-<P>Since both location references are tagged with markup defined by the
+-command <CODE>markup-locref</CODE> a specialization on attributes or depth is
+-not necessary. Specialization is allowed on the class they belong to,
+-because the separator between two location refences may be different
+-for each location class. Argument <CODE>:length</CODE> can be used to define
++<P>The markup of the separator can be specified attributes via
++the<CODE>:attr</CODE> tag.
++<P>Argument <CODE>:length</CODE> can be used to define
+ different markup for different lengths. In conjunction with
+ <CODE>:length</CODE> is may be useful not to print the second location
+ reference at all. For example, one wishes to markup ranges of length 1
+Index: xindy-src/src/markup.lsp
+===================================================================
+--- xindy-src/src/markup.lsp	(revision 55307)
++++ xindy-src/src/markup.lsp	(working copy)
+@@ -409,7 +409,7 @@ T
+     (do-markup-list (get-members attribute-group)
+       :identifier LOCREF
+       :open-body  (do-markup-locref-list-open  loccls 0)
+-      :elt-body   (do-markup-locref     LOCREF loccls 0)
++      :elt-body   (do-markup-locref (get-catattr LOCREF) LOCREF loccls 0)
+       :sep-body   (do-markup-locref-list-sep   loccls 0)
+       :close-body (do-markup-locref-list-close loccls 0))
+ 
+@@ -429,7 +429,8 @@ T
+           (do-markup-default "LOCREF-LIST:CLOSE" (get-name loccls) depth))
+   :sep   ((do-markup-default "LOCREF-LIST:SEP"   (get-name loccls) depth)))
+ ;; line 808 "markup.nw"
+-(defmethod do-markup-locref ((locref location-reference)
++(defmethod do-markup-locref ((attr   category-attribute)
++                             (locref location-reference)
+                              (loccls layered-location-class)
+                              (depth  number))
+   #+ASSERT! (assert! (and (typep locref 'layered-location-reference)
+@@ -455,7 +456,7 @@ T
+          (do-markup-list subrefs
+            :identifier LOCREF
+            :open-body  (do-markup-locref-list-open  loccls new-depth)
+-           :elt-body   (do-markup-locref     LOCREF loccls new-depth)
++           :elt-body   (do-markup-locref attr LOCREF loccls new-depth)
+            :sep-body   (do-markup-locref-list-sep   loccls new-depth)
+            :close-body (do-markup-locref-list-close loccls new-depth)))
+ 
+@@ -506,23 +507,24 @@ T
+           (do-markup-default "LOCREF:CLOSE"
+             (get-name attr) (get-name loccls) depth)))
+ ;; line 955 "markup.nw"
+-(defmethod do-markup-locref ((range location-range)
++(defmethod do-markup-locref ((attr  category-attribute)
++                             (range location-range)
+                              (loccls layered-location-class)
+                              (depth number))
+   (let ((length (get-length range)))
+-    (do-markup-range-open  loccls length)
+-    (do-markup-locref (get-first range) loccls depth)
+-    (do-markup-range-sep   loccls length)
++    (do-markup-range-open attr loccls length)
++    (do-markup-locref attr (get-first range) loccls depth)
++    (do-markup-range-sep attr loccls length)
+     (when (markup-range-print-end-p loccls length)
+-      (do-markup-locref (get-last range)  loccls depth))
+-    (do-markup-range-close loccls length)))
++      (do-markup-locref attr (get-last range)  loccls depth))
++    (do-markup-range-close attr loccls length)))
+ 
+ (define-list-environment-methods do-markup-range
+-    ((loccls layered-location-class) (length number))
+-  :open  ((do-markup-default "RANGE:OPEN"  (get-name loccls) length)
++    ((attr category-attribute) (loccls layered-location-class) (length number))
++  :open  ((do-markup-default "RANGE:OPEN" (get-name attr) (get-name loccls) length)
+           (do-markup-indent))
+   :close ((do-markup-outdent)
+-          (do-markup-default "RANGE:CLOSE" (get-name loccls) length))
++          (do-markup-default "RANGE:CLOSE" (get-name attr) (get-name loccls) length))
+   :sep   ((do-markup-default "RANGE:SEP" (get-name loccls) length)))
+ 
+ (defmethod markup-range-print-end-p ((loccls layered-location-class)
+@@ -947,7 +949,7 @@ T
+ ;; line 1002 "markup.nw"
+ (defmacro markup-range (&whole whole &rest args)
+   (destructuring-switch-bind (&key
+-                              open close sep class length
++                              open close sep class attr length
+                               &switch ignore-end)
+       args
+     (cond
+@@ -965,6 +967,10 @@ T
+ ((and class (progn (setq class (stringify class))
+                    (not (lookup-locref-class *indexstyle* class))))
+  (nraw "parameter `~S' is not a location-reference class! (ignored)~%" class))
++;; line 294 "markup.nw"
++((and attr (progn (setq attr (stringify attr))
++                   (not (lookup-catattr *indexstyle* attr))))
++ (nraw "parameter `~S' is not an attribute! (ignored)~%" attr))
+ ;; line 1009 "markup.nw"
+           ((and length (not (numberp length)))
+              (nraw "parameter `~S' is not a number! (ignored)~%" length))
+@@ -971,7 +977,10 @@ T
+           (t `(let ()
+                (markup::define-list-environment-methods
+                    DO-MARKUP-RANGE
+-                   (,(if class
++                   (,(if attr
++                         `(attr (EQL ',(lookup-catattr *indexstyle* attr)))
++                         '(attr category-attribute))
++                   ,(if class
+                          `(locrefcls (EQL ',(cdr (lookup-locref-class
+                                                   *indexstyle* class))))
+                          '(locrefcls layered-location-class))
+@@ -989,7 +998,7 @@ T
+                     ,(if length
+                          `(length (EQL ,length))
+                          '(length number)))
+-                 :declare ((declare (ignore locrefcls length)))
++                 :declare ((declare (ignore attr locrefcls length)))
+                  :body    (,(not ignore-end))))))))
+ ;; line 1064 "markup.nw"
+ (defmacro markup-crossref-list (&key open sep close class)

Modified: trunk/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range
===================================================================
--- trunk/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range	2020-05-28 17:59:35 UTC (rev 55315)
+++ trunk/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range	2020-05-28 18:10:09 UTC (rev 55316)
@@ -1,3 +1,4 @@
+	https://github.com/jschrod/xindy.ctan/issues/3
 	https://tug.org/pipermail/tex-live/2020-May/045760.html
 
 Index: xindy-src/doc/manual-3.html

Modified: trunk/Build/source/utils/xindy/xindy-src/doc/manual-3.html
===================================================================
--- trunk/Build/source/utils/xindy/xindy-src/doc/manual-3.html	2020-05-28 17:59:35 UTC (rev 55315)
+++ trunk/Build/source/utils/xindy/xindy-src/doc/manual-3.html	2020-05-28 18:10:09 UTC (rev 55316)
@@ -927,6 +927,7 @@
 <PRE>
 (markup-range [:open string] [:close string] [:sep string]
               [:class locref-class]
+              [:attr attribute]
               [:length num] [:ignore-end])
 </PRE>
 </CODE></BLOCKQUOTE>
@@ -933,11 +934,9 @@
 <P>A range consists of two location references. Markup can be specified
 with the <CODE>:open</CODE> and <CODE>:close</CODE> arguments and one separator given
 by the argument <CODE>:sep</CODE>.
-<P>Since both location references are tagged with markup defined by the
-command <CODE>markup-locref</CODE> a specialization on attributes or depth is
-not necessary. Specialization is allowed on the class they belong to,
-because the separator between two location refences may be different
-for each location class. Argument <CODE>:length</CODE> can be used to define
+<P>The markup of the separator can be specified attributes via
+the<CODE>:attr</CODE> tag.
+<P>Argument <CODE>:length</CODE> can be used to define
 different markup for different lengths. In conjunction with
 <CODE>:length</CODE> is may be useful not to print the second location
 reference at all. For example, one wishes to markup ranges of length 1

Modified: trunk/Build/source/utils/xindy/xindy-src/src/markup.lsp
===================================================================
--- trunk/Build/source/utils/xindy/xindy-src/src/markup.lsp	2020-05-28 17:59:35 UTC (rev 55315)
+++ trunk/Build/source/utils/xindy/xindy-src/src/markup.lsp	2020-05-28 18:10:09 UTC (rev 55316)
@@ -409,7 +409,7 @@
     (do-markup-list (get-members attribute-group)
       :identifier LOCREF
       :open-body  (do-markup-locref-list-open  loccls 0)
-      :elt-body   (do-markup-locref     LOCREF loccls 0)
+      :elt-body   (do-markup-locref (get-catattr LOCREF) LOCREF loccls 0)
       :sep-body   (do-markup-locref-list-sep   loccls 0)
       :close-body (do-markup-locref-list-close loccls 0))
 
@@ -429,7 +429,8 @@
           (do-markup-default "LOCREF-LIST:CLOSE" (get-name loccls) depth))
   :sep   ((do-markup-default "LOCREF-LIST:SEP"   (get-name loccls) depth)))
 ;; line 808 "markup.nw"
-(defmethod do-markup-locref ((locref location-reference)
+(defmethod do-markup-locref ((attr   category-attribute)
+                             (locref location-reference)
                              (loccls layered-location-class)
                              (depth  number))
   #+ASSERT! (assert! (and (typep locref 'layered-location-reference)
@@ -455,7 +456,7 @@
          (do-markup-list subrefs
            :identifier LOCREF
            :open-body  (do-markup-locref-list-open  loccls new-depth)
-           :elt-body   (do-markup-locref     LOCREF loccls new-depth)
+           :elt-body   (do-markup-locref attr LOCREF loccls new-depth)
            :sep-body   (do-markup-locref-list-sep   loccls new-depth)
            :close-body (do-markup-locref-list-close loccls new-depth)))
 
@@ -506,23 +507,24 @@
           (do-markup-default "LOCREF:CLOSE"
             (get-name attr) (get-name loccls) depth)))
 ;; line 955 "markup.nw"
-(defmethod do-markup-locref ((range location-range)
+(defmethod do-markup-locref ((attr  category-attribute)
+                             (range location-range)
                              (loccls layered-location-class)
                              (depth number))
   (let ((length (get-length range)))
-    (do-markup-range-open  loccls length)
-    (do-markup-locref (get-first range) loccls depth)
-    (do-markup-range-sep   loccls length)
+    (do-markup-range-open attr loccls length)
+    (do-markup-locref attr (get-first range) loccls depth)
+    (do-markup-range-sep attr loccls length)
     (when (markup-range-print-end-p loccls length)
-      (do-markup-locref (get-last range)  loccls depth))
-    (do-markup-range-close loccls length)))
+      (do-markup-locref attr (get-last range)  loccls depth))
+    (do-markup-range-close attr loccls length)))
 
 (define-list-environment-methods do-markup-range
-    ((loccls layered-location-class) (length number))
-  :open  ((do-markup-default "RANGE:OPEN"  (get-name loccls) length)
+    ((attr category-attribute) (loccls layered-location-class) (length number))
+  :open  ((do-markup-default "RANGE:OPEN" (get-name attr) (get-name loccls) length)
           (do-markup-indent))
   :close ((do-markup-outdent)
-          (do-markup-default "RANGE:CLOSE" (get-name loccls) length))
+          (do-markup-default "RANGE:CLOSE" (get-name attr) (get-name loccls) length))
   :sep   ((do-markup-default "RANGE:SEP" (get-name loccls) length)))
 
 (defmethod markup-range-print-end-p ((loccls layered-location-class)
@@ -947,7 +949,7 @@
 ;; line 1002 "markup.nw"
 (defmacro markup-range (&whole whole &rest args)
   (destructuring-switch-bind (&key
-                              open close sep class length
+                              open close sep class attr length
                               &switch ignore-end)
       args
     (cond
@@ -965,6 +967,10 @@
 ((and class (progn (setq class (stringify class))
                    (not (lookup-locref-class *indexstyle* class))))
  (nraw "parameter `~S' is not a location-reference class! (ignored)~%" class))
+;; line 294 "markup.nw"
+((and attr (progn (setq attr (stringify attr))
+                   (not (lookup-catattr *indexstyle* attr))))
+ (nraw "parameter `~S' is not an attribute! (ignored)~%" attr))
 ;; line 1009 "markup.nw"
           ((and length (not (numberp length)))
              (nraw "parameter `~S' is not a number! (ignored)~%" length))
@@ -971,7 +977,10 @@
           (t `(let ()
                (markup::define-list-environment-methods
                    DO-MARKUP-RANGE
-                   (,(if class
+                   (,(if attr
+                         `(attr (EQL ',(lookup-catattr *indexstyle* attr)))
+                         '(attr category-attribute))
+                   ,(if class
                          `(locrefcls (EQL ',(cdr (lookup-locref-class
                                                   *indexstyle* class))))
                          '(locrefcls layered-location-class))
@@ -989,7 +998,7 @@
                     ,(if length
                          `(length (EQL ,length))
                          '(length number)))
-                 :declare ((declare (ignore locrefcls length)))
+                 :declare ((declare (ignore attr locrefcls length)))
                  :body    (,(not ignore-end))))))))
 ;; line 1064 "markup.nw"
 (defmacro markup-crossref-list (&key open sep close class)



More information about the tex-live-commits mailing list.