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

Non-breaking character style for cross-references does still break lines


Intuos5

Recommended Posts

When I create a cross reference with a character style override with the to non-breaking option set to true, the cross-reference still flows to the other line by itself. I have to manually add the character override for non-breaking, which is counter intuitive as I now have to do this manually.

Video to illustrate

Sorry my OBS settings were suboptimal.

Steps to recreate:

1. Create a new text frame and add a line of text

2. Create a second text frame and add text to reference in the cross reference

3. Go back to the first frame, add the cross reference and reference the text in the second frame

4. Create a character style like this:
image.png.056a4814763c42eb28e2b81aae32fe8e.png

5. And cross-reference style like this:

image.png.35e4253eed36cbb4528dd37815567800.png

6. Notice how, if you resize the text frame, the cross-reference still moves to the second line by itself. This means I have to manually hunt these down and apply a non-break character override to such cross-references, which defeats the purpose of applying a character style override to the cross-reference in the first place.

Link to comment
Share on other sites

Hi, your no break style is applied only to the cross-reference and not to the preceding character. Publisher is breaking the line before the cross-reference as it should.

To prevent this, you also need to add a non-breaking space as the first character of the cross-reference. This is in the text field's menu so just choose it from there. It should look like this when you're done.

Screenshot2023-09-23at12_02_25PM.png.caa7aa94f5fe847ef38f30ba53c4b7b1.png

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

14 minutes ago, MikeTO said:

Hi, your no break style is applied only to the cross-reference and not to the preceding character. Publisher is breaking the line before the cross-reference as it should.

To prevent this, you also need to add a non-breaking space as the first character of the cross-reference. This is in the text field's menu so just choose it from there. It should look like this when you're done.

That's different from how it works in Indesign iirc. I did consider this method to use a non-breaking space, but I don't want to have a space there in front of the cross references. Without GREP overrides to make non-breaking space virtually invisible (i.e. 1pt size and 1% horizontal scale), I do not a different solution.

I also checked the flow options, but there's noting that relates to this problem there.

 

Link to comment
Share on other sites

3 hours ago, Intuos5 said:

That's different from how it works in Indesign iirc. I did consider this method to use a non-breaking space, but I don't want to have a space there in front of the cross references. Without GREP overrides to make non-breaking space virtually invisible (i.e. 1pt size and 1% horizontal scale), I do not a different solution.

I also checked the flow options, but there's noting that relates to this problem there.

If you don't want a visible space then insert a Zero Width Joiner (U+200D - type the code, select it, Toggle Unicode, and cut it to the clipboard - then paste it into the Cross-References window).

Cheers

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

Thanks for the help @MikeTO, but for me the cross-reference is still breaking up with the unicode character. I have tried a couple other ones from your manual as well.

Notice that the unicode character only appears after exiting out of the Cross-reference window. You can also see it in the document with the Text > Show special characters turned on.

P.S. I was wondering how you should convert text to unicode and found it in your manual, you have to go to Text > Toggle Unicode. Interestingly, I don't see a Toggle Unicode entry for the keyboard shortcuts under Publisher > Text in Windows.

 

 

 

 

Link to comment
Share on other sites

You have to use the Zero Width Joiner (200D). I just tried it and it worked fine for me. Try this test document and scale the frame wider and narrower to see that the cross-reference is joined to the preceding word. If this test document doesn't work for you then perhaps there is an issue on Windows.

super test.afpub

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

Allright, that doesn't work either when I add a period before the cross reference. I sometimes have a period and other times a comma, so I can't make the period part of the cross-reference either unless I maintain multiple cross-references.

So I either have to maintain multiple cross-references or apply a no-break character override manually, neither of which is what I would call expected behaviour. Thus I still believe this is a bug. See the expected behaviour (with manual no-break override):

 

 

 

Link to comment
Share on other sites

Now this might be a bug. Here's a modified version of the test file with a screen recording showing the zero-width joiner in the cross-reference before a period versus a zero-width joiner in similar text before a period. They break differently but I don't think they should. Perhaps Serif could review this case.

super test.afpub

 

 

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

Would it be an option to apply a non-breaking space to the cross-reference text style that includes the zero-width joiner...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

@Intuos5, I am on Mac!

On Mac including the zero-width joiner as part of the cross-reference preset and then applying the non-breaking space to the text style applied to that preset works as shown so I'm a little baffled as to why that isn't working on Windows, you would assume the code base is identical between the two OS's.

11 hours ago, Intuos5 said:

Interestingly, I don't see a Toggle Unicode entry for the keyboard shortcuts under Publisher > Text in Windows.

On Mac the shortcut is Ctrl U... There appear to be a few text shortcuts missing on Windows, e.g., Insert Cross-Reference...

