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

Can I search for hyphenation chars?


Recommended Posts

For whatever reason, APub decided to break very oddly the word "Redensart":

image.png.9cc07284522f32a96b067787d9c93de2.png

I can't see why it is doing that. I even installed a custom hyph dictionary and selected it but it did not work.

First I thought the dict file was not loaded but then I cleared every other word from this custom dict, reloaded APub and saw that Redensart was the only word broken to the next line, so apparently the file works, but

re1dens1art

is not accepted.

Since I cannot be sure where else APub did such a thing I would like to be able to search for the automatically inserted hyphenation break sign but it seams to be impossible.

Did somebody else successfully searched for it? My plan would be to search for a regex of this hyphen followed by a single char followed by something not a char, but for that I need to be able to search for the hyphen first :/

 

Affinity User on Windows 11

Link to comment
Share on other sites

See also related this thread, you can always also search after the hexadecimal unicode characters from specific Glyphs (dashes/hyphens) etc.

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

15 minutes ago, v_kyr said:

See also related this thread, you can always also search after the hexadecimal unicode characters from specific Glyphs (dashes/hyphens) etc.

 

Have you tried this on a text where the hyphen has been placed with auto hyphenation? I am unable to properly search for them even with unicode. It appears to be a visual element only.

Affinity User on Windows 11

Link to comment
Share on other sites

14 minutes ago, Seikilos said:

It appears to be a visual element only.

It is a visual element only, until the file is exported. Because until then, any adjustments made to the text or to the frames could remove it.

 (Actually, even in a PDF it may still be a visual element.)

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

4 minutes ago, walt.farrell said:

It is a visual element only, until the file is exported. Because until then, any adjustments made to the text or to the frames could remove it.

 (Actually, even in a PDF it may still be a visual element.)

Crap. Exported it to PDF and you are right, this is still not a searchable character.

Affinity User on Windows 11

Link to comment
Share on other sites

4 minutes ago, Seikilos said:

Crap. Exported it to PDF and you are right, this is still not a searchable character.

Thanks for confirming that. I haven't had time to check.

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

1 hour ago, Seikilos said:

For whatever reason, APub decided to break very oddly the word "Redensart":

image.png.9cc07284522f32a96b067787d9c93de2.png

I can't see why it is doing that. I even installed a custom hyph dictionary and selected it but it did not work.

Where did this text come from? There are actually three different "hyphen" characters. The U+00AD SOFT HYPHEN will not appear unless it is needed. So I am wondering if your text source has this character embedded. Deleting the word and retyping it should fix it if that is the case.

If not, please attach an example document and the PDF.

 

Link to comment
Share on other sites

1 hour ago, Seikilos said:

APub decided to break very oddly the word "Redensart":

image.png.9cc07284522f32a96b067787d9c93de2.png

I can't see why it is doing that. I even installed a custom hyph dictionary and selected it but it did not work.

Does your screenshot show the custom or the default Affinity dictionary?

I am wondering because with the default I get a different hyphenation, but wrong, too!

1954810538_hyphenationGermanredensart.thumb.jpg.64e47a65f9754934a4b609ec0ff7994c.jpg

It might be valuable if you add your thread / finding as a new post (maybe with link to this thread) to this existing bug report for German hyphenation issues:

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

Link to comment
Share on other sites

2 hours ago, Seikilos said:

Have you tried this on a text where the hyphen has been placed with auto hyphenation?

Nope haven't tested that for hyphenation signs, as far as those aren't treated as a special internal chars it should work on a common base. - However, the default german hyphenation is either way wrong applied here then by APub, since for the word "Redensart" the right hyphenations would be instead ...

  • Worttrennung: Re·dens·art, Plural: Re·dens·ar·ten.

So all I've seen so far here in this thread as screenshots is either way handled wrong! - Thus in case of trouble (no correct hyphenations) here in APub, I would try to force/overwrite that manually by applying own set en-/em-daches then.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

2 hours ago, thomaso said:

Does your screenshot show the custom or the default Affinity dictionary?

I am wondering because with the default I get a different hyphenation, but wrong, too!

1954810538_hyphenationGermanredensart.thumb.jpg.64e47a65f9754934a4b609ec0ff7994c.jpg

It might be valuable if you add your thread / finding as a new post (maybe with link to this thread) to this existing bug report for German hyphenation issues:

I tested the default and the custom one provided by Libre Office (from the docs of APub)

Affinity User on Windows 11

Link to comment
Share on other sites

3 hours ago, LibreTraining said:

Where did this text come from? There are actually three different "hyphen" characters. The U+00AD SOFT HYPHEN will not appear unless it is needed. So I am wondering if your text source has this character embedded. Deleting the word and retyping it should fix it if that is the case.

If not, please attach an example document and the PDF.

 

I've attached the apub file, the pdf file and the dict file where only Redensart is in it. Feel free to test searching for the hyphen. Would be great if it would work 👍

Broken_Hyphen.zip test.afpub test.pdf

Affinity User on Windows 11

Link to comment
Share on other sites

I wonder how much of this is caused by the colon after the final letter.

Any way inserting a discretionary hyphen into the word where you want it to break will fix this. AKA as a soft hyphen, lord but I loathe that term.

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

@Seikilos

Did you used the additional hunspell dics which are listed here for DE?

 

5 minutes ago, Old Bruce said:

I wonder how much of this is caused by the colon after the final letter.

Shouldn't matter much, as I think even if it's left out, it will be just as wrong.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

2 minutes ago, v_kyr said:

@Seikilos

Did you used the additional hunspell dics which are listed here for DE?

 

Shouldn't matter much, as I think even if it's left out, it will be just as wrong.

After the broken hyphenation I downloaded the linked hyph_de_DE.dict file only. But it did not change a lot

Affinity User on Windows 11

Link to comment
Share on other sites

12 minutes ago, Old Bruce said:

I wonder how much of this is caused by the colon after the final letter.

Any way inserting a discretionary hyphen into the word where you want it to break will fix this. AKA as a soft hyphen, lord but I loathe that term.

Probably in this spot, but since I currently cannot search for auto inserted hyphens this might fix one location but who knows how many wrong syllable breaks there are left in the text.

This feels kinda unsettling.

Affinity User on Windows 11

Link to comment
Share on other sites

1 hour ago, Seikilos said:

I tested the default and the custom one provided by Libre Office (from the docs of APub)

Again: which dictionary does your screenshot represent?
– If it is the default Affinity dictionary: What operating system are you using? (because I don't get your hyphenation on mac)

And: What are "the docs of APub" where you found a Libre Office dictionary?

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

Link to comment
Share on other sites

8 minutes ago, thomaso said:

Again: which dictionary does your screenshot represent?
– If it is the default Affinity dictionary: What operating system are you using? (because I don't get your hyphenation on mac)

And: What are "the docs of APub" where you found a Libre Office dictionary?

I am using APub on Windows 11. The screenshot was done while I've been already using the german hyph_de_DE.dict which I placed in a subdirectory de_DE in a folder that I set vial Preferences > Tools > Additional dictionary folder.

But the spelling was already out of the box broken for me, that's why I went on looking for a better dictionary. I also added the word re1dens1art manually into the file I downloaded.

 

The docs are 1:1 text of this thread:

 

Affinity User on Windows 11

Link to comment
Share on other sites

58 minutes ago, Seikilos said:

I've attached the apub file, the pdf file and the dict file where only Redensart is in it. Feel free to test searching for the hyphen. Would be great if it would work 👍

Broken_Hyphen.zip 42.16 kB · 2 downloads test.afpub 20.37 kB · 0 downloads test.pdf 26.96 kB · 0 downloads

Your original text only has the rt text in there - no hidden hyphens.
And the hyphen in the PDF is: U+002D HYPHEN-MINUS

So there is nothing to search for in the original text.
This does appear to be an APub adding an oddly placed hyphen issue.

Link to comment
Share on other sites

8 minutes ago, LibreTraining said:

This does appear to be an APub adding an oddly placed hyphen issue.

Do you know / have an idea what may technically be causing such an odd hyphen which gets set although it is not in APub's dictionary?

And, does this mean, the OP's or any custom set dictionary is generally ignored by APub if there is one already in the app package?

1826590559_APubpackagehypenationdictionary.jpg.81e432f3a39275ed02fd4f0a80847dc7.jpg

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

Link to comment
Share on other sites

1 hour ago, v_kyr said:

Shouldn't matter much, as I think even if it's left out, it will be just as wrong.

Not being able to read German and I have no knowledge of hyphenation rules in that language so the following should be taken with a grain of salt. No hyphenation problem here if I delete the colon. No hyphenation problem here if I add a Narrow Non-breaking Space between the "t" and the ":".  

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

16 minutes ago, Old Bruce said:

Not being able to read German and I have no knowledge of hyphenation rules in that language so the following should be taken with a grain of salt. No hyphenation problem here if I delete the colon. No hyphenation problem here if I add a Narrow Non-breaking Space between the "t" and the ":".  

Is the expected behaviour of APub to ignore any non word characters when constructing a word that is then hyphenated?

Affinity User on Windows 11

Link to comment
Share on other sites

33 minutes ago, thomaso said:

Do you know / have an idea what may technically be causing such an odd hyphen which gets set although it is not in APub's dictionary?

And, does this mean, the OP's or any custom set dictionary is generally ignored by APub if there is one already in the app package?

1826590559_APubpackagehypenationdictionary.jpg.81e432f3a39275ed02fd4f0a80847dc7.jpg

I don't think so.

One of my experiments was to add a custom dictionary (the one I linked above) but to delete all contents (except some control statement at the top of it) and add Redensart to it.

The file looked like this

 

ISO8859-1

COMPOUNDLEFTHYPHENMIN 2
COMPOUNDRIGHTHYPHENMIN 2

re1dens1art

With this custom dict I noticed after a restart that all other words were no longer automatically hyphened. Only "Redensart" but by changing the width the text box sometimes the word was properly hyphened like "Re-densart" or "Redens-art" and in some cases back to "Redensar-t".

So the colon might interfere with the hyphenation logic

Affinity User on Windows 11

Link to comment
Share on other sites

2 hours ago, Seikilos said:

So the colon might interfere with the hyphenation logic

Yes, I was just playing with that.
If you change the colon to a different punctuation character it works - period, comma, semi-colon, exclamation point, question mark - as soon as you change the character the hyphenation works as expected.
So it does appear to be an error in the hyphenation logic.
Also known as a bug.

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.