9

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?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Steve Midgley
  • 2,226
  • 2
  • 18
  • 20

2 Answers2

2

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.

stewartmcgown
  • 516
  • 4
  • 16
  • 3
    Just to add to this answer, we have figured out that if you put an equation into a Word Doc, and then import the Word Doc, the equation is editable in Google Docs! Which is nuts, but the only method we've found so far. – Steve Midgley Jun 23 '19 at 05:23
0

Found a free add on called Auto-Latex Equations add-on for Google Docs. It replaces all the text between $$ signs with high-quality images of the equation.

Basically your tag becomes the delimiters, like $$55 + \sqrt{5}$$ and renders all or one of the equations. If you mess up, you can always undo one or all the equations.

John Targaryen
  • 1,109
  • 1
  • 13
  • 29
  • I don't think this permits importing into GDocs? There are a few plugins that replace GDoc equations, but I don't think any allow you to natively edit GDoc equations. So if someone doesn't have the plugin, the markup doesn't work. This plugin doesn't fix that does it? – Steve Midgley Jul 18 '22 at 13:23
  • You can just keep them all in native form like within $$ until one person with the add on hits render all --- so only a single collaborator needs it, and everyone can edit and see the results. – John Targaryen Jul 20 '22 at 08:24