Equations sometimes cannot be edited
Brought to you by:
baudinr
TexMaths 0.42, OpenOffice 5.1.4.2, Ubuntu 16.04.1.
When I insert an equation and then after converting it to SVG, select it and click the "Pi" button on the toolbar, it says "The selected object is not a TexMaths equation... Please unselect it and call the macro again. If, before selecting and editing, I press Enter (ending the paragraph with the image) - the editing works fine.
Exaclty the same issue with TexMaths 0.42, LibreOffice 5.1.4.2, Linux Mint 18 KDE
"The selected object is not a TexMaths equation... Please unselect it and call the macro again. If, before selecting and editing, I press Enter (ending the paragraph with the image) - the editing works fine."
The same in LibreOffice 5.1.6.2 in Ubuntu 16.04.
"The selected object is not a TexMaths equation...
Please unselect it and call the macro again..."
When you save the file and open again, you can edit the already inserted equation, but not the new ones (to do this, you have to close and re-open the file).
Last edit: hildo 2017-04-30
Please send me (or attach to this report) an example of document with the problem. This will help me finding a solution.
Thanks.
Hi,
Here es the File ODT and a little video I make. The text in spanish reads "The
Selected Object Not a TexMaths Equation ...
Please uncheck the file and macro Call Again the ..."
Greetings
2016-11-01 2:27 GMT-06:00 Roland Baudin baudinr@users.sf.net:
--
DTI Gualberto Padilla Valle
Academia de Matemáticas
IEMS D.F., Plantel "Vasco de Quiroga"
Related
Bugs:
#68I think you forgot to attache the file...
I tried, but if I save and re-open the document, the equation can then be edited. It is only reproducible while the document is being edited: insert an equation, do not press enter and without typing anything else, select it by left-clicking. Then press the Pi button on the toolbar.
I also encountered a possibly related bug while trying to reproduce this now: start with a blank document, insert any expression, then hit ^z (undo) until it goes all the way back to the blank document. Then try to insert an expression again, libreoffice reports an exception in BASIC: "BASIC runtime error. An exception occurred. Type: com.sun.star.lang.IndexOutOfBoundsException. Message: ."
The location is the "oShape = ..." line below:
I use the same system and LibreOffice as you (Ubuntu 16.0.4.1, LibreOffice 5.1.4.2) but I can't reproduce the bug...
When you say "I insert an equation", do you mean you type the equation directly in the document and then click the Pi button to convert the equation into an SVG image (method 1), or do you click on the Pi button, then type the equation in the TexMaths windows, then click on the LaTex button (method 2)?
So, do you use method 1 or method 2?
And also, what is the position of the equation (inline, numbered, begin of paragraph, end of paragraph)... Does the bug occur with a new document?
On 11/02/2016 05:56 AM, Roland Baudin wrote:
As a separate note, is clicking "LaTeX" button after editing an equation
supposed to insert a copy of the equation rather than update the
existing one? (I've also included this in the screencast, near the end).
Regards,
Alexey.
Related
Bugs:
#68The attachment doesn't work...
@Roland Baudin:
The bug happens to me too on LibreOffice 5.1.4.2 with TexMaths 0.42.
Despite that the bug isn't reproducible when exiting the document - I uploaded a Writer document with a SVG and PNG images that were created with TexMaths.
Regrading your question:
"
When you say "I insert an equation", do you mean you type the equation directly in the document and then click the Pi button to convert the equation into an SVG image (method 1), or do you click on the Pi button, then type the equation in the TexMaths windows, then click on the LaTex button (method 2)?
So, do you use method 1 or method 2?
"
I use method #2.
After creating the SVG for the first time, I right click on the image and then click "Description..." and I noticed that both fields "Title" and "Description" are empty.
They are empty even when I exit the document and re-open it (in which case the re-editing of the formula for the SVG is possible).
Thanks for the attached file. On my system (Ubuntu 16.04.1, TexLive 1.9.2, TexMaths 0.42, LibreOffice 5.1.4.2) the situation is the following:
If I open your file and click on the SVG equation (the first one in the document) then I get the error message saying that this is not a TexMaths equation. Right clicking on the equation and selecting Description shows no data for the equation. So the equation data were lost (not normal) and TexMaths cannot edit again the equation (normal). If I save the document and open it again, the equation is still not there, which is normal because the equation data were lost.
I can add new SVG equations to your documents and edit them later. This works before saving the document and after saving it and reopening it. Everything is OK.
So I don't know where the problem is because I still can't reproduce it.
Could you try again with a fresh config of LibreOffice: on Linux, make a backup copy of $HOME/.config/libreoffice and then delete this directory?
Last edit: Roland Baudin 2016-11-05
@Roland Baudin:
I use Ubuntu 16.04.1 too.
How do I check the TexLive version?
Regarding clause #1:
That's weird..
Notice that if you right click on the LibreOffice document and then "Extract Here", the directory "test_TexMaths_SVG.odt_FILES" will be created.
Then check the file "./test_TexMaths_SVG.odt_FILES/content.xml" and it should contain the latex string of the SVG image:
"
<svg:title>TexMaths</svg:title><svg:desc>8§display§{ \Omega, F, P : F \to [0,1] }§svg§600§FALSE§</svg:desc>
"
So the information exists in the document, but maybe it is not inside the proper XML tag?
Maybe the TexMaths script sets the Description & Title fields to another, adjacent object?
I tried again with a fresh config directory of LO (same directory that I used for bug ticket #69) - but everything repeats exactly the same - I cannot edit the equation for the SVG image unless I exit the document and reopen it.
Last edit: Dor 2016-11-05
That's strange indeed! You're right, the equation information is in the XML file...
You can get the TexLive version by typing in a terminal:
dvisvgm --version
This returns 'dvisvgm (TeX Live) 1.9.2' on my system.
Another idea: did you change the default TexMaths preamble?
I attached a test document I created on mys system with the same SVG equation as you. Can you edit this equation?
Last edit: Roland Baudin 2016-11-06
For me, dvisvgm also reports version 1.9.2. No, I didn't change the preamble. I cannot edit the equation in your attachment, but unlike the bug I saw, I cannot edit the equation even if I break the paragraph after it.
Rather strange indeed. As I said on another thread, I'll test this with a fresh install of Ubuntu and Linux Mint to see if the bug occurs there.
Another idea that came to my mind: the bug could be related with the system localization. What language do you use?
en_EN.UTF-8
In OpenOffice, only "Default - English" is installed.
Finally, I was able to reproduce the bug! I installed a fresh Ubuntu (with english language) in a Virtual Machine, and bingo, the bug is there.
So I need now to investigate why my usual system doesn't have the bug, and of course to fix it.
Thanks a lot for your investigations and your help. I'll inform you when I'll come to a solution...
OK, I've found the problem: it is due to a bad interaction between LibreOffice and the libatk-adaptor library (ATK is the Accessibility ToolKit and is used by some accessibility programs like gnome-orca). Six months ago, I already found a problem with this library and LibreOffice, and I've filled a bug report (see https://bugs.launchpad.net/ubuntu/+source/at-spi2-atk/+bug/1584795) because this library can severely slow down LibreOffice.
Now, I've found this library is also responsible for this bug in TexMaths. So I'll fill another bug report and perhaps also one for the LO team.
Anyway, here is a workaround for the TexMaths 0.42 bug:
sudo apt-get purge libatk-adaptor
and then logout + login. Note the apt-get command is 'purge' and not 'remove'. When the package is removed, it also removes some dependencies, like gnome-orca and some libraries: this is OK.
sudo mv /etc/X11/Xsession.d/90atk-adaptor /etc/X11/Xsession.d/90atk-adaptor.orig
and then logout + login. Note that with this method, a package update could recreate the 90atk-adaptor file and in this case you'll have to rename it again...
Thanks to all those who have spent some time to help me reproducing this issue!
I forgot to mention that I didn't saw the bug because the faulty library is not installed on the systems I use to work and develop.
After system upgrade to 16.10, the bug reappeared. OpenOffice 5.2.2.2, TexMaths 0.42, dvisvgm 1.15.1.
Also, the renderings now look weird. For example, rendering "max{a,b}" now results in left and right braces of different height. See the attached document.
Exactly the same issue with TexMaths 0.42, LibreOffice 5.1.4.2, Ubuntu MATE 16.04.1, dvisvgm 1.9.2, package libatk-adaptor removed.
In addition, the renderings is not working well, the last character is bigger than the others.
The first issue is solved when I use TexMaths 0.41, but not the second.
However, everything seems to work fine while editing old document created with LibreOffice 4 !
Did you 'purge' the libatk-adaptor package? The file /etc/X11/Xsession.d/90atk-adaptor must have been removed.
I don't know if it was a question to me or Rémy - I did purge this package.
Yes, I did purge this package too, and so this file has been removed.
(I'm new here, I'm just a simple user who loved the Texmaths extension ! ... but I'm very annoyed since it doesn't work anymore. Now I've installed back Libreoffice 4 but similar issues persist, I can't tell why)
Last edit: Rémy 2017-01-08