Frequently asked questions - Math

    From The Document Foundation Wiki
    < Faq‎ | Math
    Other languages:

    How do I correct the arrows of the vectors or the angles which appear too short?

    Due to a recording error, the arrows of the vectors or the angles may appear too short. To correct, the formula must be reedited and closed. So you have to double-click and then double-escape on each formula.

    If the number of formulas is important in a document it can quickly become tiring. The following macro works for you:

    Sub ReviseFormules
         dim i as integer
         dim TheObjets as Object
         dim Objet as Object
         TheObjets=ThisComponent.getEmbeddedObjects
         On error goto erreur
         for i=0 to TheObjets.count-1
             Objet=TheObjets(i)
             if Objet.getImplementationName="SwXTextEmbeddedObject" then
                 if Objet.embeddedObject.component.getImplementationName="com.sun.star.comp.Math.FormulaDocument" then
                     Objet.embeddedObject.setmodified(true)
                     Objet.embeddedObject.update
                 EndIf
             endif
         next i
         erreur:
         resume next
     end sub