big smile Posted March 19 Share Posted March 19 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!. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted March 19 Share Posted March 19 I don't think that would be possible, for two reasons: A regular expression cannot detect the formatting of characters; that requires use of the Formatting cog for the Find term. The Formatting options do not recognize words, and cannot detect parts of strings of letters, and apply to the entire Find string. big smile 1 Quote -- 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 More sharing options...
David in Яuislip Posted March 19 Share Posted March 19 LibreOffice might help Copy text from Publisher Paste into LibreOffice Writer Do Format/Spotlight Character Direct Formatting thomaso and big smile 2 Quote 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 More sharing options...
big smile Posted March 19 Author Share Posted March 19 53 minutes ago, walt.farrell said: I don't think that would be possible, for two reasons: A regular expression cannot detect the formatting of characters; that requires use of the Formatting cog for the Find term. 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 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! Quote Link to comment Share on other sites More sharing options...
David in Яuislip Posted March 19 Share Posted March 19 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> Quote 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 More sharing options...
walt.farrell Posted March 19 Share Posted March 19 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.) big smile and Old Bruce 2 Quote -- 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 More sharing options...
thomaso Posted March 19 Share Posted March 19 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. If you want to remove any local formatting (character style) yo can choose the according option by reassigning a certain paragraph style. big smile 1 Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
Recommended Posts
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.