krilor / gdoc2json

Export a Google Docs file into json
MIT License
1 stars 0 forks source link

equation symbols #2

Open tirthsutaria opened 6 years ago

tirthsutaria commented 6 years ago

Hi, when I insert an equation from insert menu in google doc file, for example symbol of 'pi' it copies it as letters 'pi' and not the symbol of 'pi' as it is in original file. Do you know how to make it copy original symbol?

krilor commented 6 years ago

You mean something like this?

"children" : { "0" : { "numChildren" : 0, "numAttr" : 1, "type" : "EQUATION_SYMBOL", "attr" : { "0" : { "CODE" : "\pi" } } } }

I guess this is how Google stores an eqation symbol internally (after all, the script is all about showing the internals of a gdoc). If you need the unicode character, I think you will have to covert it yourself.