2

I've ran into a problem I can't seem to fix. So I've been working on a document, everything is as it's supposed to be, apart from one small detail.

I referenced certain parts of my text with \footenotemark[] and obviously used \footnotetext[] as a reference.

Only issue is, it stretched out to fit the width of the page.

Picture below:

enter image description here

Any way to prevent these spaces from happening?

Mico
  • 506,678
  • 3
    since the MWE is missing, my best suggestion is: put more text in it? – naphaneal Apr 04 '16 at 18:59
  • 2
    You need to get some help on breaking URLs. But we don't know how you are including URLs so it is hard to help. (Note that it is unlikely to be due to the \footnotemark/\footnotetext usage.) – jon Apr 04 '16 at 19:02
  • @jon I've just pasted them in the text. Is there any better way to include them? – Samuel Hulla Apr 04 '16 at 19:10
  • 2
    Load the package hyperref (which includes many options) via \usepackage{hyperref} and then write \url{<url>}. You may prefer to use the colorlinks option -- e.g., \usepackage[colorlinks]{hyperref}. Note also that you typically load hyperref as the last (barring a few exceptions) package in your preamble because it does a lot of work behind the scenes. – jon Apr 04 '16 at 19:15
  • 1
    Note that the image you posted doesn't really show anything related to biblatex, so you might want to check if you actually use that package (and if so, if it has something to do with your question) and want to edit the tags accordingly so as to not confuse future visitors and those trying to help you. – moewe Apr 04 '16 at 20:02
  • BTW: if you link to CTAN it is normally preferred to give the link via the generic http://mirrors.ctan.org/ and not to a specific mirror. – moewe Apr 04 '16 at 20:03

1 Answers1

6

I suggest you load the url package with the options hyphens, spaces, and obeyspaces, issue the instruction \urlstyle{same}, and then encase all URL strings in an \url{...} wrapper. That way, LaTeX will almost surely find a decent linebreak in the URL string and won't need to stretch the interword whitespace in earlier part of the footnote.


Update, April 2022: Six years ago, I recommended running

\usepackage[hyphens,spaces,obeyspaces]{url}

In the meantime, the xurl package has been released. It allows line breaks at arbitrary points in a URL string. Hence, I think it's time to replace the vintage-2016 recommendation with the following one:

\usepackage{xurl}
Mico
  • 506,678