-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpollen.rkt
99 lines (81 loc) · 2.43 KB
/
pollen.rkt
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#lang racket
(require pollen/decode
pollen/setup ; For current-poly-target
pollen/file ; get-markup-source
pollen/core
pollen/private/version
txexpr
pollen/tag ; default-tag-function
"lib/polytag.rkt"
"lib/tags-html.rkt"
"lib/tags-tree.rkt"
"lib/tags-ltx.rkt"
"lib/tags-pdf.rkt")
(provide string-split
pollen:version
(all-from-out "lib/tags-tree.rkt"))
(provide (all-defined-out))
(provide for/s)
(module setup racket/base
(require "lib/target.rkt")
(provide (all-defined-out)
poly-targets)
(require syntax/modresolve racket/runtime-path)
(define-runtime-path lib/common-helpers.rkt "lib/common-helpers.rkt")
(define-runtime-path lib/polytag.rkt "lib/polytag.rkt")
(define-runtime-path lib/tags-html.rkt "lib/tags-html.rkt")
(define-runtime-path lib/tags-tree.rkt "lib/tags-tree.rkt")
(define-runtime-path lib/tags-ltx.rkt "lib/tags-ltx.rkt")
(define-runtime-path lib/tags-pdf.rkt "lib/tags-pdf.rkt")
(define cache-watchlist
(map resolve-module-path
(list lib/common-helpers.rkt
lib/polytag.rkt
lib/tags-html.rkt
lib/tags-tree.rkt
lib/tags-ltx.rkt
lib/tags-pdf.rkt))))
(poly-branch-tag root)
(poly-branch-tag title)
(poly-branch-tag taxon)
(poly-branch-tag author)
(poly-branch-tag import)
(poly-branch-tag header (title "") (taxon "template") (author "yourself!") (import ""))
; simple tag with no required or default attributes
(poly-branch-tag p)
(poly-branch-tag b)
(poly-branch-tag em)
(poly-branch-tag i)
(poly-branch-tag caps)
(poly-branch-tag strike)
(poly-branch-tag thm)
(poly-branch-tag proof)
(poly-branch-tag h1)
(poly-branch-tag h2)
(poly-branch-tag h3)
(poly-branch-tag $)
(poly-branch-tag eq)
(poly-branch-tag tex)
(poly-branch-tag ?)
(poly-branch-tag qt)
(poly-branch-tag Qt)
(poly-branch-tag newthought)
(poly-branch-tag ol)
(poly-branch-tag ul)
(poly-branch-tag li)
(poly-branch-tag def)
(poly-branch-tag code)
(poly-branch-tag pre)
(poly-branch-tag include)
(poly-branch-tag link url)
(poly-branch-tag lank)
; TODO [[linking]]
(poly-branch-tag td-tag)
(poly-branch-tag th-tag)
(poly-branch-tag tr-tag)
(poly-branch-tag table (columns #f))
(provide for/s)
(define-syntax (for/s stx)
(syntax-case stx ()
[(_ thing listofthings result-expr ...)
#'(for/splice ([thing (in-list listofthings)]) result-expr ...)]))