我尝试了其他人提出的一些解决方案(参考书目中的 URL:LaTeX 未按预期换行),但徒劳无功。长 URL 仍然进入边距。我怎样才能在引用中拆分非常长的 URL?谢谢!
% !TEX program = pdflatex
% !BIB program = biber
\documentclass{report}
\usepackage[
backend = biber,
style = apa,
doi = false,
url = true,
isbn = false]{biblatex}
\addbibresource{Thesis.bib}
\begin{document}
Cite this article: \parencite{OFFICEFORNATIONALSTATISTICS_MiddleSuperOutput_2018}.
\printbibliography[title = References]
\end{document}
论文集
@online{OFFICEFORNATIONALSTATISTICS_MiddleSuperOutput_2018,
title = {Middle {{Super Output Area Population Estimates}} (Supporting {{Information}})},
author = {{Office for National Statistics}},
date = {2018},
url = {https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/middlesuperoutputareamidyearpopulationestimates}
}
答案1
这网址包建立在url
包的基础上,并允许在 URL 字符串中的任意位置换行。
% !TEX program = pdflatex
% !BIB program = biber
\documentclass{article}
\begin{filecontents}[overwrite]{Thesis.bib}
@online{ONS_MiddleSuperOutput_2018,
title = {{Middle Super Output Area Population Estimates (Supporting Information)}},
author = {{Office for National Statistics}},
date = {2018},
url = {https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/middlesuperoutputareamidyearpopulationestimates}
}
\end{filecontents}
\usepackage[style = apa, url = true,
doi = false, isbn = false]{biblatex}
\addbibresource{Thesis.bib}
\usepackage{xurl} % <-- new
\begin{document}
\noindent \parencite{ONS_MiddleSuperOutput_2018}.
\printbibliography[title = References]
\end{document}