4

As can be seen below, I am trying to figure out how to remove big spaces in the BibTeX based bibliography when URLs are used. I have already checked similar questions on tex.stackexchange but to no avail.

The below example also shows that this issue is evidently caused by the associated URL.

Can anyone provide me with an easy fix for this problem?

Minimal working example:

Document:

\documentclass[11pt,a4paper]{article} \usepackage{a4wide} \usepackage[breaklinks]{hyperref} \begin{document} \pagenumbering{arabic} \setcounter{page}{1} \cite{McL10a} \cite{McL10b} \bibliography{references} \bibliographystyle{alphadin} \end{document} 

.BibTeX-File:

% Encoding: UTF-8 @Electronic{McL10a, author = {G. Harry McLaughlin}, year = {2010}, title = {SMOG - Simple Measure of Gobbledygook}, url = {https://web.archive.org/web/20100415194430/http://webpages.charter.net/ghal/SMOG.htm}, timestamp = {2010-04-15}, } @Electronic{McL10b, author = {G. Harry McLaughlin}, year = {2010}, title = {SMOG - Simple Measure of Gobbledygook}, timestamp = {2010-04-15}, } @Comment{jabref-meta: databaseType:bibtex;} 

Output:

Edit1: @davidpurton - Using \Urlmuskip=0mu plus 4mu fixed the spaces in the title, but created new spaces in the url itself.

enter image description here

6
  • Welcome! Have you looked at the manual for the url package? If not, I'd recommend starting there. Also, is this really engine-specific i.e. only occurs when you compile with pdfTeX? Commented Mar 24, 2017 at 0:05
  • I am currently using TeXworks on Windows, which allows me to use pdfLatex, LuaLatex and XeLatex. Tested all three but the issue still remains. Commented Mar 24, 2017 at 0:10
  • 1
    Sorry about the wrong tag! Commented Mar 24, 2017 at 0:19
  • No problem. I just wanted to clarify things so that the tag didn't confuse people looking at your question. Commented Mar 24, 2017 at 0:26
  • 1
    Perhaps this post will help: tex.stackexchange.com/questions/115690/… Commented Mar 24, 2017 at 1:19

1 Answer 1

2

I found a working solution here: Forcing linebreaks in \url

Adding the following line prior adding the hyperref package fixed the issue for me:

\PassOptionsToPackage{hyphens}{url} 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.