Hyphens become visible in eight-character words before punctuation
Posted: Fri Feb 15, 2019 11:47 pm
Generating outputs using PDF (DITA and CSS)
I'm using the overflow-wrap: break-word CSS attribute to wrap long words in table cells. I'm also using -oxy-hyphenation-character: " "; to remove the hyphen in wrapped words. The problem is, words with 8 or more letters before a punctuation symbol have a hyphen inserted in them.
For a sample XML as shown below:
The output is all fine except for the following:
Account number on the transaction-.
Weird-Detl.Account
Format is alphanumeric-.
The hyphen after alphanumeric and transaction shouldn't be there. Even more strangely, copy-pasting that character into a text editor parses it into a blank, not a hyphen.
How do I stop it from being printed as a hyphen onto my PDF?
I'm using the overflow-wrap: break-word CSS attribute to wrap long words in table cells. I'm also using -oxy-hyphenation-character: " "; to remove the hyphen in wrapped words. The problem is, words with 8 or more letters before a punctuation symbol have a hyphen inserted in them.
Code: Select all
*[class~="topic/table"] {
table-layout:fixed;
border: none;
width: 100%;
overflow-wrap: break-word;
-oxy-hyphenation-character: " "; /* removes hyphens in line-broken words */
}
Code: Select all
<table id="table_57F77DFD75244344925AA64B43216F5E">
<title>First Table In the Table List</title>
<tgroup cols="2"><colspec colnum="1" colname="col1"
colwidth="2in"/><colspec colnum="2" colname="col2" colwidth="4.85in"/><thead>
<row>
<entry colname="col1">Field
</entry>
<entry colname="col2">Description
</entry>
</row></thead>
<tbody>
<row>
<entry colname="col1">
<p>Account
</p>
</entry>
<entry colname="col2">
<p> Account number on the transaction.
</p>
<p> Weird-Detl.Account
</p>
<p>Format is alphanumeric.
</p>
</entry>
</row>
Account number on the transaction-.
Weird-Detl.Account
Format is alphanumeric-.
The hyphen after alphanumeric and transaction shouldn't be there. Even more strangely, copy-pasting that character into a text editor parses it into a blank, not a hyphen.
How do I stop it from being printed as a hyphen onto my PDF?