bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e9c1b7dc5e1d1014df7c231dab59e7298f8d74a1
parent b76ed3d3ae49b1f858f9ca170858a6ce95689bcb
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Wed, 21 Aug 2013 19:39:29 -0600

scribble/bnf: use 'roman for all BNF metasyntax

This change solves a long-standing problem with using @nonterm{}
inside @tt{} or other constructors that change the font, where
the font would be different (and uglier) than uses outside of font
changes.

original commit: 9f68533f82df6398e59d9190a61af12c34a5a1af

Diffstat:
Mpkgs/scribble-pkgs/scribble-lib/scribble/bnf.rkt | 25++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/bnf.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/bnf.rkt @@ -61,30 +61,33 @@ (interleave l alt)) (define (BNF-alt/close . l) - (interleave l " | ")) + (interleave l (make-element 'roman " | "))) - (define BNF-etc "...") + (define BNF-etc (make-element 'roman "...")) (define/kw (nonterm #:body s) - (make-element #f (append (list 'lang) - (list (make-element 'italic (decode-content s))) - (list 'rang)))) + (make-element 'roman (append (list 'lang) + (list (make-element 'italic (decode-content s))) + (list 'rang)))) (define/kw (optional #:body s) - (make-element #f (append (list "[") (decode-content s) (list "]")))) + (make-element #f (append (list (make-element 'roman "[")) + (decode-content s) + (list (make-element 'roman "]"))))) (define/kw (BNF-group #:body s) - (make-element #f (append (list "{") + (make-element #f (append (list (make-element 'roman "{")) (list (apply BNF-seq (decode-content s))) - (list "}")))) + (list (make-element 'roman "}"))))) (define/kw (kleenestar #:body s) - (make-element #f (append (decode-content s) (list "*")))) + (make-element #f (append (decode-content s) (list (make-element 'roman "*"))))) (define/kw (kleeneplus #:body s) (make-element #f (append (decode-content s) (list (make-element 'superscript (list "+")))))) (define/kw (kleenerange a b #:body s) (make-element #f (append (decode-content s) - (list (make-element 'superscript - (list (format "{~a,~a}" a b)))))))) + (list (make-element 'roman + (make-element 'superscript + (list (format "{~a,~a}" a b)))))))))