Divide-By-0 / autolatex

All Auto Latex Equations Versions.
https://autolatex.com
MIT License
17 stars 1 forks source link

Fixes to accounting of equations and tables #5

Closed Divide-By-0 closed 1 year ago

Divide-By-0 commented 1 year ago

try to fix the error where accounting of equations is incorrect, so it errors on success lots of small lint fixes there still seems to be some bug where things fail, requires more logging of the exectuion trace to figure out

grimsteel commented 1 year ago

Because I made really small changes in #4 I found it easier to just manually apply them here as I fixed the bugs.

Divide-By-0 commented 1 year ago

Cool! Does everything work now?

grimsteel commented 1 year ago

Hopefully! I tested:

  1. tables with equations in multiple cells
  2. both tables and text boxes at once
  3. font colors

I'll work on shapes next

grimsteel commented 1 year ago

Shapes (and really anything that's not a text box) should not be deleted if they don't have any text left after the equation is rendered now

I also added support for recognizing vertical and horizontal text alignment in shapes and text boxes (not tables because it just drops those equations at the top left regardless of cell position)

You can merge this if you want, and I'll start working on unifying Docs and Slides

Divide-By-0 commented 1 year ago

What if the shape has text and drawing, and the text is rendered but there's drawing left?

grimsteel commented 1 year ago

I think I misunderstood what you meant by drawings. How do you insert a drawing into a shape in Slides?

Divide-By-0 commented 1 year ago

See the slides that I shared with you! Those have a drawing and mess up your rendering.

Edit: Given the new changes, it's actually now OK.

grimsteel commented 1 year ago

Is this the drawing you're talking about: image If so, I still don't understand what you mean. Could you show me an example of how it looks before the equations are rendered?

Also, I'm in the process of making the common library. What do you want me to do about reportDeltaTime? It's most of the functions in Docs but not in Slides.

Divide-By-0 commented 1 year ago

reportDeltaTime is very useful for logging -- we should add it to analogous functions in Slides as well. It is totally general so feel free to leave it as a shared function that's identical.

Divide-By-0 commented 1 year ago

Hey, it looks like the drawing issue is fixed.

Here is the original.

image

Here is the replaced (colors are inverted in my Chrome, don't worry about that).

image

Two additional features we'd want:

1) When replacing an equation with an image, calculate the width of that image and insert that number of spaces into the textbox where the equation was lifted from. 2) For equations with multiple colors, detect that and color each section accordingly.

Divide-By-0 commented 1 year ago

Temporarily merged, will continue to remerge as you make PRs.