deleting paragraph style B and replacing it with paragraph style A

Everything related to our flagship word processor.
Post Reply
shmuel
Posts: 8
Joined: 2019-10-18 06:55:45

deleting paragraph style B and replacing it with paragraph style A

Post by shmuel » 2019-10-24 04:11:19

In my document, there are several very similar paragraph styles. How can I delete paragraph style B and make sure that all paragraphs with paragraph style B will be formatted with paragraph style A?

adryan
Posts: 310
Joined: 2014-02-08 12:57:03
Location: Australia

Re: deleting paragraph style B and replacing it with paragraph style A

Post by adryan » 2019-10-25 02:23:21

G'day, shmuel et al

One way of doing this is to use the Find & Replace system with settings as in the attached illustration. (The Case checkboxes don't really matter here.)

Changing Paragraph Style.jpg
Changing Paragraph Style.jpg (190.74 KiB) Viewed 1651 times

The expression in the Find field was obtained from the drop-down cogwheel menu ("Find what:") under Wild Card > AnyParagraph. The expression in the Replace field is "backslash zero".

Select the contents of the Find field, then Format > Paragraph Style > Paragraph Style B (or whatever).

Select the contents of the Replace field, then Format > Paragraph Style > Paragraph Style A (or whatever).

Then click on the Replace All button.

When making major changes such as this to an entire document, it's advisable to do it on a duplicate, just in case of mishap.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

User avatar
phspaelti
Posts: 1043
Joined: 2007-02-07 00:58:12
Location: Japan

Re: deleting paragraph style B and replacing it with paragraph style A

Post by phspaelti » 2019-10-25 02:40:00

With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
  1. Choose Paragraph Style:Select All in Style
  2. Apply the desired Paragraph Style A
Find is not really needed for this.
philip

adryan
Posts: 310
Joined: 2014-02-08 12:57:03
Location: Australia

Re: deleting paragraph style B and replacing it with paragraph style A

Post by adryan » 2019-10-25 02:48:46

G’day, Philip et al

Much better, Philip!

I don’t think I’ve ever needed to do this on a mass scale before, so I wasn’t aware of that command. Thanks for pointing it out.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

shmuel
Posts: 8
Joined: 2019-10-18 06:55:45

Re: deleting paragraph style B and replacing it with paragraph style A

Post by shmuel » 2019-10-25 23:54:04

Hi Adrian and philip

Thanks to both of you for your help! Achieving this with Select All in Style is really easy, and the paragraph style list in my document is much cleaner now.

One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the document" – but I was not able to find it. I deleted it anyway, and so far I have not had any problems.

vwnisus
Posts: 36
Joined: 2016-04-24 00:13:31

Re: deleting paragraph style B and replacing it with paragraph style A

Post by vwnisus » 2019-10-26 00:04:17

phspaelti wrote:
2019-10-25 02:40:00
With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
  1. Choose Paragraph Style:Select All in Style
  2. Apply the desired Paragraph Style A
Find is not really needed for this.
I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option.

User avatar
phspaelti
Posts: 1043
Joined: 2007-02-07 00:58:12
Location: Japan

Re: deleting paragraph style B and replacing it with paragraph style A

Post by phspaelti » 2019-10-26 00:31:42

vwnisus wrote:
2019-10-26 00:04:17
I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option.
Really? Mine does.
Select_All_In_Style_1.jpg
Select_All_In_Style_1.jpg (74.39 KiB) Viewed 1610 times
Also you should be able to find it in the Paragraph Style menu of the Paragraph Style icon in the bottom right corner:
Select_All_In_Style_2.png
Select_All_In_Style_2.png (27.18 KiB) Viewed 1610 times
Select_All_In_Style_3.png
Select_All_In_Style_3.png (136.49 KiB) Viewed 1610 times
philip

User avatar
phspaelti
Posts: 1043
Joined: 2007-02-07 00:58:12
Location: Japan

Re: deleting paragraph style B and replacing it with paragraph style A

Post by phspaelti » 2019-10-26 03:31:53

Hello shmuel,
shmuel wrote:
2019-10-25 23:54:04
One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the document" – but I was not able to find it. I deleted it anyway, and so far I have not had any problems.
One reason you may see such a message is that the style may be used in the definition of other styles, either as the "based on" style, or as the "following style". If the deleted style did not add any crucial attributes, you might not even notice the deletion.
Alternately the style may have been adding attributes that are being overridden, so you might not notice that either.
Tracking down where a style is used in that way is not always easy, especially if it is part of an imported document with the styles created by the importing process.
philip

shmuel
Posts: 8
Joined: 2019-10-18 06:55:45

Re: deleting paragraph style B and replacing it with paragraph style A

Post by shmuel » 2019-10-26 04:20:12

Thank you, philip!

xiamenese
Posts: 440
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: deleting paragraph style B and replacing it with paragraph style A

Post by xiamenese » 2019-10-26 08:26:21

Two other points might interest you, @shmuel:

1) You can access "All in Style" from the paragraph Icon in the status bar at the bottom …
Screenshot 2019-10-26 17.04.23.png
Screenshot 2019-10-26 17.04.23.png (288.52 KiB) Viewed 1577 times
2) A while back, I think it was Martin who posted a macro to remove unused styles. I can't find it quickly in the repository, so here it is if you want to try it out.
Remove Unused Styles.nwm
(7.41 KiB) Downloaded 28 times
Hope that helps.

Mark

vwnisus
Posts: 36
Joined: 2016-04-24 00:13:31

Re: deleting paragraph style B and replacing it with paragraph style A

Post by vwnisus » 2019-10-26 23:39:27

vwnisus wrote:
2019-10-26 00:04:17
I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option.

Really? Mine does.
Also you should be able to find it in the Paragraph Style menu of the Paragraph Style icon in the bottom right corner:
Sorry. You are right. For some reason, initially, I could not see it.

shmuel
Posts: 8
Joined: 2019-10-18 06:55:45

Re: deleting paragraph style B and replacing it with paragraph style A

Post by shmuel » 2019-10-28 03:00:37

Thank you, Mark!

xiamenese
Posts: 440
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: deleting paragraph style B and replacing it with paragraph style A

Post by xiamenese » 2019-10-28 09:32:49

My pleasure!

:)

Mark

martin
Official Nisus Person
Posts: 4605
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: deleting paragraph style B and replacing it with paragraph style A

Post by martin » 2019-10-29 10:04:05

Great advice and suggestions all around, thanks everyone! It's wonderful having such helpful and good natured users :)

Although the original question seems thoroughly answered now, I still want to point out this FAQ topic on searching for formatted text. It covers some of the techniques discussed already, but also introduces some other ways to select text by formatting.

Post Reply