-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net LaTeX projects #4
Comments
One good thing, one bad thing. Bad thing first: One concern that I have about using F# is that it is not supported under UWP (.NET Native). I have tried using this F# library on UWP half a year ago with no success. I tried everything from using the FSharp.Core Nuget package directly to decompiling the binary to C# and referencing it from the project. Either it fails to compile or throws System.TypeInitializationException at runtime. I ended up calling a JavaScript library in a WebView. Now on to the good thing. These two libraries can potentially be merged together. Both internally use a DrawingContext. We could have WPF and Xamarin.iOS supported together! Yay! 🎉 By the way, I am also tagging @verybadcat who you missed. |
@Happypig375 re XAML: it isn't actually a big deal for WPF-Math. Our users may create their own XAML controls and use the rendering logic from the library. It's actually the renderer that matters, not XAML. We're currently developing abstractions to decouple our library from WPF, but there's still more work to do for that. From my brief look at CSharpMath, it seems that it is highly-configurable, and if you provide all the interface implementations for Regarding the ways to combine WPF-Math and CSharpMath: at the moment I'm not sure. I can definitely see the CSharpMath potential (e.g. it seem to have implemented the features WPF-Math currently lacks, e.g. matrices) and I'll take a closer look at the implementation when I'll start working on similar features of WPF-Math. Although we'll need to think more about how to integrate our libraries into something bigger and better (if we eventually want to do it). I'm open for discussion. |
Yes unfortunately UWP support for F# is a problem and while it is hopefully temporary, Microsoft does seem to have brushed it under the carpet for now @cartermp. Now that @dsyme is going to work with Xamarin things could change as the problem makes F# somewhat toxic for writing libraries intended for use with Xamarin.Forms. The remaining work on support seems much smaller than it was a couple of years ago, only that there is no-one doing this work. The main advantage for using F# would be expressing recursive tree structures and parsing LaTeX into these structures can make things much easier than in non-functional languages. However if there is going to be a single C# project that is very well structured I will be happy to avoid multiplication of libraries and will try to contribute to that, albeit more slowly in C# than F#. The iosMath project that CSharpMath is based on has support for an editor https://github.com/kostub/MathEditor and a port of that could be feasible. |
I am glad to see this issue. I had never noticed WPFMath until this issue came along. About different front ends, yes, my intention is that it should be possible to plug them in without altering the base project. The big things you need are a font and a MathTable. The former is what you are going to draw; the latter tells you how much space you need to allow around your glyphs. Presumably WPFMath contains the same information in some form or another. |
Also, I don't think different languages in the core and front end projects should be a problem. |
And there is a decent chance that it will never be done.
I have heard that record types are to be added in C# 8. This should hopefully solve this problem.
Yup, record types should make it easier to structure a library well. It does sound like that CSharpMath and WPFMath can be merged together as the information needed
Yup. C# projects, F# projects, VB.NET projects etc. can all reference each other. But to distribute an entire library FSharp.Core is still needed to be referenced, which does not work on UWP, due to tail-calling MSIL etc. |
So, as a conclusion after a week of silence. Do we going to see new F# library? |
No definitive answer as of yet; @charlesroddie supports this idea and I am against it. Btw, thank you for re-igniting this discussion. |
@FoggyFinder There are two C# projects which derive from two OO projects in other languages. So there is a lot of existing OO work. In this context it doesn't make sense to port to F# now, even if it is more inherently suitable. I did start to port wpf-math because I thought I would have to work on the internals in order to eventually implement a LaTeX editor. But CSharpMath has the possibility to port over MathEditor. So my currently strategy is to wait for these things to happen and help where I can. If over the next few months there are roadblocks or I if I have to understand the workings of the libraries to implement a feature, then an F# port will emerge. |
I will try not to make that port happen ;) |
Just found this today: https://assetstore.unity.com/packages/tools/gui/texdraw-51426 Someone is charging money for that. |
One immediate downside of it is the sheer number of non-standard commands it uses. |
I'm still not sure about what to consider a "LaTeX standard". It's hard to distinct between standard and non-standard stuff in today's TeX installations. Regarding "that person": I believe that's a good man and we'll improve our project (and, well, the whole ecosystem of LaTeX-related projects) with help of people like that. Even if I have some difficulties communicating my requirements to people not familiar with git, that's my problem, and I will work harder to solve that. |
I think it should be a long-term goal to combine wpf-math and CSharpMath. The place to start is probably the Atom type (called Atom in wpf-math and MathAtom in CSharpMath I believe). I think we should be able to use the same code for this. (Allowing for Atoms that cannot be rendered if one project doesn't support them yet.) Then we can share the LaTeX parser and lexer. |
What name should the combined project be? |
I don't think that needs a decision now. A shared Atom project would have independent value even if the projects don't fully merge. Combining effort and ideas, simplifying the structure of the projects and reducing maintenance. @ForNeVeR @verybadcat @gsomix @alexreg does this make sense to you? |
@charlesroddie Agreed on the shared Atom structure, yes. |
In principle, I approve the idea. But to give a meaningful answer, I'll need to invest some time into reading CSharpMath sources and researching of its' own Atom (or Atom-like) structures/types. |
@ForNeVeR I will do the work. After all, CSharpMath's project structure is much bigger than wpf-math's. Please wait for my initial plan. (Will post here.) |
CSharpMath: road towards 0.1.0
The name of the new projectWhy?
I think it needs a decision these few days if not now.
WhatI have brainstormed a few names. Here are my top picks, starting from my favorite: MixiMath
FuseMath1,2,5 still applicable AtoMath1: The "atoms" of CSharp"Math" and wpf-"math" MathCore1: Just like .NET "Core" is the new .NET platform, it is the new CSharp"Math" and wpf-"math". HowI am going to create an organization with the final name (MixiMath for example). There will be three repositories initially. The people invited will include (rough plan):
Please do comment for improvements. |
There is so far no agreement on a merger of wpf-math and csharpmath but there is some agreement in principle about sharing code, specifically Atom/MathAtom, subject to investigating its feasibility. We can start a new repo to put relevant code/issues/documentation/metaissues in but I would not start three. If we do this now I would suggest for a name AtomicMath if you want something that sounds good, but the namespace should be MathAtom or Atom. This repo will be for creating a shared MathAtom type and possibly a parser that converts LaTeX math into a MathAtom. This project will be successful if it produces a good MathAtom type that the maintainers of wpf-math and csharpmath want to use. After that, who knows. The thing I am most interested is a github issue that we can start discussing the Atom type in. Given @Happypig375 's post I'll wait for a new repo to do that in. |
What about "Mathigrafia"? (from Greek Mathimatikí typografía aka mathematical typography). |
@charlesroddie I'll wait for @ForNeVeR's response to feed my thought. |
Not really |
It's a bit of a mouthful though, I reckon. I would suggest something like MathType or MathScript, but I think they're already taken by reasonably well-known software. |
@alexreg well, I didn't mean that our hypothetical LaTeX-focused project should be a part of Math.NET, but... Now, when you say that, that actually seems like a decent idea. Although I think that we'll need more certainty on our side before offering to join Math.NET. Let's keep this in mind but don't do any additional steps before we ship something usable. |
Well, I'll tag @cdrnet for potential thoguhts on this. |
@ForNeVeR Fair enough. |
@mathnet Would you consider us merging with you? |
This projects sounds very interesting! I'd be happy to work together with you on this, but we'd need to make sure that I cannot block you, i.e. no task like creating a new release should depend on me (as there may be phases of time where I cannot respond quickly). (btw: Math.NET Symbolics can also format its expressions in LaTeX) |
So, let's vote. I vote A. |
B for me. |
Hard choice, but my vote for |
B with a preference for MathDisplay.Net which could become Math.Net Display in future. |
These days, I tend to use "creative" names for end-user projects (i.e. executables), but "technical" names for library projects, so they would be easier to distinguish for the programmers involved in end-user projects. Consider yourself changing your work and entering a development of a math-based end-user solution. So, your first day at work, and you skim over the package lists to get a first look at what each of projects in your solution do. Probably it would be better for you to see
than
So, for a library project my vote goes for B. |
Just thinking about libraries I use in my own work, they tend to be descriptively named. So I vote B. |
A: 2 I guess descriptive naming wins. "MathDisplay.Net" seems to be the name that is the current consensus. Should we format the name as "MathDisplay.Net" or "MathDisplay.NET"? I prefer the latter as it aligns with "Math.NET" and ".NET" in general. |
I follow this pattern too. It seems most appropriate given whom libraries and programs are targeted at respectively. |
"MathDisplay.NET" it is then. |
@Happypig375 : Did the guy behind TeXDraw use some of CSharpMath libraries (parser, etc)? |
I don't believe @willnode is using CSharpMath or WpfMath in any way in his Unity package but he is welcome do to so and keep charging money as the licenses for both projects are MIT. |
The source code of CSharpMath is not well documented compared to Wpf-Math. It is hard to digest what is going on behind the scene. No vertical spacing also makes it unnecessarily harder. :-) |
@pstricks-fans What do you suggest to improve documentation? What do mean by vertical spacing? |
No empty lines between methods, no enough comments describing the used algorithm, etc. Suggestion: Provide at least a diagram describing how the execution flows from TeX input to rendered output. |
It will be nice if you provide us with a description on the main page about how the underlying mechanism used to process the TeX input to render the corresponding output. Which classes can be categorized into the common code base so they can be reused for various targets (Xamarin.Forms, Unity, Blazor web-assembly, and much more). Thank you! |
Thank you very much @Happypig375. |
Is there any update on getting this project ready for Math.NET? |
@yoshiask At this moment it is just an idea, no concrete plans yet. You can suggest a concrete plan though! |
Merge verybadcat/master into SymboLinker/master
Over the last year we seem to have a resurrection of https://github.com/ForNeVeR/wpf-math , which is based on JMathTex , and now CSharpMath , which is based on https://github.com/kostub/iosMath .
This is very promising. I am very interested in what the project maintainers think about this, how different these two projects are, and how they might develop.
I started looking at wpf-math and have just begun a port to F#, the main interest being to simplify the code structure to the point where I can add features: LaTeX editing, SkiaSharp, and rendering text + formulas. But this is a very big task, and would end up creating yet another .Net LaTeX project!
I would be keen to talk with anyone interested in .Net LaTeX here or on Skype (my user id is my public email here).
@ForNeVeR @Happypig375
The text was updated successfully, but these errors were encountered: