Jump to content
You must now use your email address to sign in [click for more info] ×

Prevent AfPub From creating new styles


Recommended Posts

How do I prevent publisher from creating new styles every time I import/place new text.

The first time I place a text in a publisher document I use the style names that come with the RTF document.
I then change the styles to how i want them.

If I then place a complete new text it adds all the styles again but with a number added to it like Normal1

Why?

How can I make Publisher use the available styles with the same name?

Link to comment
Share on other sites

It will only use the styles with the same name if they also have the same definition.

So, if you're going to place multiple texts, place all of them, then change the definitions.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

In that case, you can use Find and Replace to change "Normal1" to "Normal" throughout your document.

  1. In the Find and Replace panel, click the cog icon for the Find field.
  2. Choose the Character or Paragraph style that you want to change from.
  3. Click the cog icon for the "Replace with" field.
  4. Choose the replacement Character or Paragraph style.
  5. Find
  6. Replace all

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

4 hours ago, Sephen said:

If I then place a complete new text it adds all the styles again but with a number added to it like Normal1

 

 

2 minutes ago, Sephen said:

What if your client sends a new text... then you have to do everything all over again.

Make your Paragraph and Character styles and then import the text. You'll have the imported styles so use Find and Replace to Find the text with the imported Style and Replace it with Your own Style. Then delete these imported styles.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

36 minutes ago, Sephen said:

It's even worse...

It overwrites the existing (correct) styles with the ones from the new text document...

I've never seen that. 

Can you provide a demo .afpub file, and another file to insert into it that causes the problem?

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

I created a new publisher doc with the name AfPubTest.afpub (had to zip the file because didn't want to upload) imported the text file Affinity Publisher test document.rtf and changed all the styles.

see image below, I've highlighted the "heading 1" style

385143216_Screenshot2021-03-17at16_33_18.png.3a3282a4e6eb1d04e8bf0b4493d34d54.png

I cleared all the text and imported the same text in the afpub doc. Here you can see the highlighted "heading 1" has a complete new style 

1529629211_Screenshot2021-03-17at16_33_03.png.38c7d8370bca1bd0c88f54d584723aae.png

AfPubTest.afpub.zip AfPubTestNewText.afpub

Link to comment
Share on other sites

  • 1 month later...

I'm not getting quite the results you are, @Sephen. Or, actually, I am but I think that part of what you're seeing is just an artefact of the way you set up your documents.

Looking at AfPubTest.afpub, it looks like you didn't really use text styles for your headings. You did specify a style, but then it looks like you did some direct modification to the formatting using the Character panel to, for example, change the Font.

Thus, for example, your document title shows as the text style Title+ in the Context Toolbar, and in the Text Styles panel it shows as "Title + Font: Greasy Spoon-Regular". Your heading 1 text shows as heading 1+ in the Context Toolbar, and in the Text Styles panel as "heading 1 + Font: Greasy Spoon-Regular".

When you deleted all the text, and Placed the .rtf file, yes, the appearance of your Heading 1 line did change. But it changed because there was no longer an override of the font, because the font for the prior text had been a local override to the text, not part of the style. And you had deleted that text. If you had instead added a second page, and Placed the .rtf file there, the text on the first page would not have changed that way, because the local override would still be in place.

However, there is something odd happening. The original styles in the .afpub document had, for example, "heading 1" based on the style "heading". After Placing the .rtf file, "heading 1" has been changed so it is based on "Normal 1". As the new "heading 1" coming in from the .rtf file was not identical to the "heading 1" that already existed in the existing file, I think that Placing the .rtf file should have created a new style, perhaps named "heading 1 1" so that nothing using the original style would be affected.

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.