JohnDTill / MathBran

Serialized typesetting standard
MIT License
2 stars 0 forks source link

How to embed in java #4

Open AdhTri001 opened 3 years ago

AdhTri001 commented 3 years ago

Hey sir, I am a student working on making a graph plotting gui application with java. I am still a learner and have used Qt with python. I m assuming this project helps ous to render math equations. Can I embed this on my java app (swing). How to use this? I mean whats the syntax for typing the equation? or if your answer is no then is there any book/guide that will help me reimplement this in java? Thanks in advance :)

JohnDTill commented 3 years ago

I don't think there are any easy ways to use QWidgets in Java/swing. If you just want to render equations, there are several MathML and TeX libraries for Java. If you want interactive what-you-see-is-what-you-get editing, you might need to roll your own solution. Honestly I wouldn't recommend that approach for a student project, unless you really want to do it and aren't under deadline pressure.

JohnDTill commented 3 years ago

There are a few WYSIWYG Java equation editors, but they look to be predominately commercial. Maybe using a swing web browser component and incorporating mathquill (http://mathquill.com/) would be your best route. But I think even that is likely too much work, depending on your project.

AdhTri001 commented 3 years ago

I m not working on my school project, I m just a programming geek inspired from people like you, to do something that will make my skills just better. I love to do programming and so I always keep myself busy in some projects. I have used qt framework in python and know a bit of c++ so I will try to go through your project and see how everything works. Any help with where to start understanding this project? I really like your work sir. Thanks :)

JohnDTill commented 3 years ago

Great! It is a fun project to tackle at your leisure, and you can learn a lot by implementing it. I've written a little about it in the YAWYSIWYGEE wiki (https://github.com/JohnDTill/YAWYSIWYGEE/wiki/Design). The 'A' section is fairly complete, but beyond that descriptions of interaction are scant.

Actually MathBran and YAWYSIWYGEE have some fundamental limitations which make them not great:

I'd say don't pay too much mind the code. Look at the wiki to start thinking about the data structures you would use, and I've got some more recent code I can upload in the next couple weeks if you want to dig into the details. The newer stuff has some design issues too, but is generally a lot better.

AdhTri001 commented 3 years ago

Thanks! I will surely go through it.