;; xindy style file for samplexdy.tex that has Mc letter group

(define-letter-group "A" :prefixes (""))
(define-letter-group "B" :after "A" :prefixes (""))
(define-letter-group "C" :after "B" :prefixes (""))
(define-letter-group "D" :after "C" :prefixes (""))
(define-letter-group "E" :after "D" :prefixes (""))
(define-letter-group "F" :after "E" :prefixes (""))
(define-letter-group "G" :after "F" :prefixes (""))
(define-letter-group "H" :after "G" :prefixes ("¤"))
(define-letter-group "I" :after "H" :prefixes ("¨"))
(define-letter-group "J" :after "I" :prefixes ("¬"))
(define-letter-group "K" :after "J" :prefixes ("®"))
(define-letter-group "L" :after "K" :prefixes ("´"))
(define-letter-group "Mc" :after "L" :prefixes ("»"))
(define-letter-group "M" :after "Mc" :prefixes ("»"))
(define-letter-group "N" :after "M" :prefixes ("¼"))
(define-letter-group "O" :after "N" :prefixes ("Ã"))
(define-letter-group "P" :after "O" :prefixes ("È"))
(define-letter-group "Q" :after "P" :prefixes ("Ê"))
(define-letter-group "R" :after "Q" :prefixes ("Ë"))
(define-letter-group "S" :after "R" :prefixes ("Ð"))
(define-letter-group "T" :after "S" :prefixes ("Ú"))
(define-letter-group "U" :after "T" :prefixes ("à"))
(define-letter-group "V" :after "U" :prefixes ("å"))
(define-letter-group "W" :after "V" :prefixes ("æ"))
(define-letter-group "X" :after "W" :prefixes ("ë"))
(define-letter-group "Y" :after "X" :prefixes ("í"))
(define-letter-group "È" :after "Y" :prefixes ("ï"))
(define-letter-group "Z" :after "È" :prefixes ("ð"))
(define-letter-group "Ã" :after "Z" :prefixes ("ö"))
(define-letter-group "Æ¿" :after "Ã" :prefixes ("÷"))

(define-rule-set "en-alphabetize"

  :rules  (("Ã " "" :string)
           ("Ã" "" :string)
           ("Ã" "" :string)
           ("Ã¦" "" :string)
           ("Ã" "" :string)
           ("Ã§" "" :string)
           ("Ã°" "" :string)
           ("Ã" "" :string)
           ("Ã" "" :string)
           ("Ã" "" :string)
           ("Ã" "" :string)
           ("Ã" "" :string)
           ("Ã¨" "" :string)
           ("Ã«" "" :string)
           ("Ãª" "" :string)
           ("Ã©" "" :string)
           ("Ã" "¨" :string)
           ("Ã¯" "¨" :string)
           ("Ã" "¼" :string)
           ("Ã±" "¼" :string)
           ("Ã" "Ã" :string)
           ("Ã" "Ã" :string)
           ("Ã´" "Ã" :string)
           ("Ã¶" "Ã" :string)
           ("Å" "Ã" :string)
           ("Å" "Ã" :string)
           ("È" "ï" :string)
           ("È" "ï" :string)
           ("Ã¾" "ö" :string)
           ("Ã" "ö" :string)
           ("Ç·" "÷" :string)
           ("Æ¿" "÷" :string)
           ("a" "" :string)
           ("A" "" :string)
           ("b" "" :string)
           ("B" "" :string)
           ("C" "" :string)
           ("c" "" :string)
           ("d" "" :string)
           ("D" "" :string)
           ("E" "" :string)
           ("e" "" :string)
           ("F" "" :string)
           ("f" "" :string)
           ("g" "" :string)
           ("G" "" :string)
           ("H" "¤" :string)
           ("h" "¤" :string)
           ("I" "¨" :string)
           ("i" "¨" :string)
           ("J" "¬" :string)
           ("j" "¬" :string)
           ("K" "®" :string)
           ("k" "®" :string)
           ("L" "´" :string)
           ("l" "´" :string)
           ("Mc" "»" :string)
           ("Mac" "»" :string)
           ("M" "»" :string)
           ("m" "»" :string)
           ("N" "¼" :string)
           ("n" "¼" :string)
           ("O" "Ã" :string)
           ("o" "Ã" :string)
           ("P" "È" :string)
           ("p" "È" :string)
           ("q" "Ê" :string)
           ("Q" "Ê" :string)
           ("r" "Ë" :string)
           ("R" "Ë" :string)
           ("S" "Ð" :string)
           ("s" "Ð" :string)
           ("T" "Ú" :string)
           ("t" "Ú" :string)
           ("u" "à" :string)
           ("U" "à" :string)
           ("v" "å" :string)
           ("V" "å" :string)
           ("w" "æ" :string)
           ("W" "æ" :string)
           ("X" "ë" :string)
           ("x" "ë" :string)
           ("Y" "í" :string)
           ("y" "í" :string)
           ("z" "ð" :string)
           ("Z" "ð" :string)
           ))

