diff --git a/collects/unstable/redex.rkt b/collects/unstable/gui/redex.rkt similarity index 98% rename from collects/unstable/redex.rkt rename to collects/unstable/gui/redex.rkt index fc83399698..02bd1c5da5 100644 --- a/collects/unstable/redex.rkt +++ b/collects/unstable/gui/redex.rkt @@ -1,4 +1,4 @@ -#lang racket +#lang racket/base (require racket/contract redex/reduction-semantics redex/pict @@ -126,9 +126,11 @@ (with-atomic-rewriter (cadr l) (let ([rw (car l)]) - (if (string? rw) - (lambda () (text rw (default-style) (default-font-size))) - rw)) + (cond [(string? rw) + (lambda () (text rw (default-style) (default-font-size)))] + [(pict? rw) + (lambda () rw)] + [else rw])) (with-atomic-rewriter* thunk (cddr l))))) (define (with-compound-rewriter* thunk l) (if (null? l) diff --git a/collects/unstable/scribblings/gui.scrbl b/collects/unstable/scribblings/gui.scrbl index 0fa089752c..8f4fd01819 100644 --- a/collects/unstable/scribblings/gui.scrbl +++ b/collects/unstable/scribblings/gui.scrbl @@ -12,5 +12,6 @@ @include-section["gui/pict.scrbl"] @include-section["gui/slideshow.scrbl"] @include-section["gui/pslide.scrbl"] +@include-section["gui/redex.scrbl"] @include-section["gui/snip.scrbl"] @include-section["gui/scribble.scrbl"] diff --git a/collects/unstable/scribblings/redex.scrbl b/collects/unstable/scribblings/gui/redex.scrbl similarity index 96% rename from collects/unstable/scribblings/redex.scrbl rename to collects/unstable/scribblings/gui/redex.scrbl index a314fe552c..7484f3bd3c 100644 --- a/collects/unstable/scribblings/redex.scrbl +++ b/collects/unstable/scribblings/gui/redex.scrbl @@ -1,15 +1,15 @@ #lang scribble/manual -@(require racket/stxparam scribble/base scribble/eval "utils.rkt" +@(require racket/stxparam scribble/base scribble/eval "../utils.rkt" (for-syntax racket/base syntax/srcloc) - (for-label racket/base racket/contract slideshow/pict redex unstable/redex)) + (for-label racket/base racket/contract slideshow/pict redex unstable/gui/redex)) @(define the-eval (make-base-eval)) -@(the-eval '(require redex/reduction-semantics redex/pict unstable/redex slideshow/pict)) +@(the-eval '(require redex/reduction-semantics redex/pict unstable/gui/redex slideshow/pict)) @title[#:tag "redex"]{Redex} @unstable-header[] -@defmodule[unstable/redex] +@defmodule[unstable/gui/redex] This library provides functions to help typesetting for @racketmodname[redex] models. The following example program provides @@ -50,7 +50,7 @@ notations. (add-atomic-rewriters! 'empty "∅" 'formula "φ" - 'ZZ "\u2124" + 'ZZ (text "Z" '(bold . modern) (default-font-size)) ;; "\u2124" doesn't work with latex/pdf output 'variable-not-otherwise-mentioned (lambda () (text "x, y, z, ..." (literal-style) (default-font-size))) 'true (lambda () (text "true" '(caps . modern) (default-font-size))) @@ -59,7 +59,7 @@ notations. 'same? (binary-rw " = ") 'in? (binary-rw " ∈ ") 'Set (bracket-rw 'curly) - 'Powerset (function-rw "𝒫 ") + 'Powerset (function-rw "P") ;; "𝒫 " doesn't work with latex/pdf output 'Union (binary-rw "∪") 'implies (binary-rw " ⇒ " #:parenthesize-left '(implies))) (with-rewriters diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index 6be8dcf4ea..2c44a38210 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -99,7 +99,6 @@ Keep documentation and tests up to date. @include-section["parameter-group.scrbl"] @include-section["pretty.scrbl"] @include-section["recontract.scrbl"] -@include-section["redex.scrbl"] @include-section["sandbox.scrbl"] @include-section["sequence.scrbl"] @include-section["string.scrbl"]