Inspiration
4/5 of our team is currently taking Multivariable Calculus. We see a lot of latex-y expressions in our homework but if we wanted to copy it into latex notes it's basically impossible and we have to write it from scratch. What if we wanted to send the question to a friend, or shove it into wolfram alpha? Since none of us really enjoy typing out triple integrals manually, we made a parser for it.
That being said, this feature can be generalized well past just Webassign--what if we had user-provided scripts with a marketplace, the users can vote on said scripts and use whichever they chose.
What it does
Adds a hover button to Webassign (or any other website with appropriate parsing script), which if you click will convert the expression to latex. We also have a popup when you click on the extension icon that shows applicable scripts to this page (currently just using example data) as well as a marketplace where you can choose which script you want to use for what website, as well as vote on them (also just using example data).
How we built it
We wrote the UI for the extension with react, used yarn for package management, and used javascript for the userscripts.
Challenges we ran into
Chrome doesn't actually make it particularly easy to run userscripts. In fact, it's simply not possible with manifest v3.
Accomplishments that we're proud of
The html-to-latex actually required us to make a relatively complex datastructure--a flat syntax tree. Since we don't actually have to evaluate this syntax tree, we don't strictly have to have our operators be leaf nodes--we can actually just put all basic expressions on the same line. The tricky bit comes when you have multiple sub-expressions--say an integral with bounds, or an expression in an exponent.
Furthermore, it's incredibly simple to compile these scripts to latex, and even to extend it to other compilation targets since we just recursively call compile on all the children in preorder order.
What we learned
We've learned a lot about creating react apps. 3/5 of us had little to no experience with it beforehand and we're certainly significantly more well versed in it now. We've also learned how to write a chrome extension with react, use google auth and use persistent local storage.
What's next for Expressive
All we really need to do for it to be a fully-fledged product is hook it up to a server and sharpen the UI a little, and ideally the users will provide the userscripts for parsing any given webpage. It would also be nice to eventually ship the latex off to Wolfram Alpha (if we can figure out cors) and let it evaluate the latex and hand it back to the user.
Built With
- javascript
- parcel
- react
- react-google-login
- yarn
Log in or sign up for Devpost to join the conversation.