[Libreoffice-bugs] [Bug 88859] LO Writer math formulas disappear or shrink

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Mar 18 06:59:18 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=88859

--- Comment #16 from Alon <alon.ben.refael at gmail.com> ---
tl;dr:
I have an idea of writing a macro to redesign the addition of formulas to a LO
document (as an SVG image object). The pseudo-algorithem is down in this
message. Please have a look at it and tell me how stupid I am for offering such
workaround...


I have very little time and very little knowladge of coding, but I have an idea
to bypass the "normal" way of inserting formulas, thus allowing to "draw a
formula in the "Libreoffice Math" tool, exporting it and using it as SVG object
(inline with text).
I don't know enough to be able to create this type of macro myself, but I'll
start by writing a pseudo-algorithm here. You are more than wellcome to give
notes and help with the writing of the actual macro. in addition, if this can
be done as an online code collaboration thing (again, I know very little about
these things), don't hasitate to help.

The pseudo-algorithm:
1. creat an inline with text object.
2. name the object "FSVGObj#n", where n is an integer, a changing number
according to the number of such objects in the document.
3. open LO Math and wait for user input.
4. when user finishes writing formula, he\she should have a button for
continuing the process
5. the formula should be exported to PDF in a temporary location
6. using inkscape (should be installed) convert the PDF to SVG
7. editing the svg as text to keep the text in the buttom of the PDF (the
actual code in the formula editor) as an SVG comment(i.e. <!--...-->)
8. removing al the rest of the pdf (i.e. the frames, and titles etc.), kipping
only the actual formula
9. Resize page to content using inkscape
10. insert svg to the aforementioned object ("FSVGObj#n")
11. if one is to update a formula, the code for the formula editor should be
availible in the commented part of the svg assosiated with the object.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210318/e93a2ca9/attachment.htm>


More information about the Libreoffice-bugs mailing list