0

Please can someone help me to reduce the spaces between words on the references. I saw many solution on internet but none worked for me. Sorry for the bad format of the question, it is the first time I make a question.

Edited:Tried to add below 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}
  • Possible duplicate of tex.stackexchange.com/questions/89751/… – koleygr Jun 19 '17 at 17:47
  • Similar, but probably not an exact duplicate of the linked question. OP's documentclass and respective options appear to imply some peculiarities. – gusbrs Jun 19 '17 at 21:25
1

try to use

 \usepackage[hyphens]{url}

It may helps in your problem

Here is a MWE without the above line:

\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}

and the result:

enter image description here

If I comment out that line, I have:

enter image description here

| improve this answer | |
0

I don't know why the hyphens option of the url package clashes with your setting, but you can try the following (credit to 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}

The result is:

enter image description here

I must add that someone might very well come up with a better solution.

| improve this answer | |
0

The solution that worked for me is the following:

  • add \documentclass[sigconf, hyphens]{acmart} instead of \documentclass[sigconf]{acmart}, since the url package is already included by template, but you can provide the hyphens parameter to the \documentclass, which will be passed to the url package (not sure though how this works internally) and it should work.
| improve this answer | |
  • 1
    This works because acmart loads hyperref and hyperref loads url. When you pass an option (in this case hyphens) to \documentclass, all packages loaded will know of this option and will use it if appropriate (reference). So this does the same as koleygr's answer, wit fewer keystrokes :-) – Phelype Oleinik Apr 21 '19 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.