1

I have a problem with long URLs in a Footnote

Here is an example:

\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{url}

\begin{document}
Lorem Ipsum\footnote{Vgl. \url{http://sourceforge.net/p/jaudio/git/ci/jAudio2.0-dev/tree/src/jAudioFeatureExtractor/AudioFeatures}}
\end{document}

This is how it looks: Long URL in a footnote

You can see the big space between the german "Vgl." and the URL.

How can I set

  1. explicit url break points at .../j|Audio|Feature|Extractor/... and
  2. set the text alignment in the footnote to left-aligned (flush left)?
Vertex
  • 111
  • 1
    \raggedright should work. Additionally, please see Zeilenumbrüche in Bibliographielinks. – Johannes_B May 18 '15 at 15:35
  • although the question itself seems to be on a slightly different topic, there is a useful answer therein: [How to fill an underfull box in footnote with url?](http://tex.stackexchange.com/q/88553/579} – barbara beeton May 18 '15 at 15:42
  • @Johannes_B thank you! \raggedright works for left-alignment. But your posted link is about URLs for BibTex and don't says how to set explicit break points. – Vertex May 18 '15 at 15:43
  • I didn't have the right TeX.SX Q/A at hand and my washing machine was beeping, so i left a link to a place where i knew for sure the right answer can be found. But it is tricky, the answer is actually in the question. ;-) – Johannes_B May 18 '15 at 16:01
  • 1
    @Vertex Sorry, i not really at the keyboard and just had time to leave short comments. You cannot add breakpoints directly within the url, but you can add specific letters to the list of breakable chars. Please see Forcing linebreaks in \url for further details. If that answers the question, please drop me a note. – Johannes_B May 18 '15 at 19:04
  • @Johannes_B With \raggedright it looks pretty good. But I have some long URLs that are looking ugly, because they got breaked after http:. I've followed you Forcing linebreaks in \url and use \def\UrlBreaks. But either there is no colon in the break characters, the URLs gets breaked after http:. Have you an idea how to avoid breaking after http:? – Vertex May 18 '15 at 22:16
  • You can prevent breaking after the colon by removing it from the list, but adding more chars seems to be the best idea. – Johannes_B May 18 '15 at 22:25
  • @Johannes_B I've forgott to define also \UrlBigBreaks. Now it doesn't breaks after http:. Would you like to summarize it all in an answer? For question 1 \raggedright works fine and for question 2 it is not possible to define explicit break points but it is possible to alter the breaking behaviour with \UrlBreaks and \UrlBigBreaks. – Vertex May 19 '15 at 06:42
  • i think this is a duplicate, would you agree? – Johannes_B May 19 '15 at 08:23
  • @Johannes_B Yes, I agree – Vertex May 19 '15 at 10:08
  • Btw, if you are interested, you can ask question at TeXwelt.de and goLaTeX, a german Q/A site and a german forum. – Johannes_B May 19 '15 at 10:14

0 Answers0