(define-rule-set "en-resolve-diacritics"

  :rules  (("È" "¢" :string)
           ("Ã¾" "¢" :string)
           ("Ç·" "¢" :string)
           ("Ã" "¢" :string)
           ("È" "¢" :string)
           ("Æ¿" "¢" :string)
           ("Ã" "£" :string)
           ("Ã" "£" :string)
           ("Ã°" "£" :string)
           ("Ã" "£" :string)
           ("Ã" "£" :string)
           ("Ã" "£" :string)
           ("Ã¯" "£" :string)
           ("Ã¶" "£" :string)
           ("Ã±" "£" :string)
           ("Ã§" "£" :string)
           ("Ã " "£" :string)
           ("Ã" "£" :string)
           ("Ã©" "£" :string)
           ("Ã" "£" :string)
           ("Ã" "¤" :string)
           ("Ã´" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã¨" "¤" :string)
           ("Ã" "¥" :string)
           ("Ã«" "¥" :string)
           ("Ã" "¦" :string)
           ("Ãª" "¦" :string)
           ("Å" "ÿ" :string)
           ("Ã" "ÿ" :string)
           ("Å" "ÿ" :string)
           ("Ã¦" "ÿ" :string)
           ("S" "¢" :string)
           ("K" "¢" :string)
           ("d" "¢" :string)
           ("Y" "¢" :string)
           ("E" "¢" :string)
           ("y" "¢" :string)
           ("g" "¢" :string)
           ("e" "¢" :string)
           ("J" "¢" :string)
           ("q" "¢" :string)
           ("D" "¢" :string)
           ("b" "¢" :string)
           ("z" "¢" :string)
           ("w" "¢" :string)
           ("Q" "¢" :string)
           ("M" "¢" :string)
           ("C" "¢" :string)
           ("L" "¢" :string)
           ("X" "¢" :string)
           ("P" "¢" :string)
           ("T" "¢" :string)
           ("a" "¢" :string)
           ("N" "¢" :string)
           ("j" "¢" :string)
           ("Z" "¢" :string)
           ("u" "¢" :string)
           ("k" "¢" :string)
           ("t" "¢" :string)
           ("W" "¢" :string)
           ("v" "¢" :string)
           ("s" "¢" :string)
           ("B" "¢" :string)
           ("H" "¢" :string)
           ("c" "¢" :string)
           ("I" "¢" :string)
           ("G" "¢" :string)
           ("U" "¢" :string)
           ("F" "¢" :string)
           ("r" "¢" :string)
           ("x" "¢" :string)
           ("V" "¢" :string)
           ("h" "¢" :string)
           ("f" "¢" :string)
           ("i" "¢" :string)
           ("A" "¢" :string)
           ("O" "¢" :string)
           ("n" "¢" :string)
           ("m" "¢" :string)
           ("l" "¢" :string)
           ("p" "¢" :string)
           ("R" "¢" :string)
           ("o" "¢" :string)
           ))

(define-rule-set "en-resolve-case"

  :rules  (("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("Ç·" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "8" :string)
           ("È" "8" :string)
           ("Ã" "8" :string)
           ("Ã" "89" :string)
           ("Å" "89" :string)
           ("Ã°" "9" :string)
           ("Ã´" "9" :string)
           ("È" "9" :string)
           ("Ã¯" "9" :string)
           ("Ã¶" "9" :string)
           ("Ã±" "9" :string)
           ("Ã§" "9" :string)
           ("Ã " "9" :string)
           ("Ã¾" "9" :string)
           ("Ã¨" "9" :string)
           ("Ã«" "9" :string)
           ("Ãª" "9" :string)
           ("Ã©" "9" :string)
           ("Æ¿" "9" :string)
           ("Å" "99" :string)
           ("Ã¦" "99" :string)
           ("S" "8" :string)
           ("K" "8" :string)
           ("Y" "8" :string)
           ("E" "8" :string)
           ("J" "8" :string)
           ("D" "8" :string)
           ("Q" "8" :string)
           ("M" "8" :string)
           ("C" "8" :string)
           ("L" "8" :string)
           ("X" "8" :string)
           ("P" "8" :string)
           ("T" "8" :string)
           ("N" "8" :string)
           ("Z" "8" :string)
           ("W" "8" :string)
           ("B" "8" :string)
           ("H" "8" :string)
           ("I" "8" :string)
           ("G" "8" :string)
           ("U" "8" :string)
           ("F" "8" :string)
           ("V" "8" :string)
           ("A" "8" :string)
           ("O" "8" :string)
           ("R" "8" :string)
           ("d" "9" :string)
           ("y" "9" :string)
           ("g" "9" :string)
           ("e" "9" :string)
           ("q" "9" :string)
           ("b" "9" :string)
           ("z" "9" :string)
           ("w" "9" :string)
           ("a" "9" :string)
           ("j" "9" :string)
           ("u" "9" :string)
           ("k" "9" :string)
           ("t" "9" :string)
           ("v" "9" :string)
           ("s" "9" :string)
           ("c" "9" :string)
           ("r" "9" :string)
           ("x" "9" :string)
           ("h" "9" :string)
           ("f" "9" :string)
           ("i" "9" :string)
           ("n" "9" :string)
           ("m" "9" :string)
           ("l" "9" :string)
           ("p" "9" :string)
           ("o" "9" :string)
           ))

(define-rule-set "en-ignore-special"

  :rules  (("-" "" :string)
           ("!" "" :string)
           ("{" "" :string)
           ("'" "" :string)
           ("}" "" :string)
           ("?" "" :string)
           ("." "" :string)
           ))

(define-rule-set "en-resolve-special"

  :rules  (("Ã" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã°" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã´" "¤" :string)
           ("Ã" "¤" :string)
           ("È" "¤" :string)
           ("Ã¯" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã¶" "¤" :string)
           ("Ã±" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã§" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã " "¤" :string)
           ("Ã¾" "¤" :string)
           ("Ç·" "¤" :string)
           ("Ã¨" "¤" :string)
           ("Ã" "¤" :string)
           ("Ã«" "¤" :string)
           ("Ã" "¤" :string)
           ("Ãª" "¤" :string)
           ("Ã©" "¤" :string)
           ("È" "¤" :string)
           ("Æ¿" "¤" :string)
           ("Ã" "¤" :string)
           ("Å" "¤¤" :string)
           ("Ã" "¤¤" :string)
           ("Å" "¤¤" :string)
           ("Ã¦" "¤¤" :string)
           ("?" "¡" :string)
           ("!" "¢" :string)
           ("." "£" :string)
           ("S" "¤" :string)
           ("K" "¤" :string)
           ("d" "¤" :string)
           ("Y" "¤" :string)
           ("E" "¤" :string)
           ("y" "¤" :string)
           ("g" "¤" :string)
           ("e" "¤" :string)
           ("J" "¤" :string)
           ("q" "¤" :string)
           ("D" "¤" :string)
           ("b" "¤" :string)
           ("z" "¤" :string)
           ("w" "¤" :string)
           ("Q" "¤" :string)
           ("M" "¤" :string)
           ("C" "¤" :string)
           ("L" "¤" :string)
           ("X" "¤" :string)
           ("P" "¤" :string)
           ("T" "¤" :string)
           ("a" "¤" :string)
           ("N" "¤" :string)
           ("j" "¤" :string)
           ("Z" "¤" :string)
           ("u" "¤" :string)
           ("k" "¤" :string)
           ("t" "¤" :string)
           ("W" "¤" :string)
           ("v" "¤" :string)
           ("s" "¤" :string)
           ("B" "¤" :string)
           ("H" "¤" :string)
           ("c" "¤" :string)
           ("I" "¤" :string)
           ("G" "¤" :string)
           ("U" "¤" :string)
           ("F" "¤" :string)
           ("r" "¤" :string)
           ("x" "¤" :string)
           ("V" "¤" :string)
           ("h" "¤" :string)
           ("f" "¤" :string)
           ("i" "¤" :string)
           ("A" "¤" :string)
           ("O" "¤" :string)
           ("n" "¤" :string)
           ("m" "¤" :string)
           ("l" "¤" :string)
           ("p" "¤" :string)
           ("R" "¤" :string)
           ("o" "¤" :string)
           ("-" "¥" :string)
           ("'" "¦" :string)
           ("{" "§" :string)
           ("}" "¨" :string)
           ))

; The following section is customised for samplexdy.tex
; (copied from samplexdy.xdy automatically generated by
; samplexdy.tex)

; required styles

(require "tex.xdy")

; list of allowed attributes (number formats)

(define-attributes (("default"
 "hyperbfit" 
 "pagehyperbfit"
 "glsnumberformat" 
 "pageglsnumberformat"
 "textrm" 
 "pagetextrm"
 "textsf" 
 "pagetextsf"
 "texttt" 
 "pagetexttt"
 "textbf" 
 "pagetextbf"
 "textmd" 
 "pagetextmd"
 "textit" 
 "pagetextit"
 "textup" 
 "pagetextup"
 "textsl" 
 "pagetextsl"
 "textsc" 
 "pagetextsc"
 "emph" 
 "pageemph"
 "glshypernumber" 
 "pageglshypernumber"
 "hyperrm" 
 "pagehyperrm"
 "hypersf" 
 "pagehypersf"
 "hypertt" 
 "pagehypertt"
 "hyperbf" 
 "pagehyperbf"
 "hypermd" 
 "pagehypermd"
 "hyperit" 
 "pagehyperit"
 "hyperup" 
 "pagehyperup"
 "hypersl" 
 "pagehypersl"
 "hypersc" 
 "pagehypersc"
 "hyperemph" 
 "pagehyperemph")))

; user defined alphabets



; location class definitions

(define-location-class "roman-page-numbers"
   ( :sep "{}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-roman-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-roman-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-roman-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-roman-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-roman-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-roman-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-roman-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers"
   ( :sep "{}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-Roman-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-Roman-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-Roman-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-Roman-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-Roman-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-Roman-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-Roman-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers"
   ( :sep "{}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-arabic-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-arabic-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-arabic-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-arabic-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-arabic-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-arabic-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-arabic-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers"
   ( :sep "{}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-alpha-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-alpha-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-alpha-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-alpha-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-alpha-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-alpha-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-alpha-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers"
   ( :sep "{}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-Alpha-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-Alpha-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers"
   ( :sep "{}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-Appendix-page-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-Appendix-page-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers"
   ( :sep "{}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "roman-page-numbers-arabic-section-numbers" 
   ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Roman-page-numbers-arabic-section-numbers" 
   ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-page-numbers-arabic-section-numbers" 
   ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "alpha-page-numbers-arabic-section-numbers" 
   ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Alpha-page-numbers-arabic-section-numbers" 
   ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "Appendix-page-numbers-arabic-section-numbers" 
   ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 
(define-location-class "arabic-section-numbers-arabic-section-numbers" 
   ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) 
   :min-range-length 2
) 

; user defined location classes

(define-location-class "Numberstring"
   (:sep "{}{" :sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}" :sep "}")) 

; define cross-reference class

(define-crossref-class "see" :unverified )
(markup-crossref-list :class "see"
   :open "\glsseeformat" :close "{}")

; define the order of the location classes
(define-location-class-order (
   "roman-page-numbers"
   "arabic-page-numbers"
   "arabic-section-numbers"
   "alpha-page-numbers"
   "Roman-page-numbers"
   "Alpha-page-numbers"
   "Appendix-page-numbers" 
   "see" ))

; define the glossary markup

(markup-index
   :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble
\providecommand*\glsXpageXhyperbfit[2]{\setentrycounter[#1]{page}\hyperbfit{#2}}
\providecommand*\glsXpageXglsnumberformat[2]{\setentrycounter[#1]{page}\glsnumberformat{#2}}
\providecommand*\glsXpageXtextrm[2]{\setentrycounter[#1]{page}\textrm{#2}}
\providecommand*\glsXpageXtextsf[2]{\setentrycounter[#1]{page}\textsf{#2}}
\providecommand*\glsXpageXtexttt[2]{\setentrycounter[#1]{page}\texttt{#2}}
\providecommand*\glsXpageXtextbf[2]{\setentrycounter[#1]{page}\textbf{#2}}
\providecommand*\glsXpageXtextmd[2]{\setentrycounter[#1]{page}\textmd{#2}}
\providecommand*\glsXpageXtextit[2]{\setentrycounter[#1]{page}\textit{#2}}
\providecommand*\glsXpageXtextup[2]{\setentrycounter[#1]{page}\textup{#2}}
\providecommand*\glsXpageXtextsl[2]{\setentrycounter[#1]{page}\textsl{#2}}
\providecommand*\glsXpageXtextsc[2]{\setentrycounter[#1]{page}\textsc{#2}}
\providecommand*\glsXpageXemph[2]{\setentrycounter[#1]{page}\emph{#2}}
\providecommand*\glsXpageXglshypernumber[2]{\setentrycounter[#1]{page}\glshypernumber{#2}}
\providecommand*\glsXpageXhyperrm[2]{\setentrycounter[#1]{page}\hyperrm{#2}}
\providecommand*\glsXpageXhypersf[2]{\setentrycounter[#1]{page}\hypersf{#2}}
\providecommand*\glsXpageXhypertt[2]{\setentrycounter[#1]{page}\hypertt{#2}}
\providecommand*\glsXpageXhyperbf[2]{\setentrycounter[#1]{page}\hyperbf{#2}}
\providecommand*\glsXpageXhypermd[2]{\setentrycounter[#1]{page}\hypermd{#2}}
\providecommand*\glsXpageXhyperit[2]{\setentrycounter[#1]{page}\hyperit{#2}}
\providecommand*\glsXpageXhyperup[2]{\setentrycounter[#1]{page}\hyperup{#2}}
\providecommand*\glsXpageXhypersl[2]{\setentrycounter[#1]{page}\hypersl{#2}}
\providecommand*\glsXpageXhypersc[2]{\setentrycounter[#1]{page}\hypersc{#2}}
\providecommand*\glsXpageXhyperemph[2]{\setentrycounter[#1]{page}\hyperemph{#2}}
\begin{theglossary}\glossaryheader~n" 
   :close "%~n\end{theglossary}\glossarypostamble~n" 
   :tree)
(markup-letter-group-list :sep "\glsgroupskip~n")
(markup-indexentry :open "\relax\glsresetentrylist~n")
(markup-locclass-list :open "{\glossaryentrynumbers{\relax "
   :sep ", " :close "}}")
(markup-locref-list :sep "\delimN ")
(markup-range :sep "\delimR ")

; define format to use for locations


(markup-locref :open "~n\glsXpageXhyperbfit" 
 :close "" 
 :attr "pagehyperbfit")
(markup-locref :open "~n\glsXpageXglsnumberformat" 
 :close "" 
 :attr "pageglsnumberformat")
(markup-locref :open "~n\glsXpageXtextrm" 
 :close "" 
 :attr "pagetextrm")
(markup-locref :open "~n\glsXpageXtextsf" 
 :close "" 
 :attr "pagetextsf")
(markup-locref :open "~n\glsXpageXtexttt" 
 :close "" 
 :attr "pagetexttt")
(markup-locref :open "~n\glsXpageXtextbf" 
 :close "" 
 :attr "pagetextbf")
(markup-locref :open "~n\glsXpageXtextmd" 
 :close "" 
 :attr "pagetextmd")
(markup-locref :open "~n\glsXpageXtextit" 
 :close "" 
 :attr "pagetextit")
(markup-locref :open "~n\glsXpageXtextup" 
 :close "" 
 :attr "pagetextup")
(markup-locref :open "~n\glsXpageXtextsl" 
 :close "" 
 :attr "pagetextsl")
(markup-locref :open "~n\glsXpageXtextsc" 
 :close "" 
 :attr "pagetextsc")
(markup-locref :open "~n\glsXpageXemph" 
 :close "" 
 :attr "pageemph")
(markup-locref :open "~n\glsXpageXglshypernumber" 
 :close "" 
 :attr "pageglshypernumber")
(markup-locref :open "~n\glsXpageXhyperrm" 
 :close "" 
 :attr "pagehyperrm")
(markup-locref :open "~n\glsXpageXhypersf" 
 :close "" 
 :attr "pagehypersf")
(markup-locref :open "~n\glsXpageXhypertt" 
 :close "" 
 :attr "pagehypertt")
(markup-locref :open "~n\glsXpageXhyperbf" 
 :close "" 
 :attr "pagehyperbf")
(markup-locref :open "~n\glsXpageXhypermd" 
 :close "" 
 :attr "pagehypermd")
(markup-locref :open "~n\glsXpageXhyperit" 
 :close "" 
 :attr "pagehyperit")
(markup-locref :open "~n\glsXpageXhyperup" 
 :close "" 
 :attr "pagehyperup")
(markup-locref :open "~n\glsXpageXhypersl" 
 :close "" 
 :attr "pagehypersl")
(markup-locref :open "~n\glsXpageXhypersc" 
 :close "" 
 :attr "pagehypersc")
(markup-locref :open "~n\glsXpageXhyperemph" 
 :close "" 
 :attr "pagehyperemph")

; define letter group list format

(markup-letter-group-list :sep "\glsgroupskip~n")

; letter group headings

(markup-letter-group :open-head "\glsgroupheading{"
   :close-head "}")

; additional letter groups

(define-letter-group "glsnumbers"
   :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")
   :before "A")

; additional sort rules


; The following is copied from xindy/lang/english/utf8-lang.xdy

(define-sort-rule-orientations (forward backward forward forward))
(use-rule-set :run 0
	      :rule-set ("en-alphabetize" "en-ignore-special"))
(use-rule-set :run 1
	      :rule-set ("en-resolve-diacritics" "en-ignore-special"))
(use-rule-set :run 2
	      :rule-set ("en-resolve-case" "en-ignore-special"))
(use-rule-set :run 3
	      :rule-set ("en-resolve-special"))

