February 2, 2009
Mark Senn

How can I automatically hyphenate email and URL addresses?

Put, for example

    \hyphenation{myaddress-@gmail.com}


From The Chicago Manual of Style, 15th Edition, item 7.44:

URLs and e-mail addresses: Where it is necessary to break a URL or an email address, no hyphens should be used. The break should be made between elements, after a colon, a slash, a double slash, or the symbol @ but before a period or any other punctcuation or symbole. To avoid confusion, a URL that contains a hyphen should never be broken at the hyphen. If a particularly loog element must be broken to avoid a seriously loose line, it should be broken according to the guidelies above.

http://
www.salonmagazine.com

or

http://www
salonmagazine.com

or

http://www.salon
magazine.com