# -*- coding: utf-8 -*- module LaTeX module Decode class Symbols < Decoder @map = Hash[*%W{ textcolonmonetary ₡ textlira ₤ textnaira ₦ textwon ₩ textdong ₫ euro € texteuro € textnumero № texttrademark ™ leftarrow ← uparrow ↑ rightarrow → downarrow ↓ leftrightarrow ↔ updownarrow ↕ leadsto ↝ rightleftharpoons ⇌ Rightarrow ⇒ Leftrightarrow ⇔ forall ∀ complement ∁ partial ∂ exists ∃ nexists ∄ set ∅ Delta ∆ nabla ∇ in ∈ notin ∉ ni ∋ prod ∏ coprod ∐ sum ∑ mp ∓ dotplus ∔ setminus ∖ ast ∗ circ ∘ bullet ∙ surd √ propto ∝ infty ∞ angle ∠ measuredangle ∡ sphericalangle ∢ mid ∣ nmid ∤ parallel ∥ nparallel ∦ wedge ∧ vee ∨ cap ∩ cup ∪ int ∫ iint ∬ iiint ∭ oint ∮ therefore ∴ because ∵ sim ∼ backsim ∽ wr ≀ nsim ≁ simeq ≃ cong ≅ ncong ≇ approx ≈ approxeq ≊ asymp ≍ Bumpeq ≎ bumpeq ≏ doteq ≐ doteqdot ≑ fallingdotseq ≒ risingdotseq ≓ eqcirc ≖ circeq ≗ triangleq ≜ neq ≠ equiv ≡ leq ≤ geq ≥ leqq ≦ geqq ≧ lneqq ≨ gneqq ≩ ll ≪ gg ≫ between ≬ nless ≮ ngtr ≯ nleq ≰ ngeq ≱ lesssim ≲ gtrsim ≳ lessgtr ≶ gtrless ≷ prec ≺ succ ≻ preccurlyeq ≼ succcurlyeq ≽ precsim ≾ succsim ≿ nprec ⊀ nsucc ⊁ subset ⊂ supset ⊃ subseteq ⊆ supseteq ⊇ nsubseteq ⊈ nsupseteq ⊉ subsetneq ⊊ supsetneq ⊋ uplus ⊎ sqsubset ⊏ sqsupset ⊐ sqsubseteq ⊑ sqsupseteq ⊒ sqcap ⊓ sqcup ⊔ oplus ⊕ ominus ⊖ otimes ⊗ oslash ⊘ odot ⊙ circledcirc ⊚ circledast ⊛ circleddash ⊝ boxplus ⊞ boxminus ⊟ boxtimes ⊠ boxdot ⊡ vdash ⊢ dashv ⊣ top ⊤ bot ⊥ Vdash ⊩ Vvdash ⊪ nVdash ⊮ lhd ⊲ rhd ⊳ unlhd ⊴ unrhd ⊵ multimap ⊸ intercal ⊺ veebar ⊻ barwedge ⊼ bigwedge ⋀ bigvee ⋁ bigcap ⋂ bigcup ⋃ diamond ⋄ cdot ⋅ star ⋆ divideontimes ⋇ bowtie ⋈ ltimes ⋉ rtimes ⋊ leftthreetimes ⋋ rightthreetimes ⋌ backsimeq ⋍ curlyvee ⋎ curlywedge ⋏ Subset ⋐ Supset ⋑ Cap ⋒ Cup ⋓ pitchfork ⋔ lessdot ⋖ gtrdot ⋗ lll ⋘ ggg ⋙ lesseqgtr ⋚ gtreqless ⋛ curlyeqprec ⋞ curlyeqsucc ⋟ lnsim ⋦ gnsim ⋧ precnsim ⋨ succnsim ⋩ ntriangleleft ⋪ ntriangleright ⋫ ntrianglelefteq ⋬ ntrianglerighteq ⋭ vdots ⋮ cdots ⋯ ddots ⋱ lceil ⌈ rceil ⌉ lfloor ⌊ rfloor ⌋ Box □ spadesuit ♠ heartsuit ♡ diamondsuit ♢ clubsuit ♣ flat ♭ natural ♮ sharp ♯ tone5 ˥ tone4 ˦ tone3 ˧ tone2 ˨ tone1 ˩ ss ß , \u202F }.map { |s| LaTeX.to_unicode(s) }].freeze @patterns = [ /\\(#{ map.keys.map { |k| Regexp.escape(k) }.join('|') })(?:\{\}|\s+|\b)/ou ].freeze end end end