Is it possible in LibreOffice to replace italic string something to unformatted string delimited with two characters, e.g. to /something/ ?
Do you want to replace all the text ranges formatted italic in the described way?
Shall italic text be replaced only if the attribute italic is applied by hard formatting or also if a respective named caharacter style is applied? If a style was used to make the text italic: Do you want to set a different style?
Generally: Describe to much more detail what you actually want/need.
Yes, I want to replace the text ranges formatted italic in the described way.
If a text of any style is italic, it should be replaced by the unformatted text delimited by two slashes.
For which reason? Do you want to export Writer formatted text to some application using exotic formatting directives?
Yes. Actually my main goal is to convert an odt file to tex.
I never did something of the kind, but I verified with V7.1.1.1 that the F&R tool can be used to do it. Unfortunately a complete instruction would get lengthy. Therefore I will assume you are a clever and experienced user, and only give some hints.
- Call F&R and choose
Format...
- Select
Italic
there, but nothing else. OK - Enable
Including Styles
in the F&R window. -
Find All
.
Do not touch the text itself now! The findings will be shown as multiselection. - Enable
Regular expressions
andCurrent selection only
. - Click
No Format
. - Enter
(.*)
behindFind:
. - Enter
/$1/
behindReplace:
. -
Replace All
. - Assign the
Default
character style (not Italic!) to the still selected findings. - If still some text is italic due to hard attributes hit
Ctrl+I
twice.
(Untested) The proceeding may fail for itralic text associated with TextField objects by automatisms.
Good luck.
This exactly does what I want - thank you for the help!
For such a conversion, I recommend you query the extension site with “latex” keyword.
This is much easier than trying to implement a procedure yourself.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.