summaryrefslogtreecommitdiff
path: root/Build/source/utils/xindy/modules/base/latex.xdy
blob: e45dc67049d50ba1755c7ad79a4fd3aecc4f04f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
;; $Id: latex.xdy,v 1.4 2008/01/09 15:13:29 jschrod Exp $
;;------------------------------------------------------------

;;;
;;; LaTeX conventions
;;;
;;; both in raw index entries and output markup
;;;


;; We need to define merge rules for known macros first, as tex.xdy
;; has a merge-rule that will discard all macros.

(merge-rule "\\LaTeXe *" "LaTeX2e" :eregexp :again)
(merge-rule "\\BibTeX *" "BibTeX" :eregexp :again)
(merge-rule "\\AmSTeX *" "AmSTeX" :eregexp :again)
(merge-rule "\\AmSLaTeX *" "AmSLaTeX" :eregexp :again)
(merge-rule "\\XeT *" "XeT" :eregexp :again)


;; LaTeX has the same conventions as TeX

(require "tex.xdy")


;; We do not define attributes, this is done in latex-loc-fmts.


;; Standard location classes: arabic and roman numbers, and alphabets.

(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"))


;;;
;;; Output Markup
;;;

(markup-index :open
"\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
      \par\textbf{#1}\par
      \nopagebreak
  }
"
	      :close "~n~n\end{theindex}~n"
	      :tree)

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

(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 ", ")




;;======================================================================
;;
;; $Log: latex.xdy,v $
;; Revision 1.4  2008/01/09 15:13:29  jschrod
;;     Configurable section headline for the Default letter group.
;;
;; Revision 1.3  2006/11/07 01:16:50  jschrod
;;     Prevent page break after letter group heading.
;; Introduce a \lettergroup tag for that, which can be redefined
;; by the user in an own theindex environment. (Ticket 1255990)
;;
;; Revision 1.2  2005/05/09 20:21:11  jschrod
;;     Support handling of some common macros for logos; ignore all other
;; TeX commands.
;;
;; Revision 1.1  2004/05/24 21:53:27  jschrod
;;     Standard modules, introduced in "LaTeX Companion Release".
;;