| 
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260 | 
  (cond [(eq? (get-tag tx) 'link&)
         (let* ([url-ref (attr-ref tx 'ref)]
                [url (or (hash-ref link-urls url-ref #f)
                         (format "Missing reference: ~a" url-ref))])
           `(a [[href ,url]] ,@(get-elements tx)))]
        [else tx]))
;; Quicklink to another article
(define(html-xref . elems)  `(a [[href ,(format "~aarticles/~a.html" web-root (first elems))]
       [class "xref"]]
      ,@(rest elems)))
;; Footnotes
;;
;; Private use:
(define fn-names null)
(define fn-definitions (make-hash))
(define (fn-id x) (here-id (string-append x "_fn"))) | 
|
|
>
>
>
>
|
|
|
 | 
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
 | 
  (cond [(eq? (get-tag tx) 'link&)
         (let* ([url-ref (attr-ref tx 'ref)]
                [url (or (hash-ref link-urls url-ref #f)
                         (format "Missing reference: ~a" url-ref))])
           `(a [[href ,url]] ,@(get-elements tx)))]
        [else tx]))
;; Fast link to another article
(define html-xref
  (case-lambda
    [(title) `(a [[href ,(format "~aarticles/~a.html" web-root (normalize title))]
                  [class "xref"]]
                 (i ,title))]
    [elems `(a [[href ,(format "~aarticles/~a.html" web-root (first elems))]
                [class "xref"]]
               ,@(rest elems))]))
;; Footnotes
;;
;; Private use:
(define fn-names null)
(define fn-definitions (make-hash))
(define (fn-id x) (here-id (string-append x "_fn")))
 |