I posted a list of Shortcuts for Publisher > Text on Mac in a different post so others could compare the shortcuts between Mac and Windows... It seems as though on Windows, shortcuts are listed alphabetically on Mac they're listed in the order they appear in the Text Menu...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

1 hour ago, Hangman said:

On Mac including the zero-width joiner as part of the cross-reference preset and then applying the non-breaking space to the text style applied to that preset works as shown so I'm a little baffled as to why that isn't working on Windows, you would assume the code base is identical between the two OS's.

I think the issue is getting clouded and it works the same way on Mac and windows.

Including the ZWJ in the CR works fine as long as it is preceded by non-punctuation in the main text but if you precede it with a period then it breaks. The last test doc and screen recording I uploaded shows the difference.

Applying no-break to the entire text range will solve the problem, but it shouldn't be necessary and I think Intuos5 is right that there's a bug with using the ZWJ inside a CR after punctuation.

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

53 minutes ago, MikeTO said:

Including the ZWJ in the CR works fine as long as it is preceded by non-punctuation in the main text but if you precede it with a period then it breaks.

Unless I'm missing something here, I don't believe that is the case when the character style applied to the cross-reference preset uses a non-breaking apace...

  • For the two lines of black text, the cross-reference is preceded both with and without a punctuation mark and doesn't include a non-breaking space for the cross-reference character text style.
     
  • For the two lines of red text, the cross-reference is preceded both with and without a punctuation mark and does include a non-breaking space for the cross-reference character text style.

  

 

Sample File

super test new.afpub

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

@Intuos5, thanks for confirming and I’m glad it’s now working for you as well with your own document… 😊

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

1 hour ago, Intuos5 said:

Still, what worked on a new document does not work on the document in which I first encountered the issue. 😅

Are you able to upload the document in question or at least a small section of it where this isn't working so we can take a look as I'm struggling to understand why it wouldn't work with your original document when it works with a new document... :)

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

6 minutes ago, Hangman said:

Are you able to upload the document in question or at least a small section of it where this isn't working so we can take a look as I'm struggling to understand why it wouldn't work with your original document when it works with a new document... :)

It is a particular line that breaks whenever I get rid of the character override for no-break that I applied manually. For the rest, the method to create the footnote is the same as we discussed and I verified to get working.

I tried to isolate the issue, but I am not able to do so, because then the issue disappears. Can't upload the document, sorry.

 

Link to comment
Share on other sites

Just now, Intuos5 said:

Can't upload the document, sorry.

Completely understand...

1 minute ago, Intuos5 said:

It is a particular line that breaks. I tried to isolate the issue, but I am not able to do so.

Is it possible to create the line of text in question in a blank document so we can get an understanding of the specific content causing the issue, just in case anything stands out or in doing so is that where you can't replicate it... no problem if it's not an option but just thought another pair of eyes may highlight something...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

18 minutes ago, Hangman said:

Is it possible to create the line of text in question in a blank document so we can get an understanding of the specific content causing the issue, just in case anything stands out or in doing so is that where you can't replicate it... no problem if it's not an option but just thought another pair of eyes may highlight something...

Well, that's what I tried to do, but by isolating the line, the issue disappeared. This is the best I can show, overlaid with rectangles on my text to blacken it out. The no-break character is difficult to spot due to the margin. But this was a reference that I had just created based on the style that works elsewhere.

image.png.16f66a8d2d0090969fd413e0e7160fae.png

E: Interestingly, when I reset the frame to its defaults and reapply the collumn settings and text style, the issue persists. So it cannot be a frame contents scaling problem.

Link to comment
Share on other sites

On 9/25/2023 at 11:17 AM, Intuos5 said:

Well, that's what I tried to do, but by isolating the line, the issue disappeared. This is the best I can show, overlaid with rectangles on my text to blacken it out. The no-break character is difficult to spot due to the margin. But this was a reference that I had just created based on the style that works elsewhere.

I'm wondering whether this is a bug in 2.2, even Apple pages honours the zero width joiner...

 

@MikeTO discovered some odd behaviour in 2.2 relating to bad word breaks with an em dash earlier. I'm wondering whether this is in some way related...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

@Intuos5, out of interest, when you redid the layout was the line of text that included the cross-reference at the end the same as before, i.e., 'further away from the heavily polluted Name river.' and if so, was that particular text all sitting on the same line or did the text itself or the text line endings change in the new version?

I only ask because I was able to replicate the exact same issue in Publisher with the original text sitting in a column of a matching column width, so I think there is still potentially an issue here...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer  Beta 2.5.0 (2415) | Affinity Photo Beta 2.5.0 (2415) | Affinity Publisher Beta 2.5.0 (2415)

Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

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.