Find & Replace function for text with a particular Style?

Almost 8 years ago on June 2014 at L&L, a similar question was posted regarding a Find & Replace Style function?.

The current version of Scrivener (Mac) has an excellent and powerful Find by Formatting function that allows a writer to search for text that carries with it any particular Style that the writer has used or created, custom or otherwise, e.g.:

I do not see, however, a matching Find and Replace by Formatting function in the current Scrivener (Mac) version to search and replace text with a particular Style, custom or otherwise.

I can appreciate the challenge and complexity (as discussed in the June 2014 L&L posting) of performing replacements by Style throughout a document. Having several hundred instances of a piece of text with a particular Style scattered throughout my project, however, prompted me re-ask the question posed 8 years ago with respect to that much earlier version of Scrivener.

As a prolific creator of custom Scrivener Styles, such a feature would be welcome. A Find and Replace by Formatting function would not only be useful to someone such as myself, however, but to anyone that has used Scrivener Styles, custom or otherwise.

As for making the Style change to a particular Style post-compile, my goal is to make the Style change as it appears within the Scrivener document, particularly since there are likely to be instances where I may NOT want to change certain instances of text with a particular Style, complicating any post-compile procedure to do so.

Thanks for reading,
scrive
:thinking:

Are you trying to change the content of the text, or assign a different Style to it?

1 Like

In the immediate case where I have several hundred instances of a word, I need to change the Style of the text only, not the text itself:

  • from a bold, italic text (that is also indexed and linked to the glossary) by use of a custom Style e.g. image,

  • to the same italic text (that is also indexed and linked to the glossary), e.g.image, without bolding.

There will likely be several other instances where I will want to de-emphasize, e.g. un-bold key words in the project, each with up to several hundred instances of each word, adding up to perhaps a thousand adjustments that I may like to make to the text, in an effort to de-emphasize some of the text.

My goal is to be more judicious with my use of special formatting to make the text a bit less jaring for the reader. Right now my assessment after having written so may pages is I don’t need to use special formatting nearly as much as I had thought I should. My bad. :slightly_frowning_face:

This could all be done manually, but having a Find and Replace by Formatting function would be a GREAT help!

Thanks for asking,
scrive
:thinking:

That’s a character format change, not a style change … unless you’re using a character style for all those words, in which case you could redefine the style.

1 Like

Hi drmajorbob,

That’s a thought … however … there are too many instances where I use the custom Styles on so many words that if I were to redefine the custom Style, I’d loose that custom Style’ing for those words where I don’t want to de-emphasize or un-bold the text, n’est-ce pas?

Thanks for the suggestion,
scrive
:thinking:

It’s difficult to do this starting over, but you could have had multiple emphasis styles (actual styles) from the start. That’s what I’m doing in my WIP (where P = procrastination).

If you didn’t know what you’d want to do in advance, the styles could be named emphasis1, emphasis2, and emphasis3. Or italic, bold, boldItalic.

1 Like

You could create a new Style for the new highlighting strategy and apply it to the relevant words.

1 Like

With hundreds of instances, how would the OP do that?

1 Like

With hundreds of instances, how would they make any formatting change?

Applying a new style is about the same level of inconvenience as simply de-bolding the relevant text, but it creates a new type of highlight so that future changes will be easier.

1 Like

Agreed, and exactly the issue the OP is raising. It wouldn’t be difficult if a search resulted in selected matches, not just highlighted matches.

1 Like

Hi drmajorbob,

Great idea!

My list of custom Styles has become quite long … I’ve even forgotten what some of the Styles are for exactly … I’ve asked questions regarding how to document or label the Styles in earlier postings (you may have seen them) and I have wondered aloud here about the possibly of a multi-columned Styles list (quickly shot down).

The custom Styles are Ssssooo useful, but with the current implementation, there are limits to how many I can manage … so I may have to put your idea on hold for the moment …

Thanks,
scrive
:thinking:

Actually, in this particular instance, I already HAVE an exiting custom Style that has ONLY italic text (that is also indexed and linked to the glossary), e.g.image, without bold’ing.

I simply need to remove the bolding, but keep the italic text (that is also indexed and linked to the glossary), which is the definition of a Find and Replace by Formatting function.

Thanks for asking,
scrive
:thinking:

Then redefine the style. Done.

No, it’s the definition of redefining a style.

1 Like

