I have an
.rtf , ~70 pages dictionary manuscript at hand in the following format:
I have been asked to change those lines to:
without formatting it is an easy thing to do, but i couldn't figure out how to do that in the desired formatting.
I tried libreoffice's search & replace tool with regular expressions to first put the first braces in bold for all entries. And then i tried this for closing braces:
it works fine but it makes like this:
i.e. it copies the format of the previous(first character selected by search command) part and applies to the whole thing i choose to replace.
I also tried using
sed for substitution but apparently it doesn't work with formatted
.rtf files when using basic syntax. It opens the
.rtf as a plain text, so all the codes for formatting and file info appears as a text, therefore my:
sed "s/ / [/1" dictionary.rtf > dictionary1.rtf and its counterpart for closing braces won't work, because it also tries to change the spaces with space+open brace appearances in the formatting codes.
So, to sum up, i have an
.rtf file in the desired formatting, and on the other hand, i have a plain text with pronunciation part enclosed by braces, produced by
sed output from the plain text version of dictionary.
I am wondering if there is a way to convert an
.rtf file which contains only the plain text inside, to the format i described above.
Any help would appreciated, as long as it does the desired job. If you can fix my libreoffice search & replace, that would also do it.