如何使用Google Apps脚本将LaTeX方程式转换为可编辑方程式 [英] How to convert LaTeX equation into editable equation using Google Apps Script

查看:111
本文介绍了如何使用Google Apps脚本将LaTeX方程式转换为可编辑方程式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tldr:如何在Google Docs中转换LaTeX方程以便可以将其作为Google Doc方程进行编辑?

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

背景:我想将html导入Google文档.该HTML包含(在我的本机数据库中)LaTeX方程.当我导入到Google文档时,LaTeX会转换为不可编辑的图像.我想将LaTeX转换成可编辑的Google方程式.我想我可以使用Google Apps脚本来完成此任务.我的计划是将等式作为文本字符串标签"(例如[latex: x + 5 = -3])插入-然后我将运行Google Apps脚本功能,将该标签转换为Google Docs等式.

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.

我不确定是否存在将LaTeX转换为Google Apps脚本方程式的知名方法?我应该加载一个JavaScript库来完成此操作吗?我可以将LaTeX转换为MathML并将其加载到Google Apps脚本方程式对象中吗?

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?

推荐答案

这确实是不可能的-我尝试了很长时间!官方文档说,等式不支持作为可插入类型,IE可以只能在适当位置进行编辑.

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.

这篇关于如何使用Google Apps脚本将LaTeX方程式转换为可编辑方程式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