hyperlinks not word-wrapping

6,025 views
Skip to first unread message

Willem Larsen

unread,
Mar 16, 2012, 12:03:43 AM3/16/12
to lea...@googlegroups.com
Not sure what to do about this - long hyperlinks in the published pdf are not doing word-wrap that they do in the Markdown editor. Any ideas?

yrs,

--
Willem Larsen
President, Language Hunters 

a 501(c)(3) non-profit organization
4846 NE 9th Ave
Portland, Oregon 97211
971-340-7163
www.languagehunters.org
@fluencygame #langhunt







Scott Patten

unread,
Mar 16, 2012, 12:52:22 AM3/16/12
to lea...@googlegroups.com
Hi Willem,

My suggestion would be to take the actual links out of the text and make them footnotes. So, starting with something like this:

*Proceedings of the National Academy of Sciences of the United States of America*: Michael N. Tombu, Christopher L. Asplund, Paul E. Dux, Douglass Godwin, Justin W. Martin, and Rene Marois, "A Unified Attentional Bottleneck in the Human Brain"; http://www.pnas.org/content/early/2011/08/03/1103583108.full.pdf+html; Accessed October 24th, 2011

I would change it to this:

*Proceedings of the National Academy of Sciences of the United States of America*: Michael N. Tombu, Christopher L. Asplund, Paul E. Dux, Douglass Godwin, Justin W. Martin, and Rene Marois, "[A Unified Attentional Bottleneck in the Human Brain](http://www.pnas.org/content/early/2011/08/03/1103583108.full.pdf+html)"; Accessed October 24th, 2011


The part inside of the square brackets becomes a clickable link followed by a footnote number. The part in parentheses becomes a footnote, which is also clickable.

Scott
--
Scott Patten
Co-founder, Leanpub and Ruboss
604 341-1701

Richard Veryard

unread,
Mar 16, 2012, 6:47:22 AM3/16/12
to leanpub
Moving the long URLs to footnotes doesn't solve the problem if we
don't have word wrapping in the footnotes, Now it will be the footnote
that goes off the sde of the page.

LeanPub might consider using a standard URL shortening service (e.g.
bit.ly) or even developing its own. This could also make it possible
for authors to track the use of URLs in their books.

R

Yves Hanoulle

unread,
Mar 16, 2012, 7:11:43 AM3/16/12
to lea...@googlegroups.com
Hi Richard,

Nothing blocks you from using url shorteners for your book. You don't need Leanpub to do this.
I personally would prefer that leanpub focusses them on things I can not do myself.


We have been discussing url shorteners for our "who is agile" books.

We decided that we did not want that, as it kills the visibility for the url's in the pdf's.

y


2012/3/16 Richard Veryard <goo...@veryard.com>

Richard Veryard

unread,
Mar 16, 2012, 7:43:58 AM3/16/12
to leanpub
I agree that URL shorteners are a very low priority. All I would say
is that there may be some better presentation options available if
LeanPub is managing the URL shortener rather than the author doing it,
For example, I like the way Twitter handles URLs.

R

Yves Hanoulle

unread,
Mar 16, 2012, 7:46:07 AM3/16/12
to lea...@googlegroups.com
hi Richard,

Interesting.
I don't understand. In what way could leanpub give a better option?
yes I use twitter, still I don't understand what you mean with better presentation.

Richard Veryard

unread,
Mar 16, 2012, 9:17:35 AM3/16/12
to leanpub
Hi Yves

You said you wanted visibility of long URLs in your book. Willem has a
formatting problem with long URLs. I thought maybe there would be a
way of formatting with short, but allowing the long to be visible as
well, which Twitter kind of manages.

But let's not spend any more time discussing a feature that we agree
to be unimportant.

R

On Mar 16, 11:46 am, Yves Hanoulle <mail...@hanoulle.be> wrote:
> hi Richard,
>
> Interesting.
> I don't understand. In what way could leanpub give a better option?
> yes I use twitter, still I don't understand what you mean with better
> presentation.
>
> Phone 00 32 476 43 38 32
> Book: Who is agile:www.leanpub.com/WhoIsagile
> [image: Twitter] <http://twitter.com/YvesHanoulle> [image:
> LinkedIn]<http://www.linkedin.com/in/YvesHanoulle> [image:
> WordPress] <http://www.hanoulle.be> [image:
> SlideShare]<http://www.slideshare.net/YvesHanoulle/> [image:
> Amazon] <https://kindle.amazon.com/profile/Yves-Hanoulle/192415>
> [image: Skype] YvesHanoulle
>  “"You see things; and you say, 'Why?' But I dream things that never were;
> and I say, 'Why not?'" - George Bernard
> Shaw<http://www.quotesdaddy.com/quote/514342/george-bernard-shaw/you-see-t...>
> ”  Get this email app!
> <http://www.wisestamp.com/apps/quotes?utm_source=extension&utm_medium=...>

Yves Hanoulle

unread,
Mar 16, 2012, 9:27:12 AM3/16/12
to lea...@googlegroups.com

2012/3/16 Richard Veryard <goo...@veryard.com>

Hi Yves

You said you wanted visibility of long URLs in your book. Willem has a
formatting problem with long URLs. I thought maybe there would be a
way of formatting with short, but allowing the long to be visible as
well, which Twitter kind of manages.

twitter has control on the place it shows the long urls (the web interface), leanpub does not control the pdf viewer

But let's not spend any more time discussing a feature that we agree
to be unimportant.

I was interested in the discussion to see how I locally can take responsibility for my own book.

like I will do for my 2 pdf files

Willem Larsen

unread,
Mar 16, 2012, 9:55:23 AM3/16/12
to lea...@googlegroups.com
Scott,

