Typophile

urls and line breaks

Patricia Fabricant

I'm typesetting a book that contains urls - some of them are really long. Both Quark and InDesign default not to break the names, which results in some mighty bad word spacing. Does anybody know the protocol with this? It would look much better to break them but would that confuse people - make them think there's a hyphen in the url? I just ran into this problem while reading the NYTimes - they don't break the url, but they also are not known for their typesetting finesse either (lots of widows & orphans). The problem is particularly glaring in justified type.

I would break the URL and NOT use a dash or hyphen, then surround it in some sort of bracket. I believe WIRED used to use <>. So, you'd have:

visit the long crazy URL company at < www.thisisourcrazylongurl.com/keep/
going/this/is/really/long.php?crazyQuerystring=939283849392837474&923930
3939498382930949483 >

All that said, you may want to suggest they don't bother with this. A few arguments:

- Long URLs in print will never be typed in by hand. People are lazy
- they are ugly and hard to typeset
- the longer the URL, the more likely it's going to a very specific
page/bit of data on the site and the more likely it's going to
rot than a shorter url.

For instance, this URL:

www.ourcompany.com/products/fancy-yellow-hammer

is more likely to rot faster than:

www.ourcompany.com/products/

which is more likely to rot faster than:

www.ourcompany.com

So, if linking to fancy yellow hammers, in print, I'd suggest they use:

visit the products section of our web site at < www.ourcompany.com > to find our selection of hammers.

^ ugh. The forum automatically puts URLs on their own lines, but I think the point comes across.

Perhaps a better option/best compromise would be to footnote all of the URLs.

The nice thing about it is that the first link in the footnotes could go to a page that the author maintains:

www.publisher.com/thebook/links

That way a reader of the book can go right to that page and access all the URLs referenced in the publication. A bonus to the reader, if the author is willing, is that those links can be updated as needed.

The rules I think make sense (and I believe this is close to CMS) for breaking long URLs:

1. Never use a hyphen to indicate a break
2. Never break directly after a hyphen as it creates ambiguity
3. Send anything that could be construed as terminal punctuation to the next line (. ! ?)
4. Break directly after all other analphabetics

I totally agree with Darrel and Eric. Break up a long url but do not use dashes. You may want to enclose the url or set the url in italics.

Two other ideas:
* Leave off the http:// to save yourself 7 characters, or even the www. as in Google.com.
* Try using SnipUrl.com, NotLong.com, or TinyUrl.com to shorten monsterously long addresses. SnipUrl also gives registered users the option of selecting their own keyword instead of the default alpha-numeric value. E.g., these two take you to the same place:
http://snurl.com/parsi
http://www.tomdispatch.com/post/174838/peter_galbraith_the_iranian_conun...

I do a newsletter and run into this all the time. I prefer to break after logical groupings or split words where they would normally be hyphenated. I also think it's best not to split after periods, hyphens, or underscores (as Eric said) so readers don't think that's the end of a sentence or part of the URL.

I do leave off the http://

but I like the idea of breaking after a dot, and hoping the reader is smart enough to follow it to the next line. I don't have the choice of shortening the url to the home page... they want to spell out the full url. I'll inquire as to whether brackets are ok. I've also used the device of using a different font for the url to set it apart, but not in this case.

I think that one of the problems with breaking URLs is when it's done in a digital document. I've noticed some in browsers, if you cut and paste a URL that's broken, sometimes you get garbage inserted into the ULR, like a space character reference: %20, inserted in the middle of the URL.

If the document is only for printing, you don't have to worry about this, so it's less of an issue.

jason C

Yes, but I don't want to confuse the reader. I also don't want to have hideous typesetting issues.

Where I work we are also very fond of using long URLs and usually smack in the middle of a paragraph.

I break them after a slash, and work with the paragraph rag and hyphenation to make it as painless as possible. I'm also in the position to lightly re-word on occasion, which helps. I sometimes also italicize the URL, which I find helps distinguish it from the rest of the text.

I feel your pain. If it were up to me all of the URLs would be at the end of the paragraph with no introduction. (Who really needs to read "Please visit our web site at:" to figure out what they're supposed to do?)

Just my 2 cents.

hrant and i were posting on this very subject a couple of months ago. he suggested breaking the lines with the " ^ " symbol, and while i think it's an interesting idea, it's not very aesthetic. i know the situation though -- a couple of years ago i was designing a magazine that every month had a page listing urls, and the page was set up on a five column grid. those long ones were murder.

A lot of this advice really isn’t correct.

  • Do not attempt to use delimiters, especially less-than or greater-than, except in the easily avoided circumstance where readers cannot tell if ending or surrounding punctuation is part of the URL. A subtle font change (does not have to be monospaced; I don't see how italic really works) is adequate in most cases. People do not understand that delimiters are for E-mail programs so that URLs are not broken and become clickable. Even if you had to use delimiters, they wouldn’t be actual less-than/greater-than characters but set delimiters from math (easily available in the Symbol font).
  • Test every URL without www. If it works (some servers are misconfigured and it won’t), then do not use http://www in the printed URL.
  • Do not use a TinyURL-like service. Do not. You are entrusting the validity of the URL to a third-party service. When TinyURL (or equivalent) goes tits-up, there will never be a way for the reader to locate the original URL.
  • Experience has shown – ask Jeremy Keith about this – that the right way to go is to either maintain a list of URLs on your site or maintain a list of URL aliases on your site that you can update if the destination URL changes. Of course the destination is not your responsibility, but for the presumed lifetime of the book you might want to make that effort. For example, http://typophile.com/node/37994 could be listed as mybook.org/howtolink which, when typed into a browser, sends you straight to http://typophile.com/node/37994 by a Redirect 301 command.
  • Break before a dot, not after. Yes, this puts a dot at the beginning of a line. It also eliminates ambiguity. Certainly break after slashes. Those locations are perfect for optional-return characters, available since WordPerfect 5.1, present in DTP programs, and almost completely unused.
  • Use a character style for URLs. I would do an onscreen check of every paragraph containing that style before going to press. You never know what kind of linebreaks are gonna happen, and the wrong kind are always gonna happen at the last minute.
  • Try to avoid hyphens at all; if you look around you’ll find they're rare. A bigger issue, undiscussed here, is shitty Microsoft or CMS URLs that are a mile long and contain a dozen parameters and arguments separated by ampersands. Do you really think those URLs are going to last? If so, should you even publish them?

—
Joe Clark
http://joeclark.org/

Does anybody know the protocol with this?

Hypertext transport, usually -- but not always. Do not omit the http:// prefix; it is an indispensable part of the URL, and not at all superfluous.

(Yes, I know you meant something else by "protocol", but this is relevant anyway.)

Patty - I ran into this problem in the magazine. I came up with some different ways of handling it. One was to stick them all in a "sidebar," with an explanation of each of them being long make sure you get all the right characters. Another time, when they appeared in the article - I broke the paragraph and gave each one it's own line.

When they are written into the text, I do edit the lines so they are not at the end of the sentence (I don't like giving a period after .com.) and hopefully edit it carefully enough that the long site address is on a line by itself.

If I am working on a manuscript for a client, I grab their editor and say "EDIT." It does work when everyone's goal is to have a nice piece.

Good luck. Let us know how it worked out.

"People do not understand that delimiters are for E-mail programs so that URLs are not broken and become clickable."

I understood that...merely pointing out that WIRED, IIRC, started that technique in print eons ago. Not that that makes it right, but WIRED is one of the first publications to have web savvy style guides.

The main reason to have a delimiter in print is to avoid the punctuation at the end of a sentence. The alternative would be to never end a sentence with a URL.

Personally, though, the more I think about this, the more I think I'd prefer footnoting the URLs if at all possible.

"Try to avoid hyphens at all; if you look around you’ll find they’re rare."

They're increasingly common in URLs as people jump on the SEO bandwagon. Wordpress, for instance, uses hyphens in most of its URLs.

"Hypertext transport, usually — but not always. Do not omit the http:// prefix; it is an indispensable part of the URL, and not at all superfluous."

while true, I'm not aware of any web browser that doesn't, by default, assume an HTTP protocol.

Captured from web.archive.org on 16 Feb 2013. view this capture