doc work (start on module guide)
svn: r6730 original commit: f7bf029234e0d3ce26e4200094b1986f5f538689
This commit is contained in:
parent
9595675a5c
commit
4c40ffdd26
|
@ -326,7 +326,7 @@
|
|||
fns)))
|
||||
|
||||
(define/override (part-whole-page? d)
|
||||
(= 2 (collecting-sub)))
|
||||
((collecting-sub) . <= . 2))
|
||||
|
||||
(define/private (toc-part? d)
|
||||
(and (styled-part? d)
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
(define-color "schemeresult" "ResultColor")
|
||||
(define-color "schemestdout" "OutputColor")
|
||||
(define-color "schememeta" "IdentifierColor")
|
||||
(define-color "schememod" "black")
|
||||
(define-color "schemevariablecol" "IdentifierColor")
|
||||
(printf "\\newcommand{\\schemevariable}[1]{{\\schemevariablecol{\\textsl{#1}}}}\n")
|
||||
(define-color "schemeerrorcol" "red")
|
||||
|
@ -232,6 +233,7 @@
|
|||
[(ldquo) "``"]
|
||||
[(rdquo) "''"]
|
||||
[(rsquo) "'"]
|
||||
[(prime) "$'$"]
|
||||
[(rarr) "$\\rightarrow$"]))]
|
||||
[else (display-protected (format "~s" i))])
|
||||
null)
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
(provide onscreen menuitem defterm
|
||||
schemefont schemevalfont schemeresultfont schemeidfont
|
||||
schemeparenfont schemekeywordfont schememetafont
|
||||
schemeparenfont schemekeywordfont schememetafont schememodfont
|
||||
file exec
|
||||
link procedure
|
||||
idefterm)
|
||||
|
@ -120,6 +120,8 @@
|
|||
(make-element "schemeparen" (decode-content str)))
|
||||
(define (schememetafont . str)
|
||||
(make-element "schememeta" (decode-content str)))
|
||||
(define (schememodfont . str)
|
||||
(make-element "schememod" (decode-content str)))
|
||||
(define (schemekeywordfont . str)
|
||||
(make-element "schemekeyword" (decode-content str)))
|
||||
(define (file . str)
|
||||
|
@ -808,12 +810,15 @@
|
|||
(let loop ([i i])
|
||||
(cond
|
||||
[(string? i)
|
||||
(let ([m (regexp-match #rx"^(.*)([()])(.*)$" i)])
|
||||
(if m
|
||||
(append (loop (cadr m))
|
||||
(list (caddr m))
|
||||
(loop (cadddr m)))
|
||||
(list (make-element 'italic (list i)))))]
|
||||
(cond
|
||||
[(regexp-match #rx"^(.*)([()])(.*)$" i)
|
||||
=> (lambda (m)
|
||||
(append (loop (cadr m))
|
||||
(list (caddr m))
|
||||
(loop (cadddr m))))]
|
||||
[else
|
||||
(list (make-element 'italic (list i)))])]
|
||||
[(eq? i 'rsquo) (list 'prime)]
|
||||
[else (list i)])))
|
||||
c)))))
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
(define-struct (sized-element element) (length))
|
||||
|
||||
(define-struct spaces (pre cnt post))
|
||||
|
||||
(define (typeset c multi-line? prefix1 prefix suffix color?)
|
||||
(let* ([c (syntax-ize c 0)]
|
||||
[content null]
|
||||
|
@ -78,25 +80,34 @@
|
|||
[(and (element? v)
|
||||
(= 1 (length (element-content v))))
|
||||
(sz-loop (car (element-content v)))]
|
||||
[(spaces? v)
|
||||
(+ (sz-loop (spaces-pre v))
|
||||
(spaces-cnt v)
|
||||
(sz-loop (spaces-post v)))]
|
||||
[else 1])))]
|
||||
[(v cls len)
|
||||
(unless (equal? v "")
|
||||
(if (equal? v "\n")
|
||||
(if multi-line?
|
||||
(begin
|
||||
(finish-line!)
|
||||
(out prefix cls))
|
||||
(out " " cls))
|
||||
(begin
|
||||
(set! content (cons ((if highlight?
|
||||
(lambda (c)
|
||||
(make-element "highlighted" (list c)))
|
||||
values)
|
||||
(if color?
|
||||
(make-element cls (list v))
|
||||
(make-element #f (list v))))
|
||||
content))
|
||||
(set! dest-col (+ dest-col len)))))]))
|
||||
(cond
|
||||
[(spaces? v)
|
||||
(out (spaces-pre v) cls 0)
|
||||
(out (make-element 'hspace (list (make-string (spaces-cnt v) #\space))) #f 0)
|
||||
(out (spaces-post v) cls len)]
|
||||
[(equal? v "\n")
|
||||
(if multi-line?
|
||||
(begin
|
||||
(finish-line!)
|
||||
(out prefix cls))
|
||||
(out " " cls))]
|
||||
[else
|
||||
(set! content (cons ((if highlight?
|
||||
(lambda (c)
|
||||
(make-element "highlighted" (list c)))
|
||||
values)
|
||||
(if color?
|
||||
(make-element cls (list v))
|
||||
(make-element #f (list v))))
|
||||
content))
|
||||
(set! dest-col (+ dest-col len))]))]))
|
||||
(define advance
|
||||
(case-lambda
|
||||
[(c init-line! delta)
|
||||
|
@ -168,12 +179,9 @@
|
|||
(define (literalize-spaces i)
|
||||
(let ([m (regexp-match-positions #rx" +" i)])
|
||||
(if m
|
||||
(make-element
|
||||
#f
|
||||
(list (literalize-spaces (substring i 0 (caar m)))
|
||||
(make-element 'hspace
|
||||
(list (substring i (caar m) (cdar m))))
|
||||
(literalize-spaces (substring i (cdar m)))))
|
||||
(make-spaces (literalize-spaces (substring i 0 (caar m)))
|
||||
(- (cdar m) (caar m))
|
||||
(literalize-spaces (substring i (cdar m))))
|
||||
i)))
|
||||
(define (loop init-line! quote-depth)
|
||||
(lambda (c)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
width: 10em;
|
||||
margin-right: 2em;
|
||||
text-align: left;
|
||||
background-color: #ddffdd;
|
||||
background-color: #F5F5DC;
|
||||
}
|
||||
|
||||
.tocviewtitle {
|
||||
|
@ -237,6 +237,11 @@
|
|||
font-family: Courier; font-size: 80%;
|
||||
}
|
||||
|
||||
.schememod {
|
||||
color: black;
|
||||
font-family: Courier; font-size: 80%;
|
||||
}
|
||||
|
||||
.schemeopt {
|
||||
color: black;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user