Created attachment 197344 [details] An Italian text with smart justification Ref: https://ask.libreoffice.org/t/hyphenation-does-not-appear-in-pdf/39411/3 Prerequisite: Italian dictionaries (more specifically, hyphenation). Open the attachment. In 24.8.2, and in current master, the first line has "così" hyphenated as "co-sì", with "sì" on the second line, and the dash outside of the right margin. This is wrong, because we don't support (yet) hanging punctuation at all, and this is just a manifestation of a bug. Exporting the document to PDF makes the dash disappear from the PDF.
@Mike, RobotRabbitMan, Mrciccio84 (from https://ask.libreoffice.org/t/hyphenation-does-not-appear-in-pdf/39411) and all: thanks for the bug report and feedback! Proposed fix: https://gerrit.libreoffice.org/c/core/+/176207
More information: The problem resulted only with the transitional OOXML (now called as Word 2010–365 .docx) format, because this is the format, where MS Office uses its new space shrinking justification algorithm. A possible workaround for LO 24.2 and later to save the document in Word 2007 format, but this means complete loss of the space shrinking interoperability, resulting different paragraph line count, page count etc., than in MSO 2010 and later (not mentioning the other possible differences in the layout). Because the problem is related only to the single portion lines, it's easy to fix the problem by adding an extra line portion to the line. Likely because of storing the hidden editing metadata RFIDs in hidden text portions, you don't need to modify the format of the words (italic, underline, etc. or adding a text and format it as hidden text). It's enough to insert a soft hyphen in a neutral position, e.g. in the end of a word inside the line by pressing Ctrl+- or Insert->Formatting Mark->Soft Hyphen. Definitely this workaround is not comfortable for longer text, so the suggested solution is updating for the next bug fix release of LO 24.8, which will contain the solution.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/42533c94ec1a52c49b2587e53ab55e67fc4a449a tdf#163720 sw smart justify: fix hyphenated single portion lines It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Commit description: tdf#163720 sw smart justify: fix hyphenated single portion lines Hyphen length wasn't calculated in single portion lines at shrinking, because the width of the overhanging line without the hyphen overwrote the calculated correct line width. This resulted less shrinking, than needed, also lost hyphen in the PDF export. Regression from commit 22eac3145ca62d15b47d95f4df60ce38d4f5aa46 "tdf#162220 sw smart justify: fix shrinking for single portion lines". Follow-up to commit 17eaebee279772b6062ae3448012133897fc71bb "tdf#119908 sw smart justify: fix justification by shrinking".
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/42d76a89f2730626446cc3bc85cbbaab49bbcb9d tdf#163720 sw smart justify: fix hyphenated single portion lines It will be available in 24.8.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-24-8-3": https://git.libreoffice.org/core/commit/0ebce798ecd07e86a25aa8b8023dbd3174c3335d tdf#163720 sw smart justify: fix hyphenated single portion lines It will be available in 24.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.