有没有办法全局关闭参考书目中的链接连字符?目前的状态让我不满意:
最小工作示例:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{url}
\usepackage{apacite}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\begin{document}
\cite{mchinen}
\bibliographystyle{apacite}
\bibliography{general}
\end{document}
以下是 general.bib 条目:
@url{mchinen,
Author = {Chinen, Michael},
Date-Added = {2013-05-01 10:12:23 +0000},
Date-Modified = {2013-05-01 10:34:20 +0000},
Lastchecked = {March 23, 2013},
Title = {{M}ichael {C}hinen},
Url = {http://michaelchinen.com},
Urldate = {March 23, 2013},
Year = {2013},
Bdsk-Url-1 = {http://michaelchinen.com}}
答案1
url
可以通过设置\UrlBreakPenalty
和来配置包设置的断点\UrlBigBreakPenalty
。 值 10000 可防止连字符:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{url}
\usepackage{apacite}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\mathchardef\UrlBreakPenalty=10000
\mathchardef\UrlBigBreakPenalty=10000
\begin{document}
\cite{mchinen}
\begingroup
\raggedright
\bibliographystyle{apacite}
\bibliography{general}
\endgroup
\end{document}
示例还使用\raggedright
避免行数过长。您还可以考虑使用稍小的值,9999
以便能够中断一行内无法容纳的 URL。