Yes, what he said. Being able to change bold + italic to italic only is one of the main reasons for using styles in the first place.

1 Like

Absent changes to Scrivener itself, you could create a style reference document in the Binder, using each style to write out its own name and what you use it for.

2 Likes

I wish it were that simple. As I mentioned, the bold+Italic Style is used for MANY different words, not just for one single word I would like to re-format, including many words that I want to keep bold and that I do NOT want to re-define. I’m only looking to re-Style the one word image, from bold+italics to just italics image (while also keeping the indexing with a link to the glossary).

This is why a Find and Replace by Formatting function would be so powerful; the re-formatting can be done one word at a time, and not at all for some words.

The Find and Replace by Formatting function is NOT re-defining a Style. It IS the re-formatting of a single word that has a particular custom Style. The Style remains unchanged for those words where I need to keep using that particular Style, but where I don’t need to change the formatting. There is, unfortunately for me, a difference, as it appears such a feature does not exist.

What I think may be confusing is that my rendition of a Style includes not only the formatting (the noun) of the text, but how the text acts or functions (the verb). Scrivener Styles allow me to combine in a single Style not only bold and italic formatting (the noun), but also, for example, instructions that the text is to be indexed and linked to an entry in the glossary (the verb), all within a single Style. This is the true power of Styles, and why having a Find and Replace by Formatting function to manage Scrivener Styles would be Sssooo powerful.

Scrivener Styles leverages the power of using Scrivener with LaTeX by allowing me to combine text formatting, as is so well facilitated in Scrivener, with the extraordinary features available in LaTeX, in a manner where I can define the Style once, and almost never have to worry about getting a LaTeX syntax error when I employ one of the Scrivener Styles. Really powerful stuff!

As I mentioned, I realize the complexity and the challenge of creating such a function. I has only asking to see if there had been an update to the June 2014 posting that I was unaware of.

Thank you for your suggestion, as it helped me to be more specific as to what a Find and Replace by Formatting function is really all about for those who may not be familiar with the function.

Thanks again,
scrive
:thinking:

I should aside some time (after I get some sleep) to do just that … bite the bullet and build a Binder rolodex of my Scrivener Styles and then add whatever new Styles I create as I add them.

Thank you for the suggestion,
scrive
:thinking:

It IS imaginary, since the feature doesn’t exist, but if you had a style applied only to the atmosphere word instances, you could do it by redefining the style. Did you use the word hundreds of times?

1 Like

The key is to understand that a Scrivener Style, at least how I have rendered Styles, consists of both formatting, i.e. bold, italic, underlining, etc. (the noun ) of the text, as well as the function, i.e. what instructions need to be followed with the text, such as include this word in the document index, and while you’re at it, link the word to the corresponding entry in the glossary, and also while you’re at it please create an enumerated list and have this word as the first item on that list, and make sure the list is left justified, etc. (the verb ) (I can go on but you see what I mean).

Another way to look at this is to think of the Scrivener split between Character Styles and Paragraph Styles. In my rendition of Styles, I most often use Character Styles to define the text formatting, (the nouns) whereas I use Paragraph Styles most often for the instructions that go along with the text (the verb). Within a single Scrivener Style I can define the text format (the noun) and what instructions I want to perform with the text (the verb).

What is truly amazing with Scrivener Styles is that all the formatting along with all those instructions can be applied to that piece of text, with just a subtle text background/foreground combination that the user selects to indicate what Character and/or Paragraph Styles have been applied to the text. In my case, with the following foreground/background combinationimage tells me that the word will appear bold and italic, and the word will be indexed and linked to the corresponding entry for ‘atmosphere’ in the glossary.

In my project, I have defined the combination of bold+italic text format, with blue color text, with light blue background to mean that in addition to bold+italic text format, the word atmosphere will be indexed and linked to the corresponding entry for ‘atmosphere’ in the glossary. To anyone else, it just looks like the word ‘atmosphere’ in blue text on a light blue background. There is nothing about indexing or linking to the glossary to clutter up the text … amazing!

My way of thinking of Scrivener Styles may not make sense for everyone. The power of Scrivener Styles, however, is available to everyone. You don’t need to use LaTeX to benefit from the power of Scrivener Styles. That’s just my particular rendition of Styles.

Hope this helps,
scrive
:thinking:

Maybe move this to the wishlist category, then.

1 Like