Add in more shortcuts, following Matthew's recent commit
Also, rackety
This commit is contained in:
parent
490a474e0e
commit
c627f9e734
|
@ -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,6 +165,12 @@
|
||||||
("vdash" "⊢")
|
("vdash" "⊢")
|
||||||
("dashv" "⊣")
|
("dashv" "⊣")
|
||||||
("cdot" "·")
|
("cdot" "·")
|
||||||
|
("sum" "∑")
|
||||||
|
("prod" "∏")
|
||||||
|
("coprod" "∐")
|
||||||
|
|
||||||
|
("int" "∫")
|
||||||
|
("oint" "∮")
|
||||||
|
|
||||||
("sqrt" "√")
|
("sqrt" "√")
|
||||||
|
|
||||||
|
@ -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)
|
|
||||||
(hash-for-each
|
|
||||||
ht
|
|
||||||
(λ (k v)
|
|
||||||
(unless (= 1 (length v))
|
(unless (= 1 (length v))
|
||||||
(printf "~s -> ~s\n" k v))))))
|
(eprintf "duplicate: ~s -> ~s\n" k v))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user