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

Recommended Posts

8 minutes ago, Petar Petrenko said:

I don't want to involve numbers.

This will do letters only

Find: ([A-z]\.)([A-z])

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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

1 hour ago, Petar Petrenko said:

For example, when you change bold local formating with bold character style, it also formats bold titles, which is logical. But now, if you change the title paragraph style from bold to black it doesn't change it because character styles override character seting inside paragraph style. So, you have to select the title and change the character style from bold to [None] and only then the title becomes black.

Not sure I completely understand what you need but I would search in Body Text Paragraph Style to skip all the Title Paragraph Styles. And then do a search in Title Paragraph Style to change to Bold or Black Character style, or to just change to no style character style which will change it to local formating bold.

Further, there are the various methods of applying different Paragraph Styles but keeping or losing local and or character formatting. Now comes the 'but'. But I am unaware of any method to apply these options using the Find and Replace though so if that is what you are after then we are out of luck.

2059931418_ScreenShot2020-10-16at11_23_54AM.png.8271c6c365b04232a84cbb5130a06f07.png

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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

1 hour ago, Petar Petrenko said:

So, you have to select the title and change the character style from bold to [None] and only then the title becomes black.

Can't you run Find and Replace character styles to [None] on all headings as a second step?

2017 27” iMac 4.2 GHz Quad-Core Intel Core i7 • Radeon Pr 580 8GB • 64GB • Ventura 13.6.4.

iPad Pro (10.5-inch) • 256GB • Version 16.4

Link to comment
Share on other sites

1 minute ago, Old Bruce said:

Not sure I completely understand what you need but I would search in Body Text Paragraph Style to skip all the Title Paragraph Styles. And then do a search in Title Paragraph Style to change to Bold or Black Character style, or to just change to no style character style which will change it to local formating bold.

Further, there are the various methods of applying different Paragraph Styles but keeping or losing local and or character formatting. Now comes the 'but'. But I am unaware of any method to apply these options using the Find and Replace though so if that is what you are after then we are out of luck.

2059931418_ScreenShot2020-10-16at11_23_54AM.png.8271c6c365b04232a84cbb5130a06f07.png

When the text is placed into InDesign or Publisher in the beggining it has no styles. I first:

  1. clean the white spaces,
  2. remove extra space(s) before punctuation marks,
  3. add extra space after punctuation marks (to avoid glued words),
  4. again replace 2 spaces with 1,
  5. then remove empty paragraphs and, at the end,
  6. I change local character formating with character styles (bold, italic, bold italic superscipt, underline...).

At this point, future titles get Bold character style and whatever you chose for the font in Title paragraph style (Italic, Bold Italic, Black, Condensed...) it is still Bold unless you remove Bold character style from it which is step no. 7.

Now you can see why I need RegEx badly. If paragraph styles do not reset local formating, steps 6 and 7 could be easily avoided and save a precious time.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

6 minutes ago, Seneca said:

Can't you run Find and Replace character styles to [None] on all headings as a second step?

Yes, but this is additional step that can be avoided.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

 

On 10/16/2020 at 9:45 AM, Petar Petrenko said:

@Patrick Connor mentioned above that 3 of my questions are covered in your video. If the forth one isn't, I would like to see how it can be done, if possible.

I’m a little behind on the discussion, but as I enjoyed making the first video, I decided to make a second video to address this last point from your request: using find and replace for formatting and text styles. This video has basically two parts:

  1. How to find and replace with formatting and combine that power with regular expressions (the first 13.5 minutes), 
  2. A demonstration from a portion of a real document where careful use of those principles helped save many hours of manual work (the last 30 minutes).

Some people may only want to watch just the first portion to save time, as the second, longer portion is an extended example. But if this interests you, then you may want to give it a watch. I use nothing more than find and replace with regex to restore the formatting of a complex page starting from raw text. One of the expressions I build is fairly complex, and I demonstrate the process of building and testing it until it is ready to use in Publisher.

Link to comment
Share on other sites

On 10/16/2020 at 12:09 PM, Petar Petrenko said:

I would also like to know how to add extra space after punctuation marks but avoiding formated numbers like1.234,23. Why? There are cases when the customer didn't enter space after fullstop (comma, semicollon...) and now we have 2 words joined into one with punctuation mark in between.
Also, is it possible to combine multiple RegEx into one?

Here is a comprehensive pattern that I recommend. Although it is harder to read than what was helpfully suggested before, it has the advantage that it can work with non-Latin letters and that it can add spaces when a word next to a number is missing a space:

(?<=[^\W\d])[\.,;:](?=[^\W\d])|(?<=[^\W])[\.,;:](?=[^\W\d])|(?<=[^\W\d])[\.,;:](?=[^\W])

Here is a video explanation. I did make an error in the video: I forgot that in some flavors of regex you can select letters but not numbers with [[:alpha:]] (and Publisher does support it), but what I used used [^\W\d] (which means any character that is not a non-word character or a number) is still shorter.

P.S. Please forgive my attempt to say your name as the English “Peter.”

Link to comment
Share on other sites

9 hours ago, garrettm30 said:

I’m a little behind on the discussion, but as I enjoyed making the first video, I decided to make a second video to address this last point from your request: using find and replace for formatting and text styles. This video has basically two parts:

  1. How to find and replace with formatting and combine that power with regular expressions (the first 13.5 minutes), 
  2. A demonstration from a portion of a real document where careful use of those principles helped save many hours of manual work (the last 30 minutes).

Some people may only want to watch just the first portion to save time, as the second, longer portion is an extended example. But if this interests you, then you may want to give it a watch. I use nothing more than find and replace with regex to restore the formatting of a complex page starting from raw text. One of the expressions I build is fairly complex, and I demonstrate the process of building and testing it until it is ready to use in Publisher.

Thank you very much @garrettm30 for your videos and comments. There are really very helpful and time saving. From now on, my work will be nothing but a joy.

8 hours ago, garrettm30 said:

P.S. Please forgive my attempt to say your name as the English “Peter.”

You can call me as you like. It's the person that matters, not the name. :)

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

9 hours ago, garrettm30 said:

(?<=[^\W\d])[\.,;:](?=[^\W\d])|(?<=[^\W])[\.,;:](?=[^\W\d])|(?<=[^\W\d])[\.,;:](?=[^\W])

 

I very much appreciate your time and effort to provide these explanations and the videos. Thank you!

The quote above perhaps illustrates why I get overwhelmed by regular expressions 😉  But I will give it another try.

d.

Affinity Designer 1 & 2   |   Affinity Photo 1 & 2   |   Affinity Publisher 1 & 2
Affinity Designer 2 for iPad   |   Affinity Photo 2 for iPad   |   Affinity Publisher 2 for iPad

Windows 11 64-bit - Core i7 - 16GB - Intel HD Graphics 4600 & NVIDIA GeForce GTX 960M
iPad pro 9.7" + Apple Pencil

Link to comment
Share on other sites

On 10/17/2020 at 11:06 PM, garrettm30 said:

I’m a little behind on the discussion, but as I enjoyed making the first video, I decided to make a second video to address this last point from your request: using find and replace for formatting and text styles. This video has basically two parts:

Actually, I am rather familiar with F/R wirh formating. I do this almost every day, as I said somewhere above. I already have pre-build text styles in Publisher and InDesign that come up with every new document for time saving purposes. What annoys me is that Paragraph styles reset local character formatings. I don't know how to say, but it is bug/error (sorry I can't find an appropriate word) that goes from the very start in Quark and InDesign and is accepted in Affinity [By Design]. If you guys -- Affinity Team -- are willing to fix it, Publisher will become extremly powerful app. Here is an image from the thread "Text import pannel" I started on Deceber 8, 2019. If you apply numbers 13, 14 and 15 to work "on the fly", to correct mistakes while typing (beside when placing text) as Word has, all Publisher documents will be (almost) error-proof.

Import Dialog Panel.png

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

  • 1 year later...

Find words that must be changed to italics In Affinity Publisher

(?:\_(\s*\w*|\s*\w*\s*\w*|\s*\w*\s*\w*\s*\w*)\_)

Replace field: $1 and italic character style formatting

Note: This finds _word_    and    _Two words_  and    _all Three words_

Hi!  My name is _Melissa Jane Leavitt_ and I live in _Victoria_, _British Columbia_.
Changes to:
Hi!  My name is Melissa Jane Leavitt and I live in Victoria, British Columbia.

This is very handy, but is there a better (shorter?  Inclusive to more than 3 words in a sentence?) to write this code?  I'm stumped!

Thank you so much in advance,
Nin

Link to comment
Share on other sites

Try this:

(?<= \_).+?(?=\_[ .,])

* EDITED *
NOTE: There is a space character after the first = and after [.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

2 hours ago, NNN said:

(?<= \_).+?(?=\_[ .,])

NOTE: There is a space character between = and \ and after the open bracket.

You have a space after the first =, but not after the second one.  

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

14 hours ago, Nin said:

Find words that must be changed to italics In Affinity Publisher

If you have the underscore as the delimiter for start end of italics then this works for me.

_(.+?)_

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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

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.