Apache OpenOffice (AOO) Bugzilla – Issue 98482
At line end, break URLs after slashes, no hyphen added
Last modified: 2013-08-07 14:38:26 UTC
In a Writer document, if a an URL is added that exceeds the available space on a line, it starts on a new line. If it still exceeds the available space on the new line, it breaks and gets wrapped to the next line in seemingly arbitrary ways. This behaviour creates large gaps in a text and is especially undesirable in justified copy. It also contravenes most style guidelines, which demand that URLs be broken at slashes. An improved default behaviour would be for URLs _not_ to start on a new line and to be broken only after slashes and before punctuation. To avoid ambiguity, no hyphen should be inserted when an URL gets broken.
Please attach a document showing: - a hyperlink which does not break at slash or punctuation mark - a hyperlink which is hyphenated. Cannot reproduce. Else I'm guessing you are not using a version 1.0.3 but a 3.0, don't you?
Created attachment 59758 [details] ODT, no idea how it will come out
Created attachment 59759 [details] PDF, to demonstrate how it looks here
Though I am not the submitter, I permit myself to add that you might misread the RFE. For all of us who publish regularly, the references in academic documents tend to contain ever more hyperlinks. Alas, and for good reasons, no publisher wants the hyperlinks in the references in academic journals and (printed) books as hyperlinks. Because the blue and underlined nature of hyperlinks renders them very unseeingly when printed. Therefore, the 'hyperlinks' I talk about are URLs only by content, not by format. You might find that the autodetection of URLs is very often turned off by writers of printed matter. They still need to be wrapped, though, according to APA and other citation styles, as hyperlinks; *without* being blue and underlined. In order to be really usable for publication purposes, OpenOffice must contain a feature to wrap text describing hyperlinks according to the rules for wrapping hyperlinks; not according to language dictionaries. I do add a file that shows pretty ugly layouts, I also add a PDF-version, because hyphenation is language dependent. Uwe
I fully endorse udippel's comments. Yes, this is (mostly) about reference lists in academic papers, and no, it is not about clickable hyperlinks (for which most writers probably have no use in word-processed documents anyway) but about how to represent URLs (or, to be technical about it, URIs) in print so as to comply with print style guidelines. Any URI, ie any string that starts with http://, ftp:// etc., should be exempt from the usual word division rules, and the strings should break after slashes and before punctuation, and _only_ after slashes and before punctuation, and they should not have a hyphen where they wrap. Current behaviour (as verified in OOo 3.0.0/Linux) is for URIs to be subjected to regular word division rules, which introduce hyphens where hyphens are less than useful because they introduce an ambiguity as to whether or not they're part of the URI.
Additional comment from es Thu Jan 29: > I'm guessing you are not using a version 1.0.3 but a 3.0, don't you? True. The version number was an error. I have just corrected it and set the number to 3.0. Thanks for pointing this out and sorry for the delay in correcting the mistake. I wasn't aware I had set a version number and didn't understand your comment at first.
Reassigned to Requirements
I have also run into this problem, but I am not if OpenOffice should really know about URLs, or whether it should have a more flexible algorithm for very long words with slashes in them (in which case it makes sense to break after a slash). This applies not just to URLs, but also to file names. By the way, it is already very easy to work around this problem: control-slash adds a "no width, optional break" and if you add such a thing after every slash, you get exactly the behavior you want, except you have much more control: you are free not to add control-slash for short URLs, you are free to allow breaks after only some of the slashes but not others, and you're free to allow breaks also in other places, not just slashes (e.g., image a long URL with "?" and "&" parts. With this control-slash available, I'm not sure any other solution specific to URLs is necessary. Perhaps control-slash should just be advertised more (searching in Google, I see many people asking how to break up URls, and nobody seemed to realize that control-slash is available)