Book logo xindy

A Flexible Indexing System

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

merge rule question

A merge-rule expression that incorporates regular expressions that is
analogous to the example in Section 1.9 of the "How to..." Xindy
documentation is not working as expected.  I am not too familiar with
regular expressions and don't know where the problem is.  The merge-rule
command I'm using is:  (merge-rule "\textsf{\(.*\)}" "\1" :again :bregexp)

In the example that follows, I would expect both SUMPRODUCT entries to
appear in the "S" letter group.  The marked-up version appears in the
"default" group, however.

The xdy file and LaTeX example file I'm using follow:

**************xdy file****************
(define-attributes ("default"))

(define-location-class "arabic-page-numbers" ("arabic-numbers"))
(define-location-class "roman-page-numbers"  ("roman-numbers-lowercase"))
(define-location-class "Roman-page-numbers"  ("roman-numbers-uppercase"))
(define-location-class "alpha-page-numbers"  ("alpha"))
(define-location-class "Alpha-page-numbers"  ("ALPHA"))

(merge-rule "\textsf{\(.*\)}" "\1" :again :bregexp)

(define-location-class-order ("roman-page-numbers"

(markup-index :open  "\begin{theindex}~n"
          :close "~n~n\end{theindex}~n"

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

(markup-letter-group :open-head "~n \textsf{" :close-head "}")

(markup-indexentry :open "~n  \item "           :depth 0)
(markup-indexentry :open "~n    \subitem "      :depth 1)
(markup-indexentry :open "~n      \subsubitem " :depth 2)

(markup-locclass-list :open ", " :sep ", ")

(markup-locref-list   :sep ", ")

(markup-range :sep "--")

    ("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
     "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))

(sort-rule "A" "a")
(sort-rule "B" "b")
(sort-rule "C" "c")
(sort-rule "D" "d")
(sort-rule "E" "e")
(sort-rule "F" "f")
(sort-rule "G" "g")
(sort-rule "H" "h")
(sort-rule "I" "i")
(sort-rule "J" "j")
(sort-rule "K" "k")
(sort-rule "L" "l")
(sort-rule "M" "m")
(sort-rule "N" "n")
(sort-rule "O" "o")
(sort-rule "P" "p")
(sort-rule "Q" "q")
(sort-rule "R" "r")
(sort-rule "S" "s")
(sort-rule "T" "t")
(sort-rule "U" "u")
(sort-rule "V" "v")
(sort-rule "W" "w")
(sort-rule "X" "x")
(sort-rule "Y" "y")
(sort-rule "Z" "z")

**********The LaTeX file**********


This is page 1.


This is page 2.



Thanks for your advice.


George E. Monahan                         
Professor of Business Adm.
University of Illinois