-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
Resolution/SupercededThe described announcement or pull request has been superceded.The described announcement or pull request has been superceded.Type/Announcement
Description
With the co[DEMONETIZED]us🦠 shutting down schools, I have had more time to work on CSharpMath lol 🚀
New additions
- A massive refactor and rename across CSharpMath (left: 0.3.0, right: 0.4.0)
- A new Avalonia front end! (Thanks @jp2masa!)

- CSharpMath.Editor improvements
- Enhanced slash (Divide after an expression should put the previous atom in the numerator #109)
- A blinking cursor
- Inner atom editing
- Large operator with limits editing
- New math mode symbol commands!
CSharpMath/CSharpMath/Atom/LaTeXSettings.cs
Lines 588 to 818 in de1458a
// Table 20: AMS Arrows //{ "dashrightarrow", new Relation("⇢") }, // Glyph not in Latin Modern Math //{ "dashleftarrow", new Relation("⇠") }, // Glyph not in Latin Modern Math { "leftleftarrows", new Relation("⇇") }, { "leftrightarrows", new Relation("⇆") }, { "Lleftarrow", new Relation("⇚") }, { "twoheadleftarrow", new Relation("↞") }, { "leftarrowtail", new Relation("↢") }, { "looparrowleft", new Relation("↫") }, { "leftrightharpoons", new Relation("⇋") }, { "curvearrowleft", new Relation("↶") }, { "circlearrowleft", new Relation("↺") }, { "Lsh", new Relation("↰") }, { "upuparrows", new Relation("⇈") }, { "upharpoonleft", new Relation("↿") }, { "downharpoonleft", new Relation("⇃") }, { "multimap", new Relation("⊸") }, { "leftrightsquigarrow", new Relation("↭") }, { "rightrightarrows", new Relation("⇉") }, { "rightleftarrows", new Relation("⇄") }, // Duplicate entry in LaTeX Symbol list: \rightrightarrows // Duplicate entry in LaTeX Symbol list: \rightleftarrows { "twoheadrightarrow", new Relation("↠") }, { "rightarrowtail", new Relation("↣") }, { "looparrowright", new Relation("↬") }, // \rightleftharpoons defined in Table 10 { "curvearrowright", new Relation("↷") }, { "circlearrowright", new Relation("↻") }, { "Rsh", new Relation("↱") }, { "downdownarrows", new Relation("⇊") }, { "upharpoonright", new Relation("↾") }, { "downharpoonright", new Relation("⇂") }, { "rightsquigarrow", new Relation("⇝") }, // Table 21: AMS Negated Arrows { "nleftarrow", new Relation("↚") }, { "nrightarrow", new Relation("↛") }, { "nLeftarrow", new Relation("⇍") }, { "nRightarrow", new Relation("⇏") }, { "nleftrightarrow", new Relation("↮") }, { "nLeftrightarrow", new Relation("⇎") }, // Table 22: AMS Greek // { "digamma", new Variable("ϝ") }, // Glyph not in Latin Modern Math { "varkappa", new Variable("ϰ") }, // Table 23: AMS Hebrew { "beth", new Ordinary("ℶ") }, { "daleth", new Ordinary("ℸ") }, { "gimel", new Ordinary("ℷ") }, // Table 24: AMS Miscellaneous // \hbar defined in Table 11 { "hslash", new Ordinary("ℏ") }, // Same as \hbar { "vartriangle", new Ordinary("△") }, // ▵ not in Latin Modern Math // ▵ is actually a triangle, not an inverted v as displayed in Visual Studio { "triangledown", new Ordinary("▽") }, // ▿ not in Latin Modern Math { "square", Placeholder }, { "lozenge", new Ordinary("◊") }, // { "circledS", new Ordinary("Ⓢ") }, // Glyph not in Latin Modern Math // \angle defined in Table 11 { "measuredangle", new Ordinary("∡") }, { "nexists", new Ordinary("∄") }, // \mho defined in Table 11 // { "Finv", new Ordinary("Ⅎ") }, // Glyph not in Latin Modern Math // { "Game", new Ordinary("⅁") }, // Glyph not in Latin Modern Math { "Bbbk", new Ordinary("𝐤") }, { "backprime", new Ordinary("‵") }, { "varnothing", new Ordinary("∅") }, // Same as \emptyset { "blacktriangle", new Ordinary("▲") }, // ▴ not in Latin Modern Math { "blacktriangledown", new Ordinary("▼") }, // ▾ not in Latin Modern Math { "blacksquare", new Ordinary("▪") }, { "blacklozenge", new Ordinary("♦") }, // ⧫ not in Latin Modern Math { "bigstar", new Ordinary("⋆") }, // ★ not in Latin Modern Math { "sphericalangle", new Ordinary("∢") }, { "complement", new Ordinary("∁") }, { "eth", new Ordinary("ð") }, // Same as \dh { "diagup", new Ordinary("/") }, // ╱ not in Latin Modern Math { "diagdown", new Ordinary("\\") }, // ╲ not in Latin Modern Math // Table 25: AMS Commands Defined to Work in Both Math and Text Mode { "checkmark", new Ordinary("✓") }, { "circledR", new Ordinary("®") }, { "maltese", new Ordinary("✠") }, // Table 26: AMS Binary Operators { "dotplus", new BinaryOperator("∔") }, { "smallsetminus", new BinaryOperator("∖") }, { "Cap", new BinaryOperator("⋒") }, { "Cup", new BinaryOperator("⋓") }, { "barwedge", new BinaryOperator("⌅") }, { "veebar", new BinaryOperator("⊻") }, // { "doublebarwedge", new BinaryOperator("⩞") }, //Glyph not in Latin Modern Math { "boxminus", new BinaryOperator("⊟") }, { "boxtimes", new BinaryOperator("⊠") }, { "boxdot", new BinaryOperator("⊡") }, { "boxplus", new BinaryOperator("⊞") }, { "divideontimes", new BinaryOperator("⋇") }, { "ltimes", new BinaryOperator("⋉") }, { "rtimes", new BinaryOperator("⋊") }, { "leftthreetimes", new BinaryOperator("⋋") }, { "rightthreetimes", new BinaryOperator("⋌") }, { "curlywedge", new BinaryOperator("⋏") }, { "curlyvee", new BinaryOperator("⋎") }, { "circleddash", new BinaryOperator("⊝") }, { "circledast", new BinaryOperator("⊛") }, { "circledcirc", new BinaryOperator("⊚") }, { "centerdot", new BinaryOperator("·") }, // Same as \cdot { "intercal", new BinaryOperator("⊺") }, // Table 27: AMS Binary Relations { "leqq", new Relation("≦") }, { "leqslant", new Relation("⩽") }, { "eqslantless", new Relation("⪕") }, { "lesssim", new Relation("≲") }, { "lessapprox", new Relation("⪅") }, { "approxeq", new Relation("≊") }, { "lessdot", new Relation("⋖") }, { "lll", new Relation("⋘") }, { "lessgtr", new Relation("≶") }, { "lesseqgtr", new Relation("⋚") }, { "lesseqqgtr", new Relation("⪋") }, { "doteqdot", new Relation("≑") }, { "risingdotseq", new Relation("≓") }, { "fallingdotseq", new Relation("≒") }, { "backsim", new Relation("∽") }, { "backsimeq", new Relation("⋍") }, // { "subseteqq", new Relation("⫅") }, // Glyph not in Latin Modern Math { "Subset", new Relation("⋐") }, // \sqsubset is defined in Table 8 { "preccurlyeq", new Relation("≼") }, { "curlyeqprec", new Relation("⋞") }, { "precsim", new Relation("≾") }, // { "precapprox", new Relation("⪷") }, // Glyph not in Latin Modern Math { "vartriangleleft", new Relation("⊲") }, { "trianglelefteq", new Relation("⊴") }, { "vDash", new Relation("⊨") }, { "Vvdash", new Relation("⊪") }, { "smallsmile", new Relation("⌣") }, //Same as \smile { "smallfrown", new Relation("⌢") }, //Same as \frown { "bumpeq", new Relation("≏") }, { "Bumpeq", new Relation("≎") }, { "geqq", new Relation("≧") }, { "geqslant", new Relation("⩾") }, { "eqslantgtr", new Relation("⪖") }, { "gtrsim", new Relation("≳") }, { "gtrapprox", new Relation("⪆") }, { "gtrdot", new Relation("⋗") }, { "ggg", new Relation("⋙") }, { "gtrless", new Relation("≷") }, { "gtreqless", new Relation("⋛") }, { "gtreqqless", new Relation("⪌") }, { "eqcirc", new Relation("≖") }, { "circeq", new Relation("≗") }, { "triangleq", new Relation("≜") }, { "thicksim", new Relation("∼") }, { "thickapprox", new Relation("≈") }, // { "supseteqq", new Relation("⫆") }, // Glyph not in Latin Modern Math { "Supset", new Relation("⋑") }, // \sqsupset is defined in Table 8 { "succcurlyeq", new Relation("≽") }, { "curlyeqsucc", new Relation("⋟") }, { "succsim", new Relation("≿") }, // { "succapprox", new Relation("⪸") }, // Glyph not in Latin Modern Math { "vartriangleright", new Relation("⊳") }, { "trianglerighteq", new Relation("⊵") }, { "Vdash", new Relation("⊩") }, { "shortmid", new Relation("∣") }, { "shortparallel", new Relation("∥") }, { "between", new Relation("≬") }, // { "pitchfork", new Relation("⋔") }, // Glyph not in Latin Modern Math { "varpropto", new Relation("∝") }, { "blacktriangleleft", new Relation("◀") }, // ◂ not in Latin Modern Math { "therefore", new Relation("∴") }, // { "backepsilon", new Relation("϶") }, // Glyph not in Latin Modern Math { "blacktriangleright", new Relation("▶") }, // ▸ not in Latin Modern Math { "because", new Relation("∵") }, // Table 28: AMS Negated Binary Relations // U+0338, an overlapping slant, is used as a workaround when Unicode has no matching character { "nless", new Relation("≮") }, { "nleq", new Relation("≰") }, { "nleqslant", new Relation("⩽\u0338") }, { "nleqq", new Relation("≦\u0338") }, { "lneq", new Relation("⪇") }, { "lneqq", new Relation("≨") }, // \lvertneqq -> ≨ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much { "lnsim", new Relation("⋦") }, { "lnapprox", new Relation("⪉") }, { "nprec", new Relation("⊀") }, { "npreceq", new Relation("⪯\u0338") }, { "precnsim", new Relation("⋨") }, // { "precnapprox", new Relation("⪹") }, // Glyph not in Latin Modern Math { "nsim", new Relation("≁") }, { "nshortmid", new Relation("∤") }, { "nmid", new Relation("∤") }, { "nvdash", new Relation("⊬") }, { "nvDash", new Relation("⊭") }, { "ntriangleleft", new Relation("⋪") }, { "ntrianglelefteq", new Relation("⋬") }, { "nsubseteq", new Relation("⊈") }, { "subsetneq", new Relation("⊊") }, // \varsubsetneq -> ⊊ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much // { "subsetneqq", new Relation("⫋") }, // Glyph not in Latin Modern Math // \varsubsetneqq -> ⫋ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much { "ngtr", new Relation("≯") }, { "ngeq", new Relation("≱") }, { "ngeqslant", new Relation("⩾\u0338") }, { "ngeqq", new Relation("≧\u0338") }, { "gneq", new Relation("⪈") }, { "gneqq", new Relation("≩") }, // \gvertneqq -> ≩ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much { "gnsim", new Relation("⋧") }, { "gnapprox", new Relation("⪊") }, { "nsucc", new Relation("⊁") }, { "nsucceq", new Relation("⪰\u0338") }, // Duplicate entry in LaTeX Symbol list: \nsucceq { "succnsim", new Relation("⋩") }, // { "succnapprox", new Relation("⪺") }, // Glyph not in Latin Modern Math { "ncong", new Relation("≇") }, { "nshortparallel", new Relation("∦") }, { "nparallel", new Relation("∦") }, { "nVdash", new Relation("⊮") }, // Error in LaTeX Symbol list: defined as \nvDash which duplicates above { "nVDash", new Relation("⊯") }, { "ntriangleright", new Relation("⋫") }, { "ntrianglerighteq", new Relation("⋭") }, { "nsupseteq", new Relation("⊉") }, // { "nsupseteqq", new Relation("⫆\u0338") }, // Glyph not in Latin Modern Math { "supsetneq", new Relation("⊋") }, // \varsupsetneq -> ⊋ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much // { "supsetneqq", new Relation("⫌") }, // Glyph not in Latin Modern Math // \varsupsetneqq -> ⫌ + U+FE00 (Variation Selector 1) Not dealing with variation selectors, thank you very much \colorboxes!

- More helpful error messages!

- MathButton and TextButton!
- Usage:
CSharpMath/CSharpMath.Forms.Example/CSharpMath.Forms.Example/Controls/MathKeyboard.xaml
Lines 159 to 161 in 824d0df
<f:MathButton x:Name="NumbersButton" Grid.Column="1" Command="{e:SwitchToTab Self={Reference this}, Target=Numbers}"> <f:MathView LaTeX="123"/> </f:MathButton> - This control is Xamarin.Forms only as Avalonia buttons can have arbitrary content including MathViews
- Usage:
- Built-in Cyrillic support!

- Bugs fixed: Arrows over vectors #37, Round trip conversion leads to invalid LaTeX #59, Some math fonts not showing up in android device #77
- CI for CSharpMath

- C# 8 nullable reference types enabled in the whole repo
- Removed dependency on the unmaintained SkiaSharp.Extended (Also fixes Some math fonts not showing up in android device #77)
What's next?
Since the exams, although delayed, are still coming up, I will need to temporarily leave once again. However, there are already a bunch of planned items for the next update once I come back. Stay tuned!
Leftovers from 0.2.0 checklist (see #104)
| Item | Comments |
|---|---|
| #4 Merge with wpf-math | After looking into wpf-math, it depends heavily on the WPF infrastructure and is hard to make cross-platform. In contrast, CSharpMath is built with cross-platform in mind upon creation. A most probable resolution would be CSharpMath supporting the non-WPF platforms while wpf-math stays on WPF to facilitate division of labor. |
| F# instead of C# | Not really feasible as rewriting an entire solution will be extremely time-consuming but for little benefit. A better way to introduce F# would be in an entirely new project - currently planned for 0.6.0 |
| Refactor TextAtoms and MathAtoms to have common atoms | The layout mechanism for MathAtoms and TextAtoms are too different for both atom hierarchies to unify. Not doing it. |
| Refactor MathAtoms to get rid of MathAtomType and AtomCloner | Done. All atoms now have a Clone() method. |
| Unit tests (and picture comparisons) | Done. Added as CSharpMath.Rendering.Tests |
| Tavis CI integration | Done. Added as GitHub Actions |
| An intuitive README for getting started | Will be done along with a new website. Currently planned for 0.6.0 - stay tuned! |
| Documentation on both NuGet and GitHub wiki | A website will be so much better. It will be much more maintainable and customizable. Probably won't do this. |
| Document release procedure | Done. Added as ReleaseProcedure.txt |
| Promote awareness!! | Postponed to after 0.6.0 when the website is complete |
| Native platform support for the popular ones | Maybe. Probably won't do every platform as utilizing CI to automatically run unit tests will be difficult. |
Implement \middle |
Potential 0.5.0 candidate |
| Optimize loading times of the Android example project | Potential 0.5.0 candidate |
Stay safe🦺, 💪stay healthy🧼 and 🥚🐇Happy Easter🐣🐰!
Supersedes #104.
jp2masa, FoggyFinder, charlesroddie and algebrainxFoggyFinder and algebrainxFoggyFinder and algebrainxFoggyFinder and algebrainx
Metadata
Metadata
Assignees
Labels
Resolution/SupercededThe described announcement or pull request has been superceded.The described announcement or pull request has been superceded.Type/Announcement

