Page 1 of 1

[Solved] Turning *text* to Italics

Posted: Sat Sep 21, 2013 1:58 am
by TehOpheliac
I wrote a very very long piece of fiction a long time ago (over 200+ pages) using *text* instead of italics because it was on notepad.

I really really really do not want to have to spend hours turning it into italics.

Is there any way to use the search and replace option to turn *text* into italics?

I was looking on the internet and I know there's a Automatic *bold* option, but I've never turned it off and it's never actually turned anything bold, either. Probably because I've gotten the text from the internet (safe keeping/to show friends) and so something is preventing it. But then again, even when I write something directly into Writer using the *text* format, it still doesn't turn bold.

What do I do? How can I fix this? ♥

Re: Turning *text* to Italics

Posted: Sat Sep 21, 2013 4:34 am
by FJCC
You can find text between asterisks and make it italic with Find and Replace. Be sure to try this on a copy of the document in case something goes wrong. In the Find and Replace dialog put
\*([:alpha:]+)\*
in the Search For box. That is a regular expression that matches an asterisk followed by one or more alphabetic characters followed by another asterisk. Click More Options and select Regular Expressions. In the Replace With box enter
$1
which refers to whatever is between the first set of parentheses in the Search For box. With the cursor still in the Replace With box, click the Format button in the More Options area and on the Font tab pick italic. The word Italic should appear under the Replace With box after you click OK. You can now either click Find and then Replace sequentially to replace your text one at a time or click Replace All to get them all at once.

As for getting bold text using asterisks, you need to turn on that option under Tools -> AutoCorrect Options and the Options tab

Re: Turning *text* to Italics

Posted: Sat Sep 21, 2013 5:01 am
by TehOpheliac
OMG! YOU ARE A LIFE SAVER!

Seriously! Thank you so much! I did a quick replace all and it said it fixed over a THOUSAND of them!

YOU'VE SAVED ME SO MUCH WORK! Thank you so much!!! ♥