You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/quad/quadwriter/main.rkt

26 lines
751 B
Racket

6 years ago
#lang debug racket/base
(require (for-syntax racket/base)
quadwriter/core
pollen/tag
6 years ago
"lang-helper.rkt"
6 years ago
quad)
(provide (except-out (all-from-out racket/base) #%module-begin)
q)
(define q (default-tag-function 'q))
6 years ago
(define (doc-proc strs) (cons 'q strs))
(make-mb doc-proc)
6 years ago
(module+ reader
6 years ago
(require scribble/reader syntax/strip-context "lang-helper.rkt")
6 years ago
(provide (rename-out [quadwriter-rs read-syntax]))
(define (quadwriter-rs path-string p)
(define stxs (quad-at-reader path-string p))
(strip-context
(with-syntax ([STXS stxs]
[PDF-PATH (path-replace-extension path-string #".pdf")])
#'(module _ quadwriter/main
PDF-PATH
. STXS)))))