;; (define-attributes ("example"))
;; (define-attributes ("definition"))
(define-attributes (("default" "definition" "example")))
(define-attributes ("textsf"))
(markup-locref :open "\hyperpage{" :close "}" :attr "default")
(markup-locref :open "\textbf{\hyperpage{" :close "}}" :attr "definition")
(markup-locref :open "\textit{\hyperpage{" :close "}}" :attr "textit")
(markup-locref :open "\textsf{\hyperpage{" :close "}}" :attr "textsf")
(markup-locref :open "\emph{\hyperpage{" :close "}}" :attr "example")

(markup-crossref-list :class "see" :open "\seelink{" :sep "; " :close "}{}")

(define-crossref-class "hyperindexformat")
(markup-crossref-list :class "hyperindexformat" :open
      "\hyperindexformat{" :sep "; " :close "}{}")

;; (merge-to "definition" "default" :drop)

(markup-locref :open "\hyperpage{" :close "}")
(markup-locref :open "\hyperpage{" :close "}" :attr "hyperpage")

(markup-keyword-list :open "\targetindexentry{" :close "}" )
(markup-keyword-list :open "\targetindexentryi{" :close "}" :depth 1)
(markup-keyword-list :open "\targetindexentryii{" :close "}" :depth 2)

(markup-index :open  "~n
\begin{theindex}
  \providecommand*\lettergroupDefault[1]{}
  \providecommand*\lettergroup[1]{%
    \belowpdfbookmark{#1}{\csuse{DBD@index@symbolic@name}:#1}%
    \par\indexheading{#1}{\csuse{DBD@index@symbolic@name}}\par
    % \nopagebreak
  }
  ~n"
  :close "~n~n\end{theindex}~n"
:tree)
