Issue 98482 - At line end, break URLs after slashes, no hyphen added
Summary: At line end, break URLs after slashes, no hyphen added
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Trivial with 5 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2009-01-26 14:34 UTC by karasu
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
ODT, no idea how it will come out (12.32 KB, application/vnd.oasis.opendocument.text)
2009-01-29 16:58 UTC, udippel
no flags Details
PDF, to demonstrate how it looks here (81.45 KB, application/pdf)
2009-01-29 16:58 UTC, udippel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description karasu 2009-01-26 14:34:59 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.
Comment 1 eric.savary 2009-01-29 16:36:19 UTC
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?
Comment 2 udippel 2009-01-29 16:58:05 UTC
Created attachment 59758 [details]
ODT, no idea how it will come out
Comment 3 udippel 2009-01-29 16:58:58 UTC
Created attachment 59759 [details]
PDF, to demonstrate how it looks here
Comment 4 udippel 2009-01-29 17:03:07 UTC
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
Comment 5 karasu 2009-01-29 17:35:01 UTC
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.
Comment 6 karasu 2009-01-31 21:01:20 UTC
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. 
Comment 7 eric.savary 2009-02-02 16:36:00 UTC
Reassigned to Requirements
Comment 8 nyh 2009-07-12 07:34:53 UTC
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)