File: dbmath.dsl

package info (click to toggle)
docbook-stylesheets 1.49-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 7,576 kB
  • ctags: 33
  • sloc: perl: 444; xml: 115; makefile: 98; sh: 27
file content (67 lines) | stat: -rw-r--r-- 2,146 bytes parent folder | download
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
;; $Id: dbmath.dsl,v 1.4 1999/01/21 09:15:35 nwalsh Exp $
;;
;; This file is part of the Modular DocBook Stylesheet distribution.
;; See ../README or http://www.berkshire.net/~norm/dsssl/
;;

(define %equation-autolabel% #f)

(element equation
  ;; derived from $semiformal-object$
  (if (node-list-empty? (select-elements (children (current-node))
					 (normalize "title")))
      ($informal-object$ %informalequation-rules% %informalequation-rules%)
      ($formal-object$ %informalequation-rules% %informalequation-rules%)))

(element (equation title) (empty-sosofo))
(element (equation alt) (empty-sosofo))
(element (equation graphic)
  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
    (if alttag
	($img$ (current-node) (data alttag))
	($img$))))

(element informalequation
  ;; Derived from informal-object
  (let ((rule-before? %informalequation-rules%)
	(rule-after? %informalequation-rules%))
    (if %equation-autolabel%
	(make sequence
	  (if rule-before?
	      (make empty-element gi: "HR")
	      (empty-sosofo))
	  (make element gi: "TABLE"
		attributes: '(("CLASS" "INFORMALEQUATION")
			      ("WIDTH" "100%")
			      ("BORDER" "0"))
		(make element gi: "TR"
		      (make element gi: "TD"
			    attributes: '(("VALIGN" "MIDDLE")
					  ("ALIGN" "LEFT"))
			    (process-children))
		      (make element gi: "TD"
			    attributes: '(("VALIGN" "MIDDLE")
					  ("ALIGN" "RIGHT")
					  ("WIDTH" "100"))
			    (literal "(" 
				     (element-label (current-node)) 
				     ")"))))
	  (if rule-after?
	      (make empty-element gi: "HR")
	      (empty-sosofo)))
	($informal-object$ rule-before? rule-after?))))

(element (informalequation alt) (empty-sosofo))
(element (informalequation graphic) 
  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
    (if alttag
	($img$ (current-node) (data alttag))
	($img$))))

(element inlineequation ($inline-object$))
(element (inlineequation alt) (empty-sosofo))
(element (inlineequation graphic) 
  (let ((alttag (select-elements (children (parent)) (normalize "alt"))))
    (if alttag
	($img$ (current-node) (data alttag))
	($img$))))