Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert LaTeX equation into editable equation using Google Apps Script

tldr: How can I convert a LaTeX equation in Google Docs so that it is editable as a Google Doc equation?

Background: I want to import html into Google Docs. This HTML includes (in my native database) LaTeX equations. When I import to Google Docs, the LaTeX is converted into non-editable images. I want to convert the LaTeX into editable Google equations. I'm thinking I can use Google Apps Scripts to accomplish this. My plan is to insert the equations as a text-string "tag" such as [latex: x + 5 = -3] - then I'll run a Google Apps Scripts function that converts that tag to a Google Docs equation.

I'm not sure if there's a well-known way to convert LaTeX into Google Apps Scripts equations? Should I just load a javascript library to accomplish this? Would I convert LaTeX to MathML and load that into the Google Apps Scripts equation object?

like image 548
Steve Midgley Avatar asked Aug 21 '17 19:08

Steve Midgley


People also ask

Does Google Docs use LaTeX for equations?

$$ and click the button in the sidebar, and all of your equations will be rendered in LaTeX! This add-on has many advantages when compared to other formula editors or the default Google Docs equation editors. Convert multiple equations at the same time, using any function supported by LaTeX!

Can you use LaTeX in Google Slides?

Its latex based, for Google Slides, you can go to Add-on dropdown menu and select Math Equations(which will appear in the list after you add the extension). Its pretty intuitive to use, just type the latex equation in the text space(an interface will appear at the side of the slide).

Is auto-LaTeX equations safe?

✅ Our security analysis didn't find any cloud or infrastructure risks, which means that Auto-LaTeX Equations should be safe to use and relatively protected against cyber-attacks and data breaches caused by hackers.


Video Answer


1 Answers

This genuinely isn't possible - and I tried for ages! The official Docs say that equations are not supported as insertable types, IE they can only be edited in place.

like image 177
stewartmcgown Avatar answered Oct 04 '22 22:10

stewartmcgown