
Hi all, I have prepared a couple of modules for sorting indexes according to the spanish rules, es-moder.xdy follows the modern ordering, with the a-z alphabet plus ñ between n and o es-tradi.xdy follows the traditional ordering, with the a-z alphabet, plus ñ between n and o, ch as a single letter between c and d, and ll as a single letter between l and m. This files seem to work in my examples. I am not an expert in xindy, so any suggestion is highly welcome. Congratulations to the xindy team, I am finding it very useful. I intend to speak a bit about it in a spanish TeX workshop to be held in september, with a general overview and its application to spanish. I am sure people will like it. Regards, -- ===================================================================== Agustín Martín Domingo, Dpto. de Física, ETS Arquitectura Madrid, (U. Politécnica de Madrid) tel: +34 91-336-6536, Fax: +34 91-336-6554, email:agmartin@aq.upm.es, http://corbu.aq.upm.es/~agmartin/welcome.html
;; $Id: msg00133.html,v 1.1 2004/01/08 19:29:17 jschrod Exp $
;;
;;
;; Cargamos el makeidx.xdy original para partir de él
;;
;; First we will load original makeidx.xdy to use it
(require "tex/makeidx.xdy")
;;
;; definimos el alfabeto castellano moderno con la letra , y
;; ch y ll compuestas de dos letras
;;
;; We define modern spanish alphabet with ñ and ch and ll
;; as composed of two charecters
(define-letter-groups
("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"))
;;
;;
;;
(require "tex/isolatin1m.xdy")
(require "tex/isolatin1s.xdy")
(require "rules/isolatin1-tolower.xdy")
;; These lines are to deal with a problem related to the different ways
;; tex can write an accented i to the .idx file
;; Presumably will go soon into isolatin1s-tex.xdy
(merge-rule "{\'\i}" "í" :string :again)
(merge-rule "{\'\i }" "í" :string :again)
(merge-rule "\'{\i}" "í" :string :again)
(merge-rule "{\`\i}" "ì" :string :again)
(merge-rule "{\`\i }" "ì" :string :again)
(merge-rule "\`{\i}" "ì" :string :again)
(merge-rule "{\~"\i}" "ï" :string :again)
(merge-rule "{\~"\i }" "ï" :string :again)
(merge-rule "\~"{\i}" "ï" :string :again)
(merge-rule "{\^\i}" "î" :string :again)
(merge-rule "{\^\i }" "î" :string :again)
(merge-rule "\^{\i}" "î" :string :again)
(merge-rule "\IeC " "" :string :again)
;;
;; Añadimos las sort-rules para caracteres acentuados en castellano
;; con algunas letras acentuadas y caracteres que no existen por si
;; acaso aparecen en nombres
;;
;; Adding sort-rules for spanish accented characters as well as for
;; other accented characters that are not present in spanish,
;; but can be present in names
(sort-rule "á" "a")
(sort-rule "à" "a")
(sort-rule "ä" "a")
(sort-rule "â" "a")
(sort-rule "é" "e")
(sort-rule "è" "e")
(sort-rule "ë" "e")
(sort-rule "ê" "e")
(sort-rule "í" "i")
(sort-rule "ì" "i")
(sort-rule "ï" "i")
(sort-rule "î" "i")
(sort-rule "ó" "o")
(sort-rule "ò" "o")
(sort-rule "ö" "o")
(sort-rule "ô" "o")
(sort-rule "ú" "u")
(sort-rule "ù" "u")
(sort-rule "ü" "u")
(sort-rule "û" "u")
;;
;; and for some special characters
;;
(sort-rule "ß" "ss")
;; That's all ;-)
;; Local Variables:
;; mode: lisp
;; End:
;; $Id: msg00133.html,v 1.1 2004/01/08 19:29:17 jschrod Exp $
;;
;; Cargamos lang/spanish/es-moder.xdy para tenerlo de base
;;
;; First we will load es-modern.xdy and make modifications to it
(require "lang/spanish/es-moder.xdy")
;; Definimos el albabeto castellano con las letras ch, ll y ñ
;; (con ch y ll consideradas como letras con entidad propia)
;; We define spanish alphabet with ch, ll y ñ.
(define-letter-groups
("a" "b" "c" "ch" "d" "e" "f" "g" "h" "i" "j" "k" "l" "ll" "m"
"n" "ñ" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))
;;
;; y para algunas combinaciones de ch y ll
;;
;; and for some combinations of ch and ll
;;
(sort-rule "CH" "ch")
(sort-rule "Ch" "ch")
(sort-rule "LL" "ll")
(sort-rule "Ll" "ll")
;; That's all ;-)
;; Local Variables:
;; mode: lisp
;; End: