xaml-math icon indicating copy to clipboard operation
xaml-math copied to clipboard

LaTeX editing?

Open charlesroddie opened this issue 7 years ago • 5 comments
trafficstars

About the feasibility of supporting editing LaTeX, as you can do in MathQuill using javascript. Is this infeasibly large or potentially doable in future?

My initial thinking is that the main requirements would be, perhaps in order of difficulty:

  • Need to maintain a caret position within the LaTeX string and know its coordinates and height
  • When an arrow key is entered, need to move the cursor to the right position
  • Open and close bracket functionality, with MathQuill's default being good: opening a bracket also creates a grey close bracket and typing close bracket in between closes the bracket.
  • Appropriate actions on Delete (appropriate block to delete), function completion (e,g. sin to \sin), ^ (add ^{b} where b is some box), character typed just before box replaces box........

charlesroddie avatar Jan 25 '18 22:01 charlesroddie

Well, I think that eventually we could do it, but that will be a huge feature. For now, I have no plans for implementing such a feature, because we have our hands busy with other major issues (alternate renderers, blurry text in WPF, fonts, adding new LaTeX features etc.)

You've made a nice initial task decomposition. Each of your points is itself a whole area of research.

I'm not sure if we actually want to include the formula editing stuff in the core WPF-Math package, but it definitely could be packed into a separate control library, although it'll be much easier to develop it in the main repository.

If anyone wants to invest their free time to make this happen, please make yourself familiar with the main code parts and then we're open for discussion.

ForNeVeR avatar Jan 26 '18 03:01 ForNeVeR

I'd like to work this when I have time and when I can use the project in the app I'm developing (probably requiring skiasharp).

charlesroddie avatar Jan 26 '18 06:01 charlesroddie

@charlesroddie Are you having in mind something like the formula control in Microsoft mathematics?

B3zaleel avatar Sep 12 '18 17:09 B3zaleel

Yes something like that. The surrounding UI (buttons for functions etc.) would not be part of the project. This is something that is currently planned for CSharpMath by @Happypig375 as a port of MathEditor for iOS. Once we have a good sense of the structure over there we can update you here in wpf-math. In the very long term it could turn into something LyX-like (including text with math editing boxes inside).

charlesroddie avatar Sep 24 '18 09:09 charlesroddie

Yes something like that. The surrounding UI (buttons for functions etc.) would not be part of the project. This is something that is currently planned for CSharpMath by @Happypig375 as a port of MathEditor for iOS. Once we have a good sense of the structure over there we can update you here in wpf-math. In the very long term it could turn into something LyX-like (including text with math editing boxes inside).

have you got any news ?

TheOOnewbie avatar Sep 15 '22 06:09 TheOOnewbie