Created attachment 160198 [details] LibreOffice doc. showing inter-pahe hyphens If Hyphenation is set to "Automatically" (in Paragraph Style > Text Flow), there is a problem with words hyphenating from one page to another. According to New Harts Rules (OUP, 2005, "Line Endings", p. 40), a recto (right-hand) page should not end with a hyphen (probably the same rule in the Chicago Manual of Style). This rule obviously applies to hard copy in book format; but for PC documents it also makes sense to apply the restriction on hyphenation to "verso" (left-hand) pages. For example, open the attached document. Look at the hyphenation from pp. 1-2, and 5-6. This is awkward to read. In a long document, you have to turn off hyphenation for each hyphenated "inter-page" word : this is time-consuming, and a document update may require you to do the whole thing over again. SUGGESTION: Add two tick-box options to the Paragraph Style > Text Flow TAB: 1. Don't hyphenate words from recto to verso pages. 2. Don't hyphenate words across any pages. Instead of hypenation, the last word will be moved, automatically, to the next page.
Reproduced the inter-page hyphenation with attached example in 6.4.4 RC1 on Windows. The enchancement request sounds very reasonable, setting to NEW.
It seems, this is also an interoperability problem, too: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/e0c0663e-a5e7-4a44-8360-b0b5df1f43e6
Also it's part of the OpenDocument standard, as fo:hyphenation-keep, but not implemented by LibreOffice yet: https://ask.libreoffice.org/t/in-writer-is-there-a-setting-to-allow-hyphenation-but-restrict-hyphens-across-pages/49622
Created attachment 192862 [details] unit test document (fo:hyphenate-keep="page") Typeset bottom hyphenated line on the next page, resulting 3-page document.
Created attachment 192863 [details] unit test document (fo:hyphenate-keep="auto") Typeset bottom hyphenated line on the first page, resulting 2-page document.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9574a62add8e4901405e12117e75c86c2d2c2f21 tdf#132599 cui offapi sw xmloff: implement hyphenate-keep It will be available in 24.8.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#132599 cui offapi sw xmloff: implement hyphenate-keep Both parts of a hyphenated word shall lie within a single page with ODF paragraph setting fo:hyphenation-keep="page". The implementation follows the default page layout of MSO 2016 and newer by shifting the bottom hyphenated line to the next page (and to the next column, see last note). Note: this is a MSO DOCX interoperability feature, used also in DTP software, XSL and CSS. * Add checkbox/combobox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep) * Add ODF import/export * Add ODF unit tests New constants of com::sun::star::text::ParagraphHyphenationKeepType, containing ODF AUTO and PAGE (borrowed from XSL), and for the planned extension ParaHyphenationKeepType of ParagraphProperties: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Note: the implementation truncates only a single hyphenated line, like MSO does: the pages can end in hyphenated lines (i.e. in the case of consecutive hyphenated lines), but less often, than before. Clean-up hyphenation dialog by collecting "Don't hyphenate" options at the end of the hyphenation settings, and negating them (similar to MSO and DTP), adding also the new option "Hyphenate across column and page": [x] Hyphenate words in CAPS [x] Hyphenate last word [x] Hyphenate across column and page Note: ODF fo:hyphenation-keep has got only "auto" and "page" attributes, while XSL defines also "column". Because of the interoperability with MSO and DTP, fo:hyphenation-keep="page" is interpreted as XSL "column", avoiding hyphenation at the end of column, not only at the end of page.
Created attachment 192959 [details] screenshot of new option “Hyphenate across column and page”
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6e8819f29b6051a0e551d77512830539913ec277 tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type It will be available in 24.8.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#132599 cui offapi sw xmloff: add hyphenation-keep-type Support XSL attribute "column" and CSS 4 attribute "spread", stored in loext:hyphenation-keep-type, to give better control over hyphenation-keep. E.g. spread: both parts of a hyphenated word shall lie within a single spread, i.e. when the next page is not visible at the same time (e.g. the next page is not a right page of a book). – css::style::ParaHyphenationKeep is a boolean property now, importing hyphenation-keep = "page" as true. – type of ParaHyphenationKeep, including the new non-ODF types is stored in the new ParagraphProperties::ParaHyphenationKeepType. – default value of ParaHyphenationKeepType is COLUMN for interoperability. – Add checkboxes to Text Flow -> Hyphenation Across in paragraph dialog: * Column (previously: Hyphenate across column and page) * Page * Spread – enabling/disabling them follows XSL/CSS 4/loext, i.e. possible combinations: * No Hyphenation across (hyphenation-keep = "page" and loext:hyphenation-keep-type = "column") * Hyphenation across [x] Column (hyphenation-keep = "page" and loext:hyphenation-keep-type = "page") * Hyphenation across [x] Column [x] Page (hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread") * Hyphenation across [x] Column [x] Page [x] Spread (hyphenation-keep = "auto") – Add ODF import/export – Update DOCX import – Add ODF unit tests Note: recent implementation depends on widow settings: disabling widow handling allows hyphenation across columns and pages not only in table cells. Note: RTF import-only, but not used bPageEnd has been renamed to bKeep. Depending on the RTF test results, likely it will need to disable the layout change, e.g. GetKeepType()=ParagraphHyphenationKeepType::AUTO, if PageEnd uses obsolete hyphenation rule, i.e. shifting only the hyphenated word to the next page, not the full line. More information: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Follow-up to commit 9574a62add8e4901405e12117e75c86c2d2c2f21 "tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 "tdf160518 DOCX: import hyphenation-keep to fix layout".
Created attachment 193611 [details] screenshot of new options “Hyphenate across”
Created attachment 193612 [details] test document (spread, right page)
Created attachment 193613 [details] test document (spread, left page)
Created attachment 193614 [details] test document (column)
Created attachment 193615 [details] test document (page, in not last column)
Created attachment 193616 [details] test document (page, in last column)
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/58350a811a8001f72b13f6ca3def5f32ea904e72 tdf#132599 add "Hyphenation across" options
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c8a99cb8dce54de506ba66d1cc0818b9b5f7858b tdf#132599 sw schema xmloff: add hyphenation-keep-type='always' It will be available in 24.8.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.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d4304cd0a4fedd0117fea3625dff1fca2945a0e6 tdf132599 sw: fix hyphenation-keep for linked frames, also for spreads It will be available in 24.8.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.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a4970f4eeb94b8c405c5e3ec094d47061253efac tdf#132599 sw: fix hyphenation-keep for tables and no widow It will be available in 24.8.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.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9668c9b8fe1d4afba335ab1f9d3309ad91bd56da tdf#132599 sw: fix test of "fix hyphenation-keep for tables and no widow" It will be available in 24.8.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.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/016d61f529f9d9ec2520fb7a808da41cf17d7295 tdf#132599 sw: fix unit tests for hyphenation-keep with frames It will be available in 24.8.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.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/0d5b1a072e025a692cee803310d2ceff0296b083 tdf#132599 add "Hyphenation across" -> Last full line of paragraph
Created attachment 194215 [details] flat ODF test document for "Last full line of paragraph".
Created attachment 194216 [details] screenshots of "Hyphenate across last full line of paragraph" LEFT: missing recognition of hyphenate-keep-type="always" in the last paragraph. RIGHT: correct layout after the implementation: hyphenated word of the last full paragraph was shifted to the last paragraph line.
Created attachment 194217 [details] screenshots of text documents "Hyphenate across" -> "auto" and "page"
Created attachment 194218 [details] test document: In tables, do not hyphenate across spread (3-page document)
Created attachment 194219 [details] test document: Hyphenation across column in linked frames
Comment on attachment 194218 [details] test document: In tables, do not hyphenate across spread (3-page document) Bottom hyphenated line of the first page is shifted to the next page, resulting a 3-page document.
Created attachment 194221 [details] screenshot: In tables, do not hyphenate across spread (left: before the fix, right: after the fix)
Created attachment 194222 [details] screenshot: Hyphenation across column in linked frames (left: before the fix, right: after the fix)
Created attachment 194223 [details] test document: In linked frames on right pages, do not hyphenate across spread
Created attachment 194224 [details] screenshot: In linked frames on right pages (left: before the fix, right: after the fix)
Created attachment 194225 [details] test document: multiple linked frames, do not hyphenate across spread hyphenated line on page 2 is allowed, because it is on the left page of its spread.
Created attachment 194226 [details] screenshot: multiple linked frames, do not hyphenate across spread