Peter:

The actual perl command should be changed slightly to:
perl -pi'orig_*' -e 's/<text:alphabetical-index-mark
text:string-value="[[:alpha:]]*"\/>//g' Index_Experiment.fodt

After [[:alpha:]]*" the \/> needs to be added to remove the "/>" ending of
the XML tag - otherwise it seems to work fine.

The full blown shell script you sent me (I don't see it here on the forum
for some reason) needs to be modified in the same way of course.

I used [A-Za-z] instead of the [:alpha:] that you used because some systems
don't respect that substitution syntax (I can't remember what it's called),
which limits things just a bit, but a comment might be added to take care of
that - the [:alpha:] syntax, again, is probably a little easier to
understand for those not familiar with grep, sed and their relatives.

You should post the shell script, as it is probably easier to use (?) for
some folks than my simple sed command, since it takes care of hand-holding,
locating the right directories and so forth.

Of course, I hope some of the LibreOffice developers will incorporate the
option and capability to remove old markers when an index is regenerated,
and "fix" the generator so that it doesn't add additional markers to the
same word when updating takes place. (It doesn't always do that, but I
haven't figured out the exact conditions when it does).

So - good work.




--
View this message in context: 
http://nabble.documentfoundation.org/Removing-Index-Markers-from-Writer-a-How-To-tp4094327p4095465.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to