Pelted Posted February 4, 2020 Posted February 4, 2020 I've got a rather large document (300+ pages) that is divided into sections. The text gets placed then a few "find & replace" steps are done to clean things up before flowing. Works great, but no I have some small "find & replace" steps that need to only happen to particular sections and there doesn't seem to be any way of scoping this to section or even to selected text areas. This is supper problematic as the changes I need to make to smaller sections (15-60 pages) would wreck major layout issues if they are done to the entire document. 000 and Juljes 2 Quote
walt.farrell Posted February 4, 2020 Posted February 4, 2020 Find/Replace as currently implemented apply to the entire document. There are some ways, using the Regular Expression option of Find/Replace, to reduce that scope, but for now the only ones that I have found involve making some small changes to the document. For example, if you wanted a particular change to occur only to the text contained in a certain set of linked text frames that spans pages 5 through 10 then you could: Pick a text string that does not occur in your document, perhaps something like %%% Add that string at the beginning of the text frame on page 5, and at the end of the text frame on page 10. You could then do a Find/Replace, with the Regular Expression option turned on, where your regular expression will look for %%% at both the start and end of the expression.In the middle you would build the rest of the regular expression to find the text that needs to change. And then you would use a corresponding regular expression Replace string to actually make the changes. After the Find/Replace operation, you would remove the marker from the start and end of the text frames. Note that if your Publisher document is organized as separate Stories, where a Story is a complete set of linked text frames, and you want to restrict the Find/Replace operation to one particular Story, you can just add the marker at the start of that Story, and for the end of the Regular Expression you can use \z in the expression, without needing to insert the marker into the text frame. But you still need the marker at the beginning of the Story. Note, too, that step 3 can be tricky, and will of (course) require knowledge of regular expressions. For example, to change the name Tom to Fred within that set of text frames, something like this might be used as the Find expression: (%%%.*?)(\bTom\b)(.*%%%) The Replace expression would then be \1Fred\3 (or $1Fred$3). Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
Pelted Posted February 5, 2020 Author Posted February 5, 2020 (edited) Thank you Walt for the detailed response. I'm actually much more familiar with regex than I am publisher documents so by the time I got to your reply I had already built an external text processing tool and rebuilt the pages based on that output. I missed the regex option in Publisher as it didn't occur to me to just set unique text markers in the frames. Duh... I over engineered a solution when there was an easy one sitting right there. Hopefully in the future they as scope to the Find & Replace features, but this is a solid work around. Or better yet, a scripting interface for automation throughout the suite. Thanks Edited February 5, 2020 by Pelted walt.farrell 1 Quote
zkarj Posted April 23, 2020 Posted April 23, 2020 I'm also finding the inability to scope Find and Replace to be problematic at the moment. I'm already using complex regular expressions so could expand those but it's not ideal. I also can't do the work outside of Publisher because I am applying styles on the replacement. Then again, the only reason I have to be doing these Find and Replace actions is because it's the only way to get styled text into Publisher. (I copy Markdown so I have the characters to target for replacing with styles.) Quote
Juljes Posted May 16, 2020 Posted May 16, 2020 On 2/4/2020 at 8:56 PM, Pelted said: I've got a rather large document (300+ pages) that is divided into sections. The text gets placed then a few "find & replace" steps are done to clean things up before flowing. Works great, but no I have some small "find & replace" steps that need to only happen to particular sections and there doesn't seem to be any way of scoping this to section or even to selected text areas. This is supper problematic as the changes I need to make to smaller sections (15-60 pages) would wreck major layout issues if they are done to the entire document. I agree: it should have an easy way to limit the scope when choosing "Replace All", i.e only the selected text or the selected story (linked text frames). Regular Expressions are OK for very advanced users but not for normal people, and Affinity Publisher is aimed for regular people, right? Old Bruce 1 Quote
Bryce Posted April 6, 2021 Posted April 6, 2021 has this been fixed at all? Find and replace should be limited by page, frame, or entire document, I would think. Quote
walt.farrell Posted April 6, 2021 Posted April 6, 2021 3 minutes ago, Bryce said: has this been fixed at all? No, it has not been improved yet. Bryce 1 Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
Bryce Posted April 6, 2021 Posted April 6, 2021 that would be more appropriate. Thanks for the update. walt.farrell 1 Quote
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.