gui/collects/mrlib/tex-table.ss
Robby Findler b8574126bd moved the tex-table.ss file somewhere accessible and documented it
svn: r10708

original commit: 1858924c508d27211f98a52045b33a80e71cef44
2008-07-10 17:21:00 +00:00

186 lines
3.9 KiB
Scheme
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#lang scheme/base
(require scheme/contract)
(define (string-len-one? x)
(and (string? x)
(= 1 (string-length x))))
(provide/contract
[tex-shortcut-table
(listof (list/c string? string-len-one?))])
(define tex-shortcut-table
'(("Downarrow" "⇓")
("nwarrow" "↖")
("downarrow" "↓")
("Rightarrow" "⇒")
("rightarrow" "→")
("searrow" "↘")
("swarrow" "↙")
("leftarrow" "←")
("uparrow" "↑")
("Leftarrow" "⇐")
("longrightarrow" "")
("Uparrow" "⇑")
("Leftrightarrow" "⇔")
("updownarrow" "↕")
("leftrightarrow" "↔")
("nearrow" "↗")
("Updownarrow" "⇕")
;; arrows that didn't come out right in copy & paste
;←− \longleftarrow
;⇐= \Longleftarrow
;← 􏰂 \hookleftarrow
;←→ \longleftrightarrow
;􏰁 → \hookrightarrow
;⇐⇒ \Longleftrightarrow
;􏴲 \leadsto
;􏰃−→ \longmapsto
;=⇒ \Longrightarrow
;􏰃→ \mapsto
("aleph" "ℵ")
("prime" "")
("emptyset" "∅")
("nabla" "∇")
("diamondsuit" "♦")
("spadesuit" "♠")
("clubsuit" "♣")
("heartsuit" "♥")
("sharp" "♯")
("flat" "♭")
("natural" "♮")
("surd" "√")
("neg" "¬")
("triangle" "△")
("forall" "∀")
("exists" "∃")
("infty" "∞")
("circ" "∘")
("alpha" "α")
("theta" "θ")
("tau" "τ")
("beta" "β")
("vartheta" "ϑ")
("pi" "π")
("upsilon" "υ")
("gamma" "γ")
("varpi" "ϖ")
("phi" "φ")
("delta" "δ")
("kappa" "κ")
("rho" "ρ")
("varphi" "ϕ")
("epsilon" "ϵ")
("lambda" "λ")
("varrho" "ϱ")
("chi" "χ")
("varepsilon" "ε")
("mu" "µ")
("sigma" "σ")
("psi" "ψ")
("zeta" "ζ")
("nu" "ν")
("varsigma" "ς")
("omega" "ω")
("eta" "η")
("xi" "ξ")
("Gamma" "Γ")
("Lambda" "Λ")
("Sigma" "Σ")
("Psi" "Ψ")
("Delta" "∆")
("Xi" "Ξ")
("Upsilon" "Υ")
("Omega" "Ω")
("Theta" "Θ")
("Pi" "Π")
("Phi" "Φ")
("pm" "±")
("cap" "∩")
("diamond" "◇")
("oplus" "⊕")
("mp" "∓")
("cup" "")
("bigtriangleup" "△")
("ominus" "⊖")
("times" "×")
("uplus" "⊎")
("bigtriangledown" "▽")
("otimes" "⊗")
("div" "÷")
("sqcap" "⊓")
("triangleleft" "▹")
("oslash" "⊘")
("ast" "")
("sqcup" "⊔")
("vee" "")
("wedge" "∧")
("triangleright" "◃")
("odot" "⊙")
("star" "★")
("dagger" "†")
("bullet" "•")
("ddagger" "‡")
("wr" "≀")
("amalg" "⨿")
("leq" "≤")
("geq" "≥")
("equiv" "≡")
("models" "⊨")
("prec" "≺")
("succ" "≻")
("sim" "")
("perp" "⊥")
("preceq" "≼")
("succeq" "≽")
("simeq" "≃")
("ll" "≪")
("gg" "≫")
("asymp" "≍")
("parallel" "∥")
("subset" "⊂")
("supset" "⊃")
("approx" "≈")
("bowtie" "⋈")
("subseteq" "⊆")
("supseteq" "⊇")
("cong" "≌")
("sqsubsetb" "⊏")
("sqsupsetb" "⊐")
("neq" #;"≠" "≠")
("smile" "⌣")
("sqsubseteq" "⊑")
("sqsupseteq" "⊒")
("doteq" "≐")
("frown" "⌢")
("in" "∈")
("ni" "∋")
("propto" "∝")
("vdash" "⊢")
("dashv" "⊣")
("skull" "☠")
("smiley" "☺")
("blacksmiley" "☻")
("frownie" "☹")
))
;; checks to see if there are duplicates
#;
(define (find-dups)
(let ([ht (make-hash-table 'equal)])
(for-each
(λ (line)
(let ([name (list-ref line 0)]
[obj (list-ref line 1)])
(hash-table-put! ht name (cons obj (hash-table-get ht name '())))))
tex-shortcut-table)
(hash-table-for-each
ht
(λ (k v)
(unless (= 1 (length v))
(printf "~s -> ~s\n" k v))))))