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

Non-breaking hyphen coming from Word, not recognized?


Recommended Posts

I don't have Word, but I tried this with LibreOffice.

The non-breaking hyphen was not, exactly, ignored. It's true that it did not transfer into the .afpub file. But all my text in LibreOffice was in Times New Roman, and in Publisher all the text after the non-breaking hyphen switched to Lucida Sans. Very odd.

non-breaking-hyphen-from-docx.afpub

non-breaking-hyphen.docx

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

19 hours ago, walt.farrell said:

I don't have Word, but I tried this with LibreOffice.

The non-breaking hyphen was not, exactly, ignored. It's true that it did not transfer into the .afpub file. But all my text in LibreOffice was in Times New Roman, and in Publisher all the text after the non-breaking hyphen switched to Lucida Sans. Very odd.

non-breaking-hyphen-from-docx.afpub

non-breaking-hyphen.docx 4.14 kB · 3 downloads

Looks like LibreOffice XML soup. This is from the docx file.
Look about 3/4 of the way down and you will see the font change.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14 wp14">
  <w:body>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="Normal"/>
        <w:rPr></w:rPr>
      </w:pPr>
      <w:r>
        <w:rPr></w:rPr>
        <w:t>Here is a long</w:t>
      </w:r>
      <w:r>
        <w:rPr>
          <w:rFonts w:eastAsia="Times New Roman" w:cs="Times New Roman" w:ascii="Times New Roman" w:hAnsi="Times New Roman"/>
        </w:rPr>
        <w:noBreakHyphen/>
      </w:r>
      <w:r>
        <w:rPr>
          <w:rFonts w:eastAsia="NSimSun" w:cs="Lucida Sans"/>
        </w:rPr>
        <w:t>ish word.</w:t>
      </w:r>
    </w:p>
    <w:sectPr>
      <w:type w:val="nextPage"/>
      <w:pgSz w:w="12240" w:h="15840"/>
      <w:pgMar w:left="1134" w:right="1134" w:header="720" w:top="1134" w:footer="720" w:bottom="1134" w:gutter="0"/>
      <w:pgNumType w:fmt="decimal"/>
      <w:formProt w:val="false"/>
      <w:textDirection w:val="lrTb"/>
    </w:sectPr>
  </w:body>
</w:document>

As you said - very odd.

Link to comment
Share on other sites

11 minutes ago, LibreTraining said:

As you said - very odd.

Thanks. Looks like that was a LibreOffice glitch, not a Publisher glitch.

@DWright: Sorry for confusing the issue with an apparent LibreOffice problem. The test file provided above by @Pedrober demonstrates the Publisher issue, without the confusion.

Edit: Also, I've been using Place, not Paste.

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

What happens going the other way, Non-Breaking hyphens made in Publisher and then copy paste into Word?

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

9 hours ago, Pedrober said:

Walt,

Please use this very brief file created in Word.

Regards.

Non_breaking_hyphen.docx 12.11 kB · 6 downloads

A non-breaking hyphen character is not actually there.
There is an XML element like this: <w:noBreakHyphen/>
(same in the LO docx file)

So to import that APub would need to recognize that code and change it to an actual character.

Quite odd.

 

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.