0

I am having a white space in URL. I am using BibTeX for references. In the beginning, I had two URLs (number 3 and 5, see image below) with white spaces. After searching, I came across the suggestion that I should use \usepackage[hyphens]{url} and load it before the hyperref package. This did indeed work. For one URL, number 3. For the other one though (number 5), although the white space has been reduced, it still remains. I have tried so many options suggested here in several posts but so far no success. This is my preamble:

\documentclass{llncs}
\usepackage[utf8]{inputenc}          
\usepackage{graphicx}
\usepackage{geometry}
\geometry{top=2.0cm, left=3.5cm, right=3.5cm, bottom=2.0cm}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}           
\usepackage{booktabs}                 
\usepackage{cite}                     
\usepackage{hyperref}                 
\usepackage{subfigure}              
\usepackage{xcolor}
\usepackage{enumitem}
\setcounter{secnumdepth}{3}
\setlength{\intextsep}{2mm plus2mm minus2mm}



\begin{document}
...

Then I am just citing the URL as \cite{...}. Nothing special. This is the result:enter image description here

Here is the Bibtex:

@Misc{ELGA_guidelines,
  author = {{ELGA GmbH}},
  url    = {https://www.elga.gv.at/technischer-hintergrund/technische-elga-leitfaeden},
}
8
  • Welcome! I'm afraid we can't compile your code to reproduce the problem because we don't know what the ... stands for and we don't have sample .bib entries. Please provide a complete minimal document we can copy-paste-compile to reproduce the issue, eliminating any irrelevant packages from your preamble in the process. Note that, with few exceptions, hyperref should be loaded last. Off-topic: subfigure is obsolete and ought not be used.
    – cfr
    May 28, 2016 at 23:33
  • Sorry, added the Bibtex now. The ... is just a place holder for the Bibtex key. /cite{BibtexKey} in this case /cite{ELGA_guidelines}
    – Enigma
    May 28, 2016 at 23:50
  • Adding hyphenation points, e.g. (I don't know if they are correct in German) @Misc{ELGA_guidelines, author = {{ELGA GmbH}}, url = {elga.gv.at/technischer-hintergrund/technische-elga-leit\-fae\-den}, } may help. May 29, 2016 at 0:14
  • That didn't help and only made the url look funny and added words like discretionary (no idea where they come from) into the url.
    – Enigma
    May 29, 2016 at 0:32
  • @cfr I am also aware of the fact that subfigure is deprecated, replaced by subfig and the new one subcaption is even recommended. Unfortunately, the subcaption package is not compatible with the class I amusing (I tried it) and what is more, the subfigure works for me for now and I really am not that bothered to fix what is not broken atm. Also, I don't think (well, at least I am not aware of it) that it is like a software version that if you don't update, there maybe security risk etc. So, I can live with it for now I guess.
    – Enigma
    May 29, 2016 at 0:40

2 Answers 2

1

One possible solution would be to simply add a \raggedright, or \sloppy to the text, inside the group.

0

I got this answer from this question here. It did indeed solve my problem. However, it increased my bad boxes from 7 to 37. I checked through my document and couldn't, at least by the look of human eyes, see any undesired side effects as a result. So, I will consider it solved. This is what fixed my problem:

\usepackage{ragged2e}
\setlength\RaggedRightParindent{\parindent} % default value of this parameter is `0pt`
\RaggedRight 
1
  • 1
    I would add the \RaggedRight instruction only at the start of the bibliography.
    – Mico
    May 29, 2016 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .