diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-28 18:10:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-28 18:10:09 +0000 |
commit | 56c26088816db76b3b76ce8c3dc305d44898ee9d (patch) | |
tree | 5168a4034436ebb219a16cf8baec9e7ed3d1af38 /Build/source/utils | |
parent | a0cd52e74c71a51b422c2e1be7195b58c23ba1ba (diff) |
support :attr on separator markup, from J\"urgen S
git-svn-id: svn://tug.org/texlive/trunk@55316 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
6 files changed, 174 insertions, 21 deletions
diff --git a/Build/source/utils/xindy/ChangeLog b/Build/source/utils/xindy/ChangeLog index efcb68ab147..2b969a0acdd 100644 --- a/Build/source/utils/xindy/ChangeLog +++ b/Build/source/utils/xindy/ChangeLog @@ -1,13 +1,19 @@ 2020-05-28 J\"urgen Spitzm\"uller <spitz@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 diff --git a/Build/source/utils/xindy/TLpatches/ChangeLog b/Build/source/utils/xindy/TLpatches/ChangeLog index 766ab547e3f..79687fefef6 100644 --- a/Build/source/utils/xindy/TLpatches/ChangeLog +++ b/Build/source/utils/xindy/TLpatches/ChangeLog @@ -1,5 +1,6 @@ 2020-05-28 Karl Berry <karl@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 diff --git a/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr b/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr new file mode 100644 index 00000000000..6df9d6262a5 --- /dev/null +++ b/Build/source/utils/xindy/TLpatches/patch-06-markup-range-attr @@ -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) diff --git a/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range b/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range index d26e322138a..38dad8d61f2 100644 --- a/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range +++ b/Build/source/utils/xindy/TLpatches/patch-10-doc-min-range @@ -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 diff --git a/Build/source/utils/xindy/xindy-src/doc/manual-3.html b/Build/source/utils/xindy/xindy-src/doc/manual-3.html index e00cf79c6f7..10d4a725a54 100644 --- a/Build/source/utils/xindy/xindy-src/doc/manual-3.html +++ b/Build/source/utils/xindy/xindy-src/doc/manual-3.html @@ -927,17 +927,16 @@ location references in a hierarchical form. With the commands <PRE> (markup-range [:open string] [:close string] [:sep string] [:class locref-class] + [:attr attribute] [:length num] [:ignore-end]) </PRE> </CODE></BLOCKQUOTE> <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 diff --git a/Build/source/utils/xindy/xindy-src/src/markup.lsp b/Build/source/utils/xindy/xindy-src/src/markup.lsp index c0f696e2a6e..6de238bbaf2 100644 --- a/Build/source/utils/xindy/xindy-src/src/markup.lsp +++ b/Build/source/utils/xindy/xindy-src/src/markup.lsp @@ -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,13 +967,20 @@ 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)) (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) |