|
4 | 4 |
|
5 | 5 | namespace CSharpMath.Rendering {
|
6 | 6 | public static class TextAtoms {
|
7 |
| - public static Dictionary<string, string> PredefinedReplacementAliases { get; } = new Dictionary<string, string> { |
8 |
| - { "backslash", @"\" }, |
9 |
| - }; |
10 |
| - public static BiDictionary<string, string> PredefinedReplacements { get; } = new BiDictionary<string, string> { |
11 |
| - { "{", "{" }, |
12 |
| - { "}", "}" }, |
| 7 | + public static AliasDictionary<string, string> PredefinedTextSymbols { get; } = new AliasDictionary<string, string> { |
| 8 | + //https://en.wikibooks.org/wiki/LaTeX/Special_Characters |
| 9 | + { "€", "euro" }, |
| 10 | + { "°", "textdegree" }, |
| 11 | + { "℃", "celsius" }, |
| 12 | + |
| 13 | + //http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf page 14 (2 Body-text symbols) |
13 | 14 | { "%", "%" },
|
14 |
| - { "$", "$" }, |
15 |
| - { "_", "_" }, |
16 |
| - { "P", "¶" }, |
17 |
| - { "ddag", "‡" }, |
18 |
| - { "textbar", "|" }, |
19 |
| - { "textgreater", ">" }, |
20 |
| - { "textendash", "–" }, |
21 |
| - { "texttrademark", "™" }, |
22 |
| - { "textexclamdown", "¡" }, |
23 |
| - //textsuperscript |
24 |
| - { "pounds", "£" }, |
25 |
| - { "#", "#" }, |
26 | 15 | { "&", "&" },
|
27 |
| - { "S", "§" }, |
28 |
| - { "dag", "†" }, |
29 |
| - { "textbackslash", @"\" }, |
30 |
| - { "textless", "<" }, |
31 |
| - { "textemdash", "—" }, |
32 |
| - { "textregistered", "®" }, |
33 |
| - { "textquestiondown", "¿" }, |
34 |
| - //textcircled |
35 |
| - { "copyright", "©" }, |
| 16 | + { "#", "#" }, |
| 17 | + { "^", "textasciicircum" }, |
| 18 | + { "<", "textless" }, |
| 19 | + { "˜", "textasciitilde" }, |
| 20 | + { "ª", "textordfeminine" }, |
| 21 | + { "∗", "textasteriskcentered" }, |
| 22 | + { "º", "textordmasculine" }, |
| 23 | + { "∖", "textbackslash" }, |
| 24 | + { "¶", "P", "textparagraph" }, |
| 25 | + { "|", "textbar" }, |
| 26 | + { "·", "textperiodcentered" }, |
| 27 | + { "‖", "textbardbl" }, |
| 28 | + { "‱", "textpertenthousand" }, |
| 29 | + { "○", "textbigcircle" }, |
| 30 | + { "‰", "textperthousand" }, |
| 31 | + { "{", "{", "textbraceleft" }, |
| 32 | + { "¿", "textquestiondown" }, |
| 33 | + { "}", "}", "textbraceright" }, |
| 34 | + { "“", "textquotedblleft" }, |
| 35 | + { "•", "textbullet" }, |
| 36 | + { "”", "textquotedblright" }, |
| 37 | + { "©", "copyright", "textcopyright" }, |
| 38 | + { "‘", "textquoteleft" }, |
| 39 | + { "†", "dag", "textdagger" }, |
| 40 | + { "’", "textquoteright" }, |
| 41 | + { "‡", "ddag", "textdaggerdbl" }, |
| 42 | + { "®", "textregistered" }, |
| 43 | + { "$", "$", "textdollar" }, |
| 44 | + { "§", "S", "textsection" }, |
| 45 | + { "…", "textellipsis" }, |
| 46 | + { "£", "pounds", "textsterling" }, |
| 47 | + { "—", "textemdash" }, |
| 48 | + { "™", "texttrademark" }, |
| 49 | + { "–", "textendash" }, |
| 50 | + { "_", "_", "textunderscore" }, |
| 51 | + { "¡", "textexclamdown" }, |
| 52 | + { "␣", "textvisiblespace" }, |
| 53 | + { ">", "textgreater" }, |
36 | 54 | };
|
| 55 | + [System.Obsolete("Work in progress. Don't use because it won't work anyway.")] |
37 | 56 | public static BiDictionary<char, char> PredefinedAccents { get; } = new BiDictionary<char, char> {
|
38 |
| - |
39 |
| - { '`' , '\u0300' }, //grave |
| 57 | +#warning ___WIP___ |
| 58 | +#if false |
| 59 | + //textsuperscript, textsubscript |
| 60 | + //textcircled |
| 61 | + { '`' , '\u0300' }, //grave |
40 | 62 | { '\'' , '\u0301' }, //acute
|
41 | 63 | { '^' , '\u0302' }, //circumflex
|
42 | 64 | { '"' , '\u0308' }, //umlaut, trema or dieresis
|
43 | 65 | { '~' , '\u0303' }, //tilde
|
44 | 66 | { '.' , '\u0307' }, //dot
|
45 |
| - /*{ 'bar' , '\u0304' }, |
46 |
| - { 'overbar', '\u0305' }, //not in iosMath |
47 |
| - { 'breve' , '\u0306' }, |
48 |
| - { 'ovhook', '\u0309' }, //not in iosMath |
49 |
| - { 'ocirc', '\u030A' }, //not in iosMath |
50 |
| - { 'check' , '\u030C' }, |
51 |
| - { 'leftharpoonaccent', '\u20D0' }, //not in iosMath |
52 |
| - { 'rightharpoonaccent', '\u20D1' }, //not in iosMath |
53 |
| - { 'vertoverlay', '\u20D2' }, //not in iosMath |
54 |
| - { 'vec' , '\u20D7' }, |
55 |
| - { 'dddot', '\u20DB' }, //not in iosMath |
56 |
| - { 'ddddot', '\u20DC' }, //not in iosMath |
57 |
| - { 'widebridgeabove', '\u20E9' }, //not in iosMath |
58 |
| - { 'asteraccent', '\u20F0' }, //not in iosMath |
59 |
| - { 'threeunderdot', '\u20E8' } //not in iosMath*/ |
| 67 | + { 't', '\u20E9' }, //tie |
| 68 | + /*{ 'bar' , '\u0304' }, |
| 69 | + { 'overbar', '\u0305' }, //not in iosMath |
| 70 | + { 'breve' , '\u0306' }, |
| 71 | + { 'ovhook', '\u0309' }, //not in iosMath |
| 72 | + { 'ocirc', '\u030A' }, //not in iosMath |
| 73 | + { 'check' , '\u030C' }, |
| 74 | + { 'leftharpoonaccent', '\u20D0' }, //not in iosMath |
| 75 | + { 'rightharpoonaccent', '\u20D1' }, //not in iosMath |
| 76 | + { 'vertoverlay', '\u20D2' }, //not in iosMath |
| 77 | + { 'vec' , '\u20D7' }, |
| 78 | + { 'dddot', '\u20DB' }, //not in iosMath |
| 79 | + { 'ddddot', '\u20DC' }, //not in iosMath |
| 80 | + { 'asteraccent', '\u20F0' }, //not in iosMath |
| 81 | + { 'threeunderdot', '\u20E8' } //not in iosMath*/ |
| 82 | +#endif |
60 | 83 | };
|
61 | 84 |
|
62 | 85 | }
|
|
0 commit comments