Ask Your Question
0

How to remove a word from all formulas in a .odt file

asked 2019-09-16 00:18:04 +0200

juanjo_ng gravatar image

I have a LibreOffice Writer file containing math exercises. I have all solutions hidden using "phantom".

This is the content of one of the formulas:

b_23= phantom color green {0}

I would like to remove the "phantom" token from all formulas in the file, so solutions are shown. I have tried decompressing the file, executing this script and compressing the file again:

find ./ -type f -readable -writable -exec sed -i "s/phantom/ /g" {} \;

The word "phantom" is removed, but the solution is not shown until I double click each equation.

So, is there a way of removing the "phantom" word from each formula and updating all the equation easily?

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-16 08:43:28 +0200

updated 2019-09-16 08:46:10 +0200

You need to not only remove the phantom from the annotation inside the <draw:object>, but also remove the whole <draw:image> next to it, which contains the cached render.

Also there's a way of creating a macro to edit the formula; see e.g. Formatting of All Math Formulas extension as a starting point for such a macro.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-16 00:18:04 +0200

Seen: 23 times

Last updated: Sep 16