脚注中的 URL 跨越两页

脚注中的 URL 跨越两页

在我的文档中,LaTeX 选择在下一页继续添加长脚注。通常情况下,这样做没问题。但在这种情况下,脚注中的分页符位于 URL 内,因此整个第二页都是 pdf 中的可点击链接。我可以通过一些重写来避免这种情况,但 TeX 解决方案会更好。

我希望脚注中的 URL 换行符会提供帮助——但没有成功。

这是一个 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}

答案1

您可以阻止(或至少无限阻止)脚注中的换行,这可能适合也可能不适合,这取决于情况。

如果您注释掉 的设置,则会产生如您所描述的损坏的 URL \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}

如果你从编辑的问题中取出文档并添加

\interfootnotelinepenalty=10000 

在文档序言中您可以获得:

在此处输入图片描述

相关内容