Can I reformat names in a document

asked 2019-09-18 14:05:24 +0200

Athelhampton gravatar image

I am writing a book and have imported a number of chapters from my previous books. The document contains many hundreds of ship's names, which are in capitals. I am changing these to italics, one by one! Is there any way that I could do it for the whole document?

edit retag flag offensive close merge delete


Have a look at Edit -> Find & Replace which has means to change Attributes and Formats. But this would continue using direct formatting not based on styles. Extension AltSearch allows to apply character styles (through \C{<characterstylename>}) and this way you would transform your document into a form which easily would allow to change your ship's names (for future use) into a different format, just by changing a single character style (e.g. "ShipNames"). But everything depends on "How many different ship's names do appear in your document. If all "hundreds" are different it's not worth the effort, if there are 5 to 10 different names appearing ever and ever again, I'd say: "Definitely go that way".

Opaque gravatar imageOpaque ( 2019-09-18 15:22:08 +0200 )edit

Opaque, Many thanks, unfortunately there are still over 200 different names to go, so, as you say, it's not worth the effort. Best wishes

Athelhampton gravatar imageAthelhampton ( 2019-09-18 16:52:16 +0200 )edit

Your example is really a perfect role-model for the fact that direct formatting is a very poor approach to text processing. If you had used a character style from the very beginning for your ship names, you would be able now to change all your ship names with a few clicks by changing the character style.

Opaque gravatar imageOpaque ( 2019-09-18 16:57:05 +0200 )edit

Built-in F&R dialog also allows one to apply a style to the found text: one needs to Find all, then apply the style using usual Styles sidebar deck (F11).

Mike Kaganski gravatar imageMike Kaganski ( 2019-09-18 19:19:30 +0200 )edit

@Mike Kaganski. Thanks for the info, didn't think that far, but of course Find all marks the findings and you can apply a character style. Searched too long for an option.

Opaque gravatar imageOpaque ( 2019-09-18 19:27:09 +0200 )edit

If you have the names in all upper case, then you may use this regular expression:


Make sure that you search case-sensitively.

Mike Kaganski gravatar imageMike Kaganski ( 2019-09-18 19:35:30 +0200 )edit