Jump to content

Non-breaking hyphen coming from Word, not recognized?


Recommended Posts

I would be very grateful if someone could confirm that non-breaking hyphens coming in a DOCX Word file are ignored when APub imports the file. According to my tests, they simply disappeared.

Link to comment
Share on other sites

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

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.4.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

Link to comment
Share on other sites

  • Moderators

It is very strange why the font is being replaced when the text is pasted into Publisher, I have logged this with our developer's to investigate further.

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

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.4.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

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?

MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 11.6.8

Affinity Designer 1.10.5 | Affinity Photo 1.10.5 | Affinity Publisher 1.10.5 | 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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.