6

In my document LaTeX has chosen to continue a long footnote on the next page. That's usually just fine. But in this case the page break in the footnote is inside a url, so the whole second page is a clickable link in the pdf. I could probably avoid that with some rewriting, but a TeX solution would be nice.

I hoped URL linebreak in footnote would provide help - no luck.

Here's an MWE.

\documentclass{article}
\usepackage{hyperref}
\usepackage[textheight=1.4in, textwidth=5in]{geometry}

\begin{document}
Here's a sample of the kind of advice you can find on the web.
It's from Liz Pulliam Weston, writing for 
MSN Money.

\begin{quotation}
Say you have a 10-year-old Honda that's worth \$4,000 in a
private-party sale and have a \$500 deductible. Your risk is \$3,500. If
your premiums for collision and comprehensive are more than \$350 a
year, it may be wiser to bank that money toward a newer car.%
\footnote{
\url{http://articles.moneycentral.msn.com/Insurance/InsureYourCarDumpTheInsuranceOnYourClunker.aspx}}
\end{quotation}

If we make a simple assumption we can think about this using
probabilities. Suppose that the only kind of accident to worry about
is one that totals the car. Then Weston's advice is reasonable if you
think that the probability that you'll have such an accident is less
than 10\%. Here's why. Imagine that the insurance policy is a lottery
ticket, which ``wins'' if you have an accident. A winning ticket is
worth \$3,500. If you think you have a 10\% chance of winning, then
the fair price (for you) is \$350. If you think your chance of
totaling your car is less than 10\% then the fair price is more than
\$350, so perhaps you shouldn't buy the insurance.
\end{document}
8

You can prevent (or at least infinitely discourage) linebreaking in the footnote, which may or may not be suitable, depending.

This produces a broken URL as you describe if you comment out the setting of \interfootnotelinepenalty.

\documentclass{article}

\setlength\textheight{3cm}
\usepackage{hyperref}
\def\a{One two three four. }
\def\b{\a Five six seven eight nine ten. }
\begin{document}

\b\a\a

\vspace{1.2cm}

\b
abc%
{\interfootnotelinepenalty10000 
\footnote{zzzzz \a \url{http://www.example.com/aa/bbbb/cc.cc/dd.dd/ee/ff/gg/hhhh}%
}%
qq qqq q q qqqqq} xyz \b

\b\b\b

\b\b\b

\end{document}

If you take the document from the edited question and add

\interfootnotelinepenalty=10000 

to the document preamble you get:

enter image description here

  • Works like a charm. With that in the preamble it affects all footnotes. Any likely harm in that? – Ethan Bolker Dec 4 '13 at 21:39
  • well it's not harm so much as a design choice whether you want to allow split footnotes or not. Of course you can use some number less than 10000 to discourage rather than ban it, or as in my first answer you can set it locally just around the footnote, or within any convenient environment scope. – David Carlisle Dec 4 '13 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.