From f40958070d0005039a372278b4a436166a9f1b28 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 15 Jul 2010 14:51:01 -0600 Subject: [PATCH] Adding subsections to HTDP language primops docs (cherry picked from commit caca8046158978968b1e31b14e86f0597a50ad17) --- collects/scribblings/htdp-langs/prim-ops.rkt | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index d55b893f8d..69a01d20eb 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -47,7 +47,7 @@ (hspace 1)) (to-paragraph (typeset-type (cadr func))))) - + (define (prim-ops lib ctx-stx) (let ([ops (map (lambda (cat) (cons (car cat) @@ -93,21 +93,23 @@ (apply append (map (lambda (category) - (filter values - (map - (lambda (func) - (let ([id (datum->syntax ctx-stx (car func))]) - (and (not (ormap - (lambda (ns) - (free-label-identifier=? - id - (parameterize ([current-namespace ns]) - (namespace-syntax-introduce (datum->syntax #f (car func)))))) - not-in-ns)) - (let ([desc-strs (cddr func)]) - (defthing/proc - id - (to-paragraph (typeset-type (cadr func))) - (cons "Purpose: " desc-strs)))))) - (sort-category category)))) + (cons + (subsection #:tag-prefix (format "~a" lib) (car category)) + (filter values + (map + (lambda (func) + (let ([id (datum->syntax ctx-stx (car func))]) + (and (not (ormap + (lambda (ns) + (free-label-identifier=? + id + (parameterize ([current-namespace ns]) + (namespace-syntax-introduce (datum->syntax #f (car func)))))) + not-in-ns)) + (let ([desc-strs (cddr func)]) + (defthing/proc + id + (to-paragraph (typeset-type (cadr func))) + (cons "Purpose: " desc-strs)))))) + (sort-category category))))) ops)))))