如何避免 url 包溢出错误?

如何避免 url 包溢出错误?

以下是示例代码:

    \documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{classicthesis}
\usepackage{url}
\usepackage{enumitem}

\begin{document}

The following web sites will be useful in your study of calculus.
\begin{itemize}
\item AP\textsuperscript{\texttrademark} Calculus BC Course Description (College Board)

\url{https://secure-media.collegeboard.org/digitalServices/pdf/ap/ap-calculus-course-description.pdf}

\item AP\textsuperscript{\texttrademark} Calculus BC Exam Information and Prior Years' Free-Response Questions

\url{http://apcentral.collegeboard.com/apc/members/exam/exam_information/8031.html}

\item AP\textsuperscript{\texttrademark} Calculus Multiple Choice Collection ({\bf Warning -- Huge File})

\url{http://crunchymath.weebly.com/uploads/8/2/4/0/8240213/ap_multiple_choice.pdf}

\item Calculus Applets

\url{http://www.personal.psu.edu/dpl14/java/calculus/index.html}

\item Mathematics Stack Exchange

\url{http://math.stackexchange.com/}

\item Wolfram Alpha

\url{http://www.wolframalpha.com/}

\item Desmos Graphing Calculator

\url{https://www.desmos.com/calculator}

\item Visual Calculus

\url{http://archives.math.utk.edu/visual.calculus/}

\end{itemize}
\end{document}

但是它给出了溢出错误。如何修复?

答案1

来自url文档:

您可以通过分配以下方式在可破坏字符周围留出一些间距:

\Urlmuskip = 0mu plus 1mu

mu由于数学模式,所以带有单位)。

就您而言,这似乎还不够,因此您可以尝试:

\Urlmuskip=0mu plus 2mu

梅威瑟:

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{classicthesis}
\usepackage{url}
\usepackage{enumitem}

\Urlmuskip=0mu plus 2mu

\begin{document}


The following web sites will be useful in your study of calculus.
\begin{itemize}
\item AP\textsuperscript{\texttrademark} Calculus BC Course Description (College Board)

\url{https://secure-media.collegeboard.org/digitalServices/pdf/ap/ap-calculus-course-description.pdf}

\item AP\textsuperscript{\texttrademark} Calculus BC Exam Information and Prior Years' Free-Response Questions

\url{http://apcentral.collegeboard.com/apc/members/exam/exam_information/8031.html}

\item AP\textsuperscript{\texttrademark} Calculus Multiple Choice Collection ({\bf Warning -- Huge File})

\url{http://crunchymath.weebly.com/uploads/8/2/4/0/8240213/ap_multiple_choice.pdf}

\item Calculus Applets

\url{http://www.personal.psu.edu/dpl14/java/calculus/index.html}

\item Mathematics Stack Exchange

\url{http://math.stackexchange.com/}

\item Wolfram Alpha

\url{http://www.wolframalpha.com/}

\item Desmos Graphing Calculator

\url{https://www.desmos.com/calculator}

\item Visual Calculus

\url{http://archives.math.utk.edu/visual.calculus/}

\end{itemize}
\end{document} 

输出:

在此处输入图片描述

相关内容