2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4 ;; MODULE : dynamic-drd.scm
5 ;; DESCRIPTION : data relation definitions for dynamic tags
6 ;; COPYRIGHT : (C) 2005 Joris van der Hoeven
8 ;; This software falls under the GNU general public license version 3 or later.
9 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 (texmacs-module (dynamic dynamic-drd)
15 (:use (utils edit variants)))
17 ;; fold <-> unfold toggles
19 (define-group toggle-tag (folded-tag) (unfolded-tag))
20 (define-group toggle-first-tag (folded-tag))
21 (define-group toggle-second-tag (unfolded-tag))
22 (define-group variant-tag (folded-tag) (unfolded-tag))
23 (define-group similar-tag (folded-tag) (unfolded-tag))
25 (tm-define toggle-table (make-ahash-table))
26 (tm-define-macro (define-fold folded unfolded)
28 (define-group folded-tag ,folded)
29 (define-group unfolded-tag ,unfolded)
30 (ahash-set! toggle-table ',folded ',unfolded)
31 (ahash-set! toggle-table ',unfolded ',folded)))
33 (define-fold folded unfolded)
34 (define-fold folded-plain unfolded-plain)
35 (define-fold folded-std unfolded-std)
36 (define-fold folded-explain unfolded-explain)
37 (define-fold folded-env unfolded-env)
38 (define-fold folded-grouped unfolded-grouped)
40 ;; summarized <-> detailed toggles
42 (define-group toggle-tag (toggle-first-tag) (toggle-second-tag))
43 (define-group toggle-first-tag (summarized-tag) summarized-algorithm)
44 (define-group toggle-second-tag (detailed-tag) detailed-algorithm)
45 (define-group variant-tag (summarized-tag) (detailed-tag))
46 (define-group similar-tag (summarized-tag) (detailed-tag))
48 (tm-define-macro (define-summarize short long)
50 (define-group summarized-tag ,short)
51 (define-group detailed-tag ,long)
52 (ahash-set! toggle-table ',short ',long)
53 (ahash-set! toggle-table ',long ',short)))
55 (define-summarize summarized detailed)
56 (define-summarize summarized-plain detailed-plain)
57 (define-summarize summarized-std detailed-std)
58 (define-summarize summarized-env detailed-env)
59 (define-summarize summarized-grouped detailed-grouped)
60 (define-summarize summarized-raw detailed-raw)
61 (define-summarize summarized-tiny detailed-tiny)
63 (ahash-set! toggle-table 'summarized-algorithm 'detailed-algorithm)
64 (ahash-set! toggle-table 'detailed-algorithm 'summarized-algorithm)
68 (define-group switch-tag
69 (alternative-tag) (unroll-tag) (expanded-tag))
71 (define-group big-switch-tag
72 (big-alternative-tag) (unroll-tag) (expanded-tag))
74 (define-group alternative-tag
75 (big-alternative-tag) tiny-switch)
77 (define-group big-alternative-tag
80 (define-group unroll-tag
83 (define-group expanded-tag