|
|
|
@ -1,9 +1,20 @@
|
|
|
|
|
#lang at-exp racket/base
|
|
|
|
|
(require (for-syntax racket/base racket/syntax) scribble/core scribble/manual scribble/private/manual-sprop scribble/decode scribble/html-properties racket/runtime-path racket/format)
|
|
|
|
|
(require (for-syntax racket/base
|
|
|
|
|
racket/syntax)
|
|
|
|
|
racket/format
|
|
|
|
|
racket/runtime-path
|
|
|
|
|
scribble/core
|
|
|
|
|
scribble/decode
|
|
|
|
|
scribble/html-properties
|
|
|
|
|
scribble/latex-properties
|
|
|
|
|
scribble/manual
|
|
|
|
|
scribble/private/manual-sprop)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(provide (all-defined-out) (all-from-out racket/runtime-path))
|
|
|
|
|
|
|
|
|
|
(define-runtime-path mb-css "mb.css")
|
|
|
|
|
(define-runtime-path mb-tex "mb.tex")
|
|
|
|
|
|
|
|
|
|
(define (link-tt url) (link url (tt url)))
|
|
|
|
|
|
|
|
|
@ -13,17 +24,18 @@
|
|
|
|
|
(define (fileblock filename . inside)
|
|
|
|
|
(compound-paragraph
|
|
|
|
|
(style "fileblock" (list* (alt-tag "div") 'multicommand
|
|
|
|
|
(box-mode "RfileboxBoxT" "RfileboxBoxC" "RfileboxBoxB")
|
|
|
|
|
(box-mode "RfileboxBoxT" "RfileboxBoxC" "RfileboxBoxB")
|
|
|
|
|
(tex-addition mb-tex)
|
|
|
|
|
scheme-properties))
|
|
|
|
|
(list
|
|
|
|
|
(paragraph (style "fileblock_filetitle" (list* (alt-tag "div") (box-mode* "RfiletitleBox") scheme-properties))
|
|
|
|
|
(paragraph (style "fileblockFiletitle" (list* (alt-tag "div") (box-mode* "RfiletitleBox") (tex-addition mb-tex) scheme-properties))
|
|
|
|
|
(list (make-element
|
|
|
|
|
(style "fileblock_filename" (list (css-style-addition mb-css)))
|
|
|
|
|
(style "fileblockFilename" (list (css-style-addition mb-css) (tex-addition mb-tex)))
|
|
|
|
|
(if (string? filename)
|
|
|
|
|
(filepath filename)
|
|
|
|
|
filename))))
|
|
|
|
|
(compound-paragraph
|
|
|
|
|
(style "fileblock_filecontent" (list* (alt-tag "div") (box-mode* "RfilecontentBox") scheme-properties))
|
|
|
|
|
(style "fileblockFilecontent" (list* (alt-tag "div") (box-mode* "RfilecontentBox") (tex-addition mb-tex) scheme-properties))
|
|
|
|
|
(decode-flow inside)))))
|
|
|
|
|
|
|
|
|
|
(define (convert-newlines args)
|
|
|
|
@ -36,17 +48,28 @@
|
|
|
|
|
(nested (racketerror (racketfont* (convert-newlines args)))))
|
|
|
|
|
|
|
|
|
|
(define (foreign-code . args)
|
|
|
|
|
(compound-paragraph (style "foreign-code" (list (css-style-addition mb-css) (alt-tag "div"))) (list (apply verbatim args))))
|
|
|
|
|
(compound-paragraph (style "foreignCode" (list (css-style-addition mb-css)
|
|
|
|
|
(alt-tag "div")
|
|
|
|
|
(tex-addition mb-tex)))
|
|
|
|
|
(list (apply verbatim args))))
|
|
|
|
|
|
|
|
|
|
(define (terminal . args)
|
|
|
|
|
(compound-paragraph (style "terminal" (list (css-style-addition mb-css) (alt-tag "div"))) (list (apply verbatim args))))
|
|
|
|
|
(compound-paragraph (style "terminal" (list (css-style-addition mb-css)
|
|
|
|
|
(alt-tag "div")
|
|
|
|
|
(tex-addition mb-tex)))
|
|
|
|
|
(list (apply verbatim args))))
|
|
|
|
|
|
|
|
|
|
(define (browser . args)
|
|
|
|
|
(compound-paragraph (style "browser" (list (css-style-addition mb-css) (alt-tag "div"))) (list (paragraph (style #f null) (convert-newlines args)))))
|
|
|
|
|
(compound-paragraph (style "browser" (list (css-style-addition mb-css)
|
|
|
|
|
(alt-tag "div")
|
|
|
|
|
(tex-addition mb-tex)))
|
|
|
|
|
(list (paragraph (style #f null) (convert-newlines args)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (noskip-note)
|
|
|
|
|
(nested #:style (style "noskip" (list (css-style-addition mb-css) (alt-tag "div")))
|
|
|
|
|
(nested #:style (style "noskip" (list (css-style-addition mb-css)
|
|
|
|
|
(alt-tag "div")
|
|
|
|
|
(tex-addition mb-tex)))
|
|
|
|
|
(margin-note "Don’t skip this section! It explains an essential Pollen concept.")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|