Sun Apr 25 19:23:57 CEST 2010 mjga...@gmail.com * Unicode display of LaTeX symbol codes.
-- Yi development mailing list yi-devel@googlegroups.com http://groups.google.com/group/yi-devel
New patches:
[Unicode display of LaTeX symbol codes. mjga...@gmail.com**20100425172357 Ignore-this: 7f1998b5024b80bf940c45cc32d0f0e9 ] hunk ./src/Yi/Lexer/Latex.x 12 { {-# OPTIONS -w #-} -module Yi.Lexer.Latex ( initState, alexScanToken, Token(..), HlState ) where +module Yi.Lexer.Latex ( initState, alexScanToken, Token(..), HlState, tokenToText ) where import Yi.Lexer.Alex import Yi.Style } hunk ./src/Yi/Lexer/Latex.x 52 initState :: HlState initState = 0 +tokenToText (Command "alpha") = Just "α" +tokenToText (Command "beta") = Just "β" +tokenToText (Command "gamma") = Just "γ" +tokenToText (Command "delta") = Just "δ" +tokenToText (Command "epsilon") = Just "â" +tokenToText (Command "varepsilon") = Just "ε" +tokenToText (Command "zeta") = Just "ζ" +tokenToText (Command "eta") = Just "η" +tokenToText (Command "theta") = Just "θ" +tokenToText (Command "vartheta") = Just "Ï" +tokenToText (Command "iota") = Just "ι" +tokenToText (Command "kappa") = Just "κ" +tokenToText (Command "lambda") = Just "λ" +tokenToText (Command "mu") = Just "μ" +tokenToText (Command "nu") = Just "ν" +tokenToText (Command "xi") = Just "ξ" +tokenToText (Command "pi") = Just "Ï" +tokenToText (Command "varpi") = Just "Ï" +tokenToText (Command "rho") = Just "Ï" +tokenToText (Command "varrho") = Just "ϱ" +tokenToText (Command "sigma") = Just "Ï" +tokenToText (Command "varsigma") = Just "Ï" +tokenToText (Command "tau") = Just "Ï" +tokenToText (Command "upsilon") = Just "Ï " +tokenToText (Command "phi") = Just "Ï" +tokenToText (Command "varphi") = Just "Ï" +tokenToText (Command "chi") = Just "Ï" +tokenToText (Command "psi") = Just "Ï" +tokenToText (Command "omega") = Just "Ï" +tokenToText (Command "Gamma") = Just "Î" +tokenToText (Command "Delta") = Just "Î" +tokenToText (Command "Theta") = Just "Î" +tokenToText (Command "Lambda") = Just "Î" +tokenToText (Command "Xi") = Just "Î" +tokenToText (Command "Pi") = Just "Î " +tokenToText (Command "Upsilon") = Just "Î¥" +tokenToText (Command "Phi") = Just "Φ" +tokenToText (Command "Psi") = Just "Ψ" +tokenToText (Command "Omega") = Just "Ω" +tokenToText (Command "leq") = Just "â¤" +tokenToText (Command "ll") = Just "âª" +tokenToText (Command "prec") = Just "âº" +tokenToText (Command "preceq") = Just "â¼" +tokenToText (Command "subset") = Just "â" +tokenToText (Command "subseteq") = Just "â" +tokenToText (Command "sqsubset") = Just "â" +tokenToText (Command "sqsubseteq") = Just "â" +tokenToText (Command "in") = Just "â" +tokenToText (Command "vdash") = Just "â¢" +tokenToText (Command "mid") = Just "â£" +tokenToText (Command "smile") = Just "â£" +tokenToText (Command "geq") = Just "â¥" +tokenToText (Command "gg") = Just "â«" +tokenToText (Command "succ") = Just "â»" +tokenToText (Command "succeq") = Just "â½" +tokenToText (Command "supset") = Just "â" +tokenToText (Command "supseteq") = Just "â" +tokenToText (Command "sqsupset") = Just "â" +tokenToText (Command "sqsupseteq") = Just "â" +tokenToText (Command "ni") = Just "â" +tokenToText (Command "dashv") = Just "â£" +tokenToText (Command "parallel") = Just "â¥" +tokenToText (Command "frown") = Just "â¢" +tokenToText (Command "notin") = Just "â" +tokenToText (Command "equiv") = Just "â¡" +tokenToText (Command "doteq") = Just "â" +tokenToText (Command "sim") = Just "â¼" +tokenToText (Command "simeq") = Just "â" +tokenToText (Command "approx") = Just "â" +tokenToText (Command "cong") = Just "â " +tokenToText (Command "Join") = Just "â" +tokenToText (Command "bowtie") = Just "â" +tokenToText (Command "propto") = Just "â" +tokenToText (Command "models") = Just "â¨" +tokenToText (Command "perp") = Just "â¥" +tokenToText (Command "asymp") = Just "â" +tokenToText (Command "neq") = Just "â " +tokenToText (Command "pm") = Just "±" +tokenToText (Command "cdot") = Just "â " +tokenToText (Command "times") = Just "Ã" +tokenToText (Command "cup") = Just "âª" +tokenToText (Command "sqcup") = Just "â" +tokenToText (Command "vee") = Just "â¨" +tokenToText (Command "oplus") = Just "â" +tokenToText (Command "odot") = Just "â" +tokenToText (Command "otimes") = Just "â" +tokenToText (Command "bigtriangleup") = Just "â³" +tokenToText (Command "lhd") = Just "â²" +tokenToText (Command "unlhd") = Just "â´" +tokenToText (Command "mp") = Just "â" +tokenToText (Command "div") = Just "÷" +tokenToText (Command "setminus") = Just "â" +tokenToText (Command "cap") = Just "â©" +tokenToText (Command "sqcap") = Just "â" +tokenToText (Command "wedge") = Just "â§" +tokenToText (Command "ominus") = Just "â" +tokenToText (Command "oslash") = Just "â" +tokenToText (Command "bigcirc") = Just "â" +tokenToText (Command "bigtriangledown") = Just "â½" +tokenToText (Command "rhd") = Just "â³" +tokenToText (Command "unrhd") = Just "âµ" +tokenToText (Command "triangleleft") = Just "â" +tokenToText (Command "triangleright") = Just "â·" +tokenToText (Command "star") = Just "â" +tokenToText (Command "ast") = Just "â" +tokenToText (Command "circ") = Just "â" +tokenToText (Command "bullet") = Just "â" +tokenToText (Command "diamond") = Just "â" +tokenToText (Command "uplus") = Just "â" +tokenToText (Command "dagger") = Just "â " +tokenToText (Command "ddagger") = Just "â¡" +tokenToText (Command "wr") = Just "â" +tokenToText (Command "sum") = Just "â" +tokenToText (Command "prod") = Just "â" +tokenToText (Command "coprod") = Just "â" +tokenToText (Command "int") = Just "â«" +tokenToText (Command "bigcup") = Just "â" +tokenToText (Command "bigcap") = Just "â" +tokenToText (Command "bigsqcup") = Just "â" +tokenToText (Command "oint") = Just "â®" +tokenToText (Command "bigvee") = Just "â" +tokenToText (Command "bigwedge") = Just "â" +tokenToText (Command "bigoplus") = Just "â" +tokenToText (Command "bigotimes") = Just "â" +tokenToText (Command "bigodot") = Just "â" +tokenToText (Command "biguplus") = Just "â" +tokenToText (Command "leftarrow") = Just "â" +tokenToText (Command "rightarrow") = Just "â" +tokenToText (Command "leftrightarrow") = Just "â" +tokenToText (Command "Leftarrow") = Just "â" +tokenToText (Command "Rightarrow") = Just "â" +tokenToText (Command "Leftrightarrow") = Just "â" +tokenToText (Command "mapsto") = Just "â¦" +tokenToText (Command "hookleftarrow") = Just "â©" +tokenToText (Command "leftharpoonup") = Just "â¼" +tokenToText (Command "leftharpoondown") = Just "â½" +tokenToText (Command "hookrightarrow") = Just "âª" +tokenToText (Command "rightharpoonup") = Just "â" +tokenToText (Command "rightharpoondown") = Just "â" +tokenToText (Command "longleftarrow") = Just "â" +tokenToText (Command "longrightarrow") = Just "â" +tokenToText (Command "longleftrightarrow") = Just "â" +tokenToText (Command "Longleftarrow") = Just "â" +tokenToText (Command "Longrightarrow") = Just "â" +tokenToText (Command "Longleftrightarrow") = Just "â" +tokenToText (Command "longmapsto") = Just "â" +tokenToText (Command "uparrow") = Just "â" +tokenToText (Command "downarrow") = Just "â" +tokenToText (Command "updownarrow") = Just "â" +tokenToText (Command "Uparrow") = Just "â" +tokenToText (Command "Downarrow") = Just "â" +tokenToText (Command "Updownarrow") = Just "â" +tokenToText (Command "nearrow") = Just "â" +tokenToText (Command "searrow") = Just "â" +tokenToText (Command "swarrow") = Just "â" +tokenToText (Command "nwarrow") = Just "â" +tokenToText (Command "leadsto") = Just "â" +tokenToText (Command "dots") = Just "â¦" +tokenToText (Command "cdots") = Just "â¯" +tokenToText (Command "vdots") = Just "â®" +tokenToText (Command "ddots") = Just "â±" +tokenToText (Command "hbar") = Just "â" +tokenToText (Command "ell") = Just "â" +tokenToText (Command "Re") = Just "â" +tokenToText (Command "Im") = Just "â" +tokenToText (Command "aleph") = Just "×" +tokenToText (Command "wp") = Just "â" +tokenToText (Command "forall") = Just "â" +tokenToText (Command "exists") = Just "â" +tokenToText (Command "mho") = Just "â§" +tokenToText (Command "partial") = Just "â" +tokenToText (Command "prime") = Just "â²" +tokenToText (Command "emptyset") = Just "â " +tokenToText (Command "infty") = Just "â" +tokenToText (Command "nabla") = Just "â" +tokenToText (Command "triangle") = Just "â³" +tokenToText (Command "Box") = Just "â¡" +tokenToText (Command "Diamond") = Just "â" +tokenToText (Command "bot") = Just "â¥" +tokenToText (Command "top") = Just "â¤" +tokenToText (Command "angle") = Just "â " +tokenToText (Command "surd") = Just "â" +tokenToText (Command "diamondsuit") = Just "â¢" +tokenToText (Command "heartsuit") = Just "â¡" +tokenToText (Command "clubsuit") = Just "â£" +tokenToText (Command "spadesuit") = Just "â " +tokenToText (Command "neg") = Just "¬" +tokenToText (Command "flat") = Just "â" +tokenToText (Command "natural") = Just "â®" +tokenToText (Command "sharp") = Just "â¯" +tokenToText (Command "digamma") = Just "Ï" +tokenToText (Command "varkappa") = Just "ϰ" +tokenToText (Command "beth") = Just "×" +tokenToText (Command "daleth") = Just "×" +tokenToText (Command "gimel") = Just "×" +tokenToText (Command "lessdot") = Just "â" +tokenToText (Command "leqslant") = Just "â¤" +tokenToText (Command "leqq") = Just "â¦" +tokenToText (Command "lll") = Just "â" +tokenToText (Command "lesssim") = Just "â²" +tokenToText (Command "lessgtr") = Just "â¶" +tokenToText (Command "lesseqgtr") = Just "â" +tokenToText (Command "preccurlyeq") = Just "â¼" +tokenToText (Command "curlyeqprec") = Just "â" +tokenToText (Command "precsim") = Just "â¾" +tokenToText (Command "Subset") = Just "â" +tokenToText (Command "sqsubset") = Just "â" +tokenToText (Command "therefore") = Just "â´" +tokenToText (Command "smallsmile") = Just "â£" +tokenToText (Command "vartriangleleft") = Just "â²" +tokenToText (Command "trianglelefteq") = Just "â´" +tokenToText (Command "gtrdot") = Just "â" +tokenToText (Command "geqq") = Just "â§" +tokenToText (Command "ggg") = Just "â" +tokenToText (Command "gtrsim") = Just "â³" +tokenToText (Command "gtrless") = Just "â·" +tokenToText (Command "gtreqless") = Just "â" +tokenToText (Command "succcurlyeq") = Just "â½" +tokenToText (Command "curlyeqsucc") = Just "â" +tokenToText (Command "succsim") = Just "â¿" +tokenToText (Command "Supset") = Just "â" +tokenToText (Command "sqsupset") = Just "â" +tokenToText (Command "because") = Just "âµ" +tokenToText (Command "shortparallel") = Just "â¥" +tokenToText (Command "smallfrown") = Just "â¢" +tokenToText (Command "vartriangleright") = Just "â³" +tokenToText (Command "trianglerighteq") = Just "âµ" +tokenToText (Command "doteqdot") = Just "â" +tokenToText (Command "risingdotseq") = Just "â" +tokenToText (Command "fallingdotseq") = Just "â" +tokenToText (Command "eqcirc") = Just "â" +tokenToText (Command "circeq") = Just "â" +tokenToText (Command "triangleq") = Just "â" +tokenToText (Command "bumpeq") = Just "â" +tokenToText (Command "Bumpeq") = Just "â" +tokenToText (Command "thicksim") = Just "â¼" +tokenToText (Command "thickapprox") = Just "â" +tokenToText (Command "approxeq") = Just "â" +tokenToText (Command "backsim") = Just "â½" +tokenToText (Command "vDash") = Just "â¨" +tokenToText (Command "Vdash") = Just "â©" +tokenToText (Command "Vvdash") = Just "âª" +tokenToText (Command "backepsilon") = Just "â" +tokenToText (Command "varpropto") = Just "â" +tokenToText (Command "between") = Just "â¬" +tokenToText (Command "pitchfork") = Just "â" +tokenToText (Command "blacktriangleleft") = Just "â" +tokenToText (Command "blacktriangleright") = Just "â·" +tokenToText (Command "dashleftarrow") = Just "â " +tokenToText (Command "leftleftarrows") = Just "â" +tokenToText (Command "leftrightarrows") = Just "â" +tokenToText (Command "Lleftarrow") = Just "â" +tokenToText (Command "twoheadleftarrow") = Just "â" +tokenToText (Command "leftarrowtail") = Just "â¢" +tokenToText (Command "leftrightharpoons") = Just "â" +tokenToText (Command "Lsh") = Just "â°" +tokenToText (Command "looparrowleft") = Just "â«" +tokenToText (Command "curvearrowleft") = Just "â¶" +tokenToText (Command "circlearrowleft") = Just "âº" +tokenToText (Command "dashrightarrow") = Just "â¢" +tokenToText (Command "rightrightarrows") = Just "â" +tokenToText (Command "rightleftarrows") = Just "â" +tokenToText (Command "Rrightarrow") = Just "â" +tokenToText (Command "twoheadrightarrow") = Just "â " +tokenToText (Command "rightarrowtail") = Just "â£" +tokenToText (Command "rightleftharpoons") = Just "â" +tokenToText (Command "Rsh") = Just "â±" +tokenToText (Command "looparrowright") = Just "â¬" +tokenToText (Command "curvearrowright") = Just "â·" +tokenToText (Command "circlearrowright") = Just "â»" +tokenToText (Command "multimap") = Just "â¸" +tokenToText (Command "upuparrows") = Just "â" +tokenToText (Command "downdownarrows") = Just "â" +tokenToText (Command "upharpoonleft") = Just "â¿" +tokenToText (Command "upharpoonright") = Just "â¾" +tokenToText (Command "downharpoonleft") = Just "â" +tokenToText (Command "downharpoonright") = Just "â" +tokenToText (Command "rightsquigarrow") = Just "â" +tokenToText (Command "leftrightsquigarrow") = Just "â" +tokenToText (Command "dotplus") = Just "â" +tokenToText (Command "ltimes") = Just "â" +tokenToText (Command "Cup") = Just "â" +tokenToText (Command "veebar") = Just "â»" +tokenToText (Command "boxplus") = Just "â" +tokenToText (Command "boxtimes") = Just "â " +tokenToText (Command "leftthreetimes") = Just "â" +tokenToText (Command "curlyvee") = Just "â" +tokenToText (Command "centerdot") = Just "â " +tokenToText (Command "rtimes") = Just "â" +tokenToText (Command "Cap") = Just "â" +tokenToText (Command "barwedge") = Just "â¼" +tokenToText (Command "boxminus") = Just "â" +tokenToText (Command "boxdot") = Just "â¡" +tokenToText (Command "rightthreetimes") = Just "â" +tokenToText (Command "curlywedge") = Just "â" +tokenToText (Command "intercal") = Just "âº" +tokenToText (Command "divideontimes") = Just "â" +tokenToText (Command "smallsetminus") = Just "â" +tokenToText (Command "circleddash") = Just "â" +tokenToText (Command "circledcirc") = Just "â" +tokenToText (Command "circledast") = Just "â" +tokenToText (Command "hbar") = Just "â" +tokenToText (Command "hslash") = Just "â" +tokenToText (Command "square") = Just "â¡" +tokenToText (Command "blacksquare") = Just "â " +tokenToText (Command "circledS") = Just "â" +tokenToText (Command "vartriangle") = Just "â³" +tokenToText (Command "blacktriangle") = Just "â²" +tokenToText (Command "complement") = Just "â" +tokenToText (Command "triangledown") = Just "â½" +tokenToText (Command "blacktriangledown") = Just "â¼" +tokenToText (Command "lozenge") = Just "â" +tokenToText (Command "blacklozenge") = Just "â" +tokenToText (Command "bigstar") = Just "â " +tokenToText (Command "angle") = Just "â " +tokenToText (Command "measuredangle") = Just "â¡" +tokenToText (Command "sphericalangle") = Just "â¢" +tokenToText (Command "backprime") = Just "âµ" +tokenToText (Command "nexists") = Just "â" +tokenToText (Command "Finv") = Just "â²" +tokenToText (Command "varnothing") = Just "â " +tokenToText (Command "eth") = Just "ð" +tokenToText (Command "mho") = Just "â§" +tokenToText (Command "AA") = Just "à " +tokenToText (Command "euro") = Just "â¬" +tokenToText (Command "degree") = Just "°" +tokenToText (Command "lnot") = Just "¬" +tokenToText (Command "textdegree") = Just "°" +tokenToText (Command "textlnot") = Just "¬" +tokenToText (Command "textsurd") = Just "â" +tokenToText (Command "textdiv") = Just "÷" +tokenToText (Command "textpm") = Just "±" +tokenToText _ = Nothing #include "common.hsinc" } hunk ./src/Yi/Mode/Latex.hs 30 modeName = "fast latex", modeHL = ExtHL $ mkHighlighter (IncrParser.scanner OnlineTree.manyToks . latexLexer), - modeGetStrokes = tokenBasedStrokes Latex.tokenToStroke + modeGetStrokes = tokenBasedStrokes Latex.tokenToStroke, + modeGetAnnotations = tokenBasedAnnots Latex.tokenToAnnot } -- | syntax-based latex mode hunk ./src/Yi/Mode/Latex.hs 41 modeName = "latex", modeHL = ExtHL $ mkHighlighter (IncrParser.scanner Latex.parse . latexLexer), - modeGetStrokes = \t point begin end -> Latex.getStrokes point begin end t + modeGetStrokes = \t point begin end -> Latex.getStrokes point begin end t, + modeGetAnnotations = tokenBasedAnnots Latex.tokenToAnnot } -- | syntax-based latex mode hunk ./src/Yi/Mode/Latex.hs 52 modeName = "latex", modeHL = ExtHL $ Driver.mkHighlighter (IncrParser.scanner Latex.parse . latexLexer), - modeGetStrokes = \t point begin end -> Latex.getStrokes point begin end t + modeGetStrokes = \t point begin end -> Latex.getStrokes point begin end t, + modeGetAnnotations = tokenBasedAnnots Latex.tokenToAnnot } hunk ./src/Yi/Syntax/Latex.hs 130 tokenToStroke :: TT -> Stroke tokenToStroke = fmap tokenToStyle . tokToSpan +tokenToAnnot :: TT -> Maybe (Span String) +tokenToAnnot = sequenceA . tokToSpan . fmap tokenToText + tokenToStyle :: Token -> StyleName tokenToStyle t = case t of Context: [Update C lexer for special comments (e.g. "/**") jeffwhee...@gmail.com**20100423061210 Ignore-this: 281958beb016887d106e1697e1ac5333 I suspect there's a better way to do thos. What is it? ] [added my config file to Users anders...@gmail.com**20100422194545 Ignore-this: 79eddfaf6526c4158084aeaf44bb8d80 ] [Export some CUA functions and fix Gtk imports issue Hamish Mackenzie <hamish.k.macken...@googlemail.com>**20100412063404 Ignore-this: ca47d5d9e15e04b98b40d2f0075529db ] [More progress on Yi.UI.Pango.Control Hamish Mackenzie <hamish.k.macken...@googlemail.com>**20100404103555 Ignore-this: 212c8aec438a6a0742f2690242f352a4 ] [IReader.hs: switch M-Del to M-0 gwe...@gmail.com**20100325154110 Ignore-this: 8a220d97977e5db509d7b6b344611ea M-Del doesn't work with urxvt, it seems, and I am doubtful it works in general. But M-0 will work or fail with the other bindings. ] [Cleanup syntax files jeffwhee...@gmail.com**20100326043211 Ignore-this: 714d6df1f570a4de23fb052b04e93944 ] [Significant cleanup, -Wall to Yi.Syntax.Tree jeffwhee...@gmail.com**20100325075221 Ignore-this: a106e842ae56b004edab83cf7dea5f0f ] [Cleanup Yi.Syntax.Tree (replace local function with Control.Arrow's `first`) jeffwhee...@gmail.com**20100325063218 Ignore-this: 1819a1e305d5d52b0fef28b048141dfb ] [Fix documentation formatting (remove broken linkification) jeffwhee...@gmail.com**20100325063013 Ignore-this: 7bcc3f61408f4c6df696f76445aaeee3 ] [-Wall (RecursiveDo -> DoRec, requires 6.12) jeffwhee...@gmail.com**20100325053035 Ignore-this: 36c0c99feadf155016ce86219f5f5580 ] [Display errors in configuration in both cold boot and reload jeffwhee...@gmail.com**20100325031845 Ignore-this: 11b26dd4e1ab79736610723afe8b2cb0 ] [TAG 0.6.2.2 jeffwhee...@gmail.com**20100324171312 Ignore-this: 729a069566b7090ea9de3d2a9038f4c7 ] Patch bundle hash: 2a25e2dccfc37b07c7638c9fc89ad610bc19a1f7