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

Publisher: Use Find command to find whole words that have partial formatting?


Recommended Posts

Affinity Publisher's find and replace functionally is beyond awesome as it can find many things. 

However, is there anyway to find whole words that have partial formatting. 

 

Example:

Welcome to this house. 

In the above example, the word "this" has partially formatting, as only the last the 3 letters of "this" have bold and underline and the first letter is not formatted. 

Is there anyway I can search for partially formatted words?

In this example, I know that the word "this" is partially formatted, so I can enter "this" into the find box. But in my use case, I don’t actually know which words in my long document have partial formatting. So I would need a search query that can find partially formatted whole words without me having to input the actual words in the find box. 

I know this is a strange use case, but there are some wizards on this forum, so I am hoping someone can help me out! Thanks!.

 

Link to comment
Share on other sites

I don't think that would be possible, for two reasons:

  1. A regular expression cannot detect the formatting of characters; that requires use of the Formatting cog for the Find term.
  2. The Formatting options do not recognize words, and cannot detect parts of strings of letters, and apply to the entire Find string.

-- 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

53 minutes ago, walt.farrell said:

I don't think that would be possible, for two reasons:

  1. A regular expression cannot detect the formatting of characters; that requires use of the Formatting cog for the Find term.
  2. The Formatting options do not recognize words, and cannot detect parts of strings of letters, and apply to the entire Find string.

I did worry it might not be possible. Thanks anyway!

 

Just now, David in Яuislip said:

LibreOffice might help
Copy text from Publisher
Paste into LibreOffice Writer
Do Format/Spotlight Character Direct Formatting 

partialformat.png

Thanks for the suggestion. Unfortunately, for this project, the way it is set up would make copy and pasting from Publisher too cumbersome. Thanks for the suggestion, anyway, as it's quite a smart idea!

Link to comment
Share on other sites

Ok my very last idea, write to svg and look for oddities
<text x="258.744px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">P</text>
<text x="325.443px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">art</text>
<text x="442.143px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">ial f</text>
<text x="597.758px" y="481.227px" style="font-family:'Arial-ItalicMT', 'Arial', sans-serif;font-style:italic;font-size:100px;fill:#231f20;">orm</text>
<text x="769.975px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">atting is</text>
<text x="1142.39px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#f04a34;">ha</text>
<text x="1253.62px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">rd to s</text>
<text x="1531.5px" y="481.227px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:100px;fill:#231f20;">pot</text>

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

If you know for sure the kind of mixed formatting you're looking for, you could make a copy of your .afpub and try this in the copy: 

1. Do a regular expression Find for (\w+)  with the formatting set to whatever is causing the issue. 

Set Replace to #\1#

2. After you run the replace operation, do another regular expression Find for (\w#|#\w)

That should help find any words with that specific mixed formatting.

(Untested.)

-- 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

If your goal is to correct these local formattings AND you have saved/named character styles assigned to the desired variations, you can use the "Reset Formatting" button to remove the style variations that are not applied as a saved style.

fixlocalformatting.jpg.d5b47511a01afe91571f3fac1a39455f.jpg

If you want to remove any local formatting (character style) yo can choose the according option by reassigning a certain paragraph style.

fixlocalformatting2.jpg.51ffc410a4f16b1adb4840ea2968976c.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

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.