有人能帮我减少参考文献中的单词间距吗?我在网上看到了很多解决方案,但没有一个对我有用。抱歉,问题的格式不好,这是我第一次提出问题。
已编辑:尝试添加至 MWEB 下方。
\documentclass[sigconf]{acmart}
\addbibresource{\jobname.bib}
\usepackage{filecontents}
% I have separated file biblo.bib
%In these two(and some other references) there are appearing spaces between words and some links are going beyond the corner
\begin{filecontents}{\jobname.bib}
@Manual{ref13,
title = {Germany energy giant RWE launches Ethereum based chargin stations},
author = {TrustNodes},
note = {\url{http://www.trustnodes.com/2017/04/29/germanys-energy-giant-launches-100s-ethereum-based-electric-cars-charging-stations}}
}
@Manual{ref27,
title = {Venezuela is cracking down on bitcoin fever},
author= {BusinessInsider},
year = {2017},
note = {\url{http://uk.businessinsider.com/venezuela-bitcoin-use-popularity-restrictions-and-crackdown-2017-3?r=US\&IR=T}}
}
\end{filecontents}
\begin{document}
\maketitle
\input{body}
\bibliographystyle{ACM-Reference-Format}
\bibliography{jobname}
\nocite{ref27}%
\nocite{ref13}%In fact I have cited into body.txt where I have the content of the paper
\end{document}
答案1
尝试使用
\usepackage[hyphens]{url}
它可能有助于解决你的问题
下面是没有上述行的 MWE:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
%\usepackage[hyphens]{url}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents}{biblo.bib}
@Manual{ref1,
title = {Bitcoin: A Peer-to-Peer Electronic Cash System},
author = {Nakamoto Satoshi},
year = {2008},
note = {\url{https://bitcoin.org/bitcoin.pdf}},
}
@Manual{ref13,
title = {Germany energy giant RWE launches Ethereum based chargin stations},
author = {TrustNodes},
note = {\url{http://www.trustnodes.com/2017/04/29/germanys-energy-giant-launches-100s-ethereum-based-electric-cars-charging-stations}}
}
\end{filecontents}
%opening
\title{}
\author{}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\section{test}
\cite{ref1}
and
\cite{ref13}
\bibliographystyle{acm}
\bibliography{biblo}
\end{document}
结果:
如果我注释掉该行,则会出现:
答案2
我不知道为什么包hyphens
的选项url
与你的设置冲突,但你可以尝试以下(归功于https://tex.stackexchange.com/a/102697/105447):
\documentclass[sigconf]{acmart}
\usepackage{url}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Manual{ref13,
title = {Germany energy giant RWE launches Ethereum based chargin stations},
author = {TrustNodes},
note = {\url{http://www.trustnodes.com/2017/04/29/germanys-energy-giant-launches-100s-ethereum-based-electric-cars-charging-stations}}
}
@Manual{ref27,
title = {Venezuela is cracking down on bitcoin fever},
author= {BusinessInsider},
year = {2017},
note = {\url{http://uk.businessinsider.com/venezuela-bitcoin-use-popularity-restrictions-and-crackdown-2017-3?r=US\&IR=T}}
}
\end{filecontents}
\begin{document}
\bibliographystyle{ACM-Reference-Format}
\bibliography{\jobname}
\nocite{ref27}%
\nocite{ref13}
\end{document}
结果是:
我必须补充一点,有人可能会想出更好的解决方案。
答案3
对我有用的解决方案如下:
- 添加
\documentclass[sigconf, hyphens]{acmart}
而不是\documentclass[sigconf]{acmart}
,因为 url 包已经包含在模板中,但你可以提供连字符\documentclass 的参数,它将被传递给 url 包(不确定其内部如何工作)并且它应该可以工作。