Add in more shortcuts, following Matthew's recent commit

Also, rackety
This commit is contained in:
Robby Findler 2012-12-10 11:38:01 -06:00
parent 490a474e0e
commit c627f9e734

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang racket/base
(require scheme/contract) (require racket/contract)
(define (string-len-one? x) (define (string-len-one? x)
(and (string? x) (and (string? x)
@ -165,7 +165,13 @@
("vdash" "") ("vdash" "")
("dashv" "") ("dashv" "")
("cdot" "·") ("cdot" "·")
("sum" "")
("prod" "")
("coprod" "")
("int" "")
("oint" "")
("sqrt" "") ("sqrt" "")
("skull" "") ("skull" "")
@ -179,18 +185,16 @@
)) ))
;; checks to see if there are duplicates
#; (module+ test
(define (find-dups) (require racket/match)
(let ([ht (make-hash)]) (define name-ht (make-hash))
(for-each (define val-ht (make-hash))
(λ (line) (for ([line (in-list tex-shortcut-table)])
(let ([name (list-ref line 0)] (match-define (list name obj) line)
[obj (list-ref line 1)]) (hash-set! name-ht name (cons obj (hash-ref name-ht name '()))))
(hash-set! ht name (cons obj (hash-ref ht name '()))))) (for ([(k v) (in-hash name-ht)])
tex-shortcut-table) (unless (= 1 (length v))
(hash-for-each (eprintf "duplicate: ~s -> ~s\n" k v))))
ht
(λ (k v)
(unless (= 1 (length v))
(printf "~s -> ~s\n" k v))))))