# Converting _text_ to italics

Many texts I download from places like Gutenberg use _ this _ (without the spaces) to represent this. How do I convert these into italics?

I tried changing the underlines to slashes to make use of the Autocorrect feature, but it didn't work (and the same is true, incidentally, of converting straight quotes to curly quotes).

In MS Word I used to be able to do a wildcard search. I would search for something like _ [*]_ to convert any characters * within the brackets and underlines to italics. Then I searched for all the underlines and deleted them. I tried what I thought was the equivalent using LibreOffice syntax, and it didn't work.

edit retag close merge delete

Sort by » oldest newest most voted

You need to activate the "Regular Expressions" option on the full Search&Replace tool (Ctrl H), search for

_([^_]*)_

and, with the cursor on the Replace box type

\$1

and select Format → Italic.

more

'Find & Replace' using RegularExpressions is much more powerful than something based on MS-wildcards. It requires a bit more elaborate entries as a consequence.
For a first approach do as described in this attached demo.

Sionce the OQ also mentioned the replacement of pairs of straight quotation marks by curly pairs, I added a respective second page to the demo. The reworked version is now also attached.

more

## Stats

Asked: 2018-06-08 10:42:35 +0100

Seen: 60 times

Last updated: Jun 08 '18