
如何斷開包含長字母數字字串的 url 連結?
這裡有一個例子:
\documentclass[12pt,a4paper,twoside]{article}
\begin{filecontents}[overwrite]{ref.bib}
@misc{Reuters_2023,
author = "Reuters",
title = "Example of long URL",
year = 2023,
url = "https://www.facebook.com/Reuters/posts/pfbid0Gw8qyhJSCCBeAzfVRXcV9aMBsy5pzmeTfbx2WeTmGySdpSYPBxtqJqkkuhDX9Fb9l",
}
\end{filecontents}
\usepackage{apacite}
\bibliographystyle{apacite}
\usepackage[hyphens,spaces,obeyspaces]{url}
\begin{document}
\cite{Reuters_2023}
\bibliography{ref}
\end{document}
答案1
包apacite
檢測到url
正在加載,然後更改它。因此,所做的任何更改都xurl
可能消失。但是,如果我們改為xurl
透過加載
\usepackage{apacite}
\AtBeginDocument{\usepackage{xurl}}
實際上是在檢查之後加載的url
,而不是加載,並且它的更改永遠不會應用。xurl
apacite
url
它有點 hackish...還要注意,它apacite
似乎已經近 10 年沒有更新了,所以難怪它不支持xurl
.