参考书目间距问题

参考书目间距问题

我不认为这是正确的:

![在此处输入图片描述]1

第一个条目的单词间距似乎不正确,尤其是第一个条目。

这是MWE:

\documentclass[a4paper,11pt]{article}
\usepackage{natbib}
\bibpunct[, ]{(}{)}{;}{a}{,}{,}
\usepackage[british]{babel}
\usepackage{url}
\usepackage{hyperref}
\begin{document}
        \cite{stoptheclot:2008} \cite{wiki:xxx} \cite{stoptheclot2:2008}
        \pagebreak
        \bibliographystyle{apalike}
        \bibliography{bibfile}
\end{document}

.bib 文件是:

% Encoding: UTF-8
@misc{wiki:xxx,
     author = "{Wikipedia contributors}",
     title = "LaTeX --- {Wikipedia}{,} The Free Encyclopedia",
     year = "2011",
     howpublished = "\url{https://en.wikipedia.org/w/index.php?title=LaTeX&oldid=413720397}",
note = "Viewed 12th November 2018."
}

@misc{stoptheclot:2008,
    author = "{stoptheclot contributors}",
    title = "Vitamin K and Coumadin - What you need to Know. [online]",
    year = "2008",
    note = "Viewed 12th November 2018.",
    howpublished = "\url{https://www.stoptheclot.org/news/vitamin-k-and-coumadin-what-you-need-to-know}"
    }   

@misc{stoptheclot2:2008,
    author = "{Stoptheclot contributors}",
    title = "Vitamin K and Coumadin - What you need to",
    year = "2008",
    note = "Viewed 12th November 2018.",
    howpublished = "\url{https://www.stoptheclot.org/news/vitamin-k-and-coumadin-what-you-need-to-know}"
}

有什么方法可以控制参考文献的间距(最好是左对齐)?

答案1

xurl包可用于为 URL 添加更多可能的断点:

\documentclass[a4paper,11pt]{article}
\usepackage{natbib}
\bibpunct[, ]{(}{)}{;}{a}{,}{,}
\usepackage[british]{babel}
\usepackage{url}
\usepackage{hyperref}


\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
% Encoding: UTF-8
@misc{wiki:xxx,
     author = "{Wikipedia contributors}",
     title = "LaTeX --- {Wikipedia}{,} The Free Encyclopedia",
     year = "2011",
     howpublished = "\url{https://en.wikipedia.org/w/index.php?title=LaTeX&oldid=413720397}",
note = "Viewed 12th November 2018."
}

@misc{stoptheclot:2008,
    author = "{stoptheclot contributors}",
    title = "Vitamin K and Coumadin - What you need to Know. [online]",
    year = "2008",
    note = "Viewed 12th November 2018.",
    howpublished = "\url{https://www.stoptheclot.org/news/vitamin-k-and-coumadin-what-you-need-to-know}"
    }   

@misc{stoptheclot2:2008,
    author = "{Stoptheclot contributors}",
    title = "Vitamin K and Coumadin - What you need to",
    year = "2008",
    note = "Viewed 12th November 2018.",
    howpublished = "\url{https://www.stoptheclot.org/news/vitamin-k-and-coumadin-what-you-need-to-know}"
}
\end{filecontents*}

\usepackage{xurl}

\begin{document}
        \cite{stoptheclot:2008} \cite{wiki:xxx} \cite{stoptheclot2:2008}
        \pagebreak
        \bibliographystyle{apalike}
        \bibliography{\jobname}
\end{document}

在此处输入图片描述

相关内容