simplify legend

master
Matthew Butterick 5 years ago
parent 00ad6225c3
commit 213c6cf384

@ -1,6 +1,9 @@
#lang racket/base
(require racket/dict "sku.rkt")
(provide (all-defined-out) (all-from-out "sku.rkt"))
(require racket/dict
racket/match
"sku.rkt")
(provide (all-defined-out)
(all-from-out "sku.rkt"))
(define (round-cents float)
@ -58,11 +61,10 @@
,@(map table-row (cdr grid))))
(define (people->string p)
(define p-string (format "~a"
(if (<= p 10)
(list-ref '(zero one two three four five six seven eight nine ten) p)
p)))
(string-append "up to " p-string " " (if (= p 1) "person" "people")))
(string-append (match p
[2 "12"]
[5 "35"]
[10 "610"]) " people"))
(require txexpr racket/string)
(define (textify x)

@ -490,6 +490,7 @@ text-align: center;
th {
font-family: "concourse-c4";
font-feature-settings: 'c2sc' 1;
font-weight: normal;
text-transform: lowercase;
font-size: 85%;