Thanks for the quick response, as always. I've just tried your recommendation and it'll do for now! (at some point in the future, I'd like to be able to do standard citations for weblinks).

yrs,
Willem

Peter Armstrong

unread,
Mar 16, 2012, 2:03:15 PM3/16/12
to lea...@googlegroups.com
Yeah, way back when we started we actually thought about passing
footnote URLs through something like bit.ly or our own URL shortener.
(We actually already have code that could easily be adapted for this,
since we make short URLs for our download links.)

But we thought that some authors would be (rightly) upset:
- It would violate the principle of least surprise (you wouldn't
expect us to mess with URLs in you book).
- It would make the shortener a single point of failure for your book.
- If we used our own shortener it would lead to the ability to capture
reading-driven web usage data that we should not capture or even have
the theoretical ability to capture.

So, short answer is:
- Yes we should handle long URLs better (word wrap them but still make
the link clickable) in the footnotes.
- Please feel free to use your own URL shortener.
- We won't automatically shorten your URLs.

Thanks
Peter

On Fri, Mar 16, 2012 at 6:27 AM, Yves Hanoulle <mai...@hanoulle.be> wrote:
>

--
Peter Armstrong
Founder: Leanpub, Ruboss
Author: Lean Publishing, Hello! Flex 4, Flexible Rails
Twitter: @peterarmstrong | Skype: peterburtonarmstrong | Mobile: 604.916.8017

Luc Beaudoin

unread,
Mar 11, 2014, 1:05:39 PM3/11/14
to lea...@googlegroups.com
You could have a rule: 
if the URL or DOI would bleed into the margin, then start it on the next line; if that fails, then try decreasing the font size to footnote size font; if that fails, then break the URL at a forward slash. 

A reader won't be utterly confused by a broken URL. If he tries to use the URL and it fails, he will likely go back to the source and easily figure out the issue.

> would be (rightly) upset:
To avoid upsetting the author, you can control this by a setting on the Leanpub settings page for the book, with appropriate defaults.

Handling this well is important for scholarly books.  Using a URL shortening service is not an option for scholarly publications.

Note that we're not the only ones facing this issue. APA itself hasn't fully come to terms with it as far as I can tell, e.g., http://aut.ac.nz.libguides.com/content.php?pid=72586&sid=1495183 Sometimes one does need a long URL.

Luc

David Lowe

unread,
Dec 17, 2015, 12:48:26 PM12/17/15
to leanpub, wil...@languagehunters.org
Sorry, did anyone find a solution to this? I need to put the full link to PDFs, etc, in the books bibliography (for scholarly purposes) but it wraps. I cannot use bit.ly or another shortner because that will break the Harvard style of citation.

Did the group decide there was no fix for this apart from me manually fudging the hyphenation on it? Not sure if that will work across the different formats.

David

Peter Armstrong

unread,
Dec 17, 2015, 1:54:29 PM12/17/15
to lea...@googlegroups.com, Willem Larsen
As was discussed, the best thing to do in my opinion is to do something like [this](http://reallyreallyreallyreallyreallyreallyreallyreallyreallylongurlhere.com) since this way, the hyperlink is in the full footnote but not in the body of the text -- only the text in the square brackets is.

Are you saying that the URL is having issues even in the footnote? 

Thanks
Peter

--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Lowe

unread,
Dec 17, 2015, 4:13:00 PM12/17/15
to leanpub, wil...@languagehunters.org
You don't really want a bibliography to have URLs in footnotes. The Harvard style is the most common method for citations now (see https://www.citethisforme.com/ for a good explanation) and this will show you that a full URL is what is needed. Not sure why it doesn't just wrap.

D

Peter Armstrong

unread,
Dec 17, 2015, 7:56:13 PM12/17/15
to lea...@googlegroups.com, Willem Larsen
Ah, sorry, I glossed over the word bibliography.  We should arguably give LaTeX some clues here when it's making PDFs in a bibliography.  This won't get done this month however, since it requires Markua's book section directives support, which will be sometime in Q1...

Kevin Karplus

unread,
Dec 18, 2015, 1:18:03 AM12/18/15
to leanpub


On Thursday, December 17, 2015 at 4:56:13 PM UTC-8, Peter Armstrong wrote:
Ah, sorry, I glossed over the word bibliography.  We should arguably give LaTeX some clues here when it's making PDFs in a bibliography.  This won't get done this month however, since it requires Markua's book section directives support, which will be sometime in Q1...


LaTeX has a good package for handling multi-line URLs in PDF files:
\usepackage[obeyspaces,hyphens]{url} 

(I also use the hyperref package, but I don't know whether that is needed for the URLs.) 

Scott Patten

unread,
Dec 21, 2015, 7:03:18 PM12/21/15
to lea...@googlegroups.com
Hi David,

Sorry I missed this until now.

Another option is to just wrap the URLS in < and >. This tells our PDF generator that the text is a URL, and it wraps lines appropriately. Can you try that?

Thanks,

Scott

--
You received this message because you are subscribed to the Google Groups "leanpub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leanpub+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Sarah Alawami

unread,
Dec 23, 2015, 2:43:10 AM12/23/15
to leanpub discussion forum
Will this work also in the ePub version? Or how will the urls turn out?

Take care.

Scott Patten

unread,
Dec 23, 2015, 6:47:39 PM12/23/15
to lea...@googlegroups.com
The URLs will work fine in the epub and mobi versions either way -- I'm pretty sure it's just in the PDF that we run into troubles here.

Thanks,

Scott

David Lowe

unread,
Dec 29, 2015, 12:35:59 PM12/29/15
to leanpub
That's certainly a big improvement, thanks.

D
Reply all
Reply to author
Forward
0 new messages