Closed yamamoto-reki closed 6 years ago
Well, that's a good idea and it's a direction I'd like the project to evolve.
Yes, we could add a source range information to Atom
s and, in extension, to Box
es. It shouldn't be too hard to implement (although it'll be a bit tricky in the command handling code because currently it loses the original source information inside of the command).
Definitely. I think these are generally called source “spans” in compiler terminology. We’d probably want to transition to a proper parser first though, to make the job easier. @Fornever, how far did you get with integrating TeX.NET into this project?
@alexreg it looks like you missed the word "parser" in your comment ,)
Unfortunately, I haven't integrated anything from TeX.NET. I think I've built the project though, and that's all for now.
Actually I've already coded it. Can I do the pull request?
That's great. Yes, sure, please send a PR!
@ForNeVeR Yep, oops, that's what happens when I type on mobile... well, you got the point. :-)
@yamamoto-reki hi, if you need any help on making your first pull request, I'm ready to provide assistance 😄
I can see that you've forked the project and added a commit to address this issue. Are you aware that now you should send a pull request using the "New pull request" button here?
@ForNeVeR Thank you very much. I was a little nervous because I was the first pull request. As much as possible, I tried hard not to disturb the structure of the original code, how about you?
@yamamoto-reki you did everything well. Allow me to congratulate you on making your first pull request 🥇
I have a small comment though (no need to change anything right now, just consider for future pull requests): it's advisably to always make new branch in your git repository (e.g. text-spans
) and send a pull request from that branch and not directly from master
. That'll help you to separate your new changes (if any) from the pull request.
I'll review the changes in more detail a bit later (ETA ≤ 6 hours). At a first glance, your changes are good and I'll likely merge them, so thank you! 👍
I'm sorry. I missed out some code on pull request. (Mainly inside of CharAtom.CreateBox().) I'll fix it tomorrow. Also, I correspond to various Atoms / Boxes.
I want to make Formula editor quickly.
@yamamoto-reki you can push new commits to your master branch and they will automatically be added to your pull request. That's okay, take your time 😄
@yamamoto-reki also you should take a look at https://github.com/verybadcat/CSharpMath library. I'm not sure what will be better for your formula editor, but I'd like to keep you informed.
CSharpMath currently only has a Xamarin.iOS backend, but I am currently developing a SkiaSharp backend, which will work on Xamarin.Mac+Xamarin.iOS+Xamarin.Android+Windows(WPF or UWP)+Xamarin.Forms, which hopefully will help. :wink:
@ForNeVeR @Happypig375 Thank you for telling me the existence of CSharpMath. I would like to refer to it. Perhaps I may be able to help with CSharpMath.
Actually I have already made an editor for LaTeX that can use the formula palette. I am currently using WpfMath for preview.
I think that highlights are synchronized between the preview and mathematical text, and if it can be entered on the preview side, it will be a very rich editor.
/cc @charlesroddie
@yamamoto-reki Very interested in an editor. CSharpMath is a port of iosMath and MathEditor extends iosMath. So there is a path to get an editor to CSharpMath. I only had some initial thoughts on an editor, which I was going to do in F# eventually, but it may be easier to get an editor onto CSharpMath by porting MathEditor.
How far progressed is your own editor and is that also in C#?
Let's keep discussion here to WPF-Math and it's derivatives, please.
@alexreg Thank you. I will discuss it here.
@charlesroddie The Formula Editor I'm creating did not refer to any other editors at all. Development is done in C #.
The formula editor consists of a TextBox, a palette with buttons for inserting and replacing expressions and symbols, and a preview with WpfMath. I implemented it to share the highlight between preview and TextBox.
However, there is a problem with its function, I have not disclosed it to the public. The editor has its own LaTeX parser different from WpfMath. This is to synchronize the preview highlight with the text highlight. However, due to some differences between WpfMath and my parser, this feature was incomplete.
So, I thought that extending this function with WpfMath is correct, proposed here and started the implementation.
By implementing this function you can publish the formula editor.
OK I was looking to have a single visual editor which may have a palette but doesn't show any LaTeX to users or require them to know or use LaTeX. MathQuill does this in the javascript world and MathEditor on iOS. https://github.com/ForNeVeR/wpf-math/issues/105
Hello!
I think it would be better Box has range information of source string. Because it is very convenient when making formula editor. What do you think about that ?
Thanks.