1

I recently encountered a problem with the biblatex-chicagopackage where the urls are linebreaking correctly in the footnotes in my footnotes but not in the bibliography.

After a good amount of searching on Google and here, I came with this code in the header which still doesn't solve the problem. May I know what else I can do to fix the problem? Any suggestion is appreciated!

(The turbian-researchpaper class can be found here: https://www.overleaf.com/latex/templates/turabian-formatted-research-paper/drzcdssyhyqh#.WtgRbdPwbUo)

\documentclass[12pt]{turabian-researchpaper}

\usepackage[utf8]{inputenc}
\usepackage{csquotes, ellipsis}


\usepackage{mathptmx}% http://ctan.org/pkg/mathptmx


% Specify paper size with geometry package
\usepackage[pass, letterpaper, margin=1in]{geometry}
\usepackage{verbatim}
\usepackage[hyphens,spaces,obeyspaces]{url}
\urlstyle{same}
\def\UrlBreaks{\do\/\do-\do=\do_\do&}
\usepackage{outline}


% For citations, use the biblatex-chicago package
\usepackage[maxbibnames=99, backend=biber]{biblatex-chicago}

\renewcommand*{\biburlsetup}{%
  \Urlmuskip=0mu plus 3mu\relax
  \mathchardef\UrlBigBreakPenalty=100\relax
  \mathchardef\UrlBreakPenalty=200\relax
  \def\UrlBigBreaks{\do\:\do\-}%
  \def\UrlBreaks{%
    \do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}%
    \do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}%
  \ifnumgreater{\value{biburlnumpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlnumpenalty}}}}%
     \do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
    {}%
  \ifnumgreater{\value{biburlucpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlucpenalty}}}}%
     \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
     \do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T
     \do\U\do\V\do\W\do\X\do\Y\do\Z}
    {}%
  \ifnumgreater{\value{biburllcpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburllcpenalty}}}}%
     \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j
     \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t
     \do\u\do\v\do\w\do\x\do\y\do\z}
    {}%
  \let\do=\noexpand}


\newcommand{\mypenalty}{100}
\setcounter{biburlnumpenalty}{\mypenalty}
\setcounter{biburlucpenalty}{\mypenalty}
\setcounter{biburllcpenalty}{\mypenalty}

\renewcommand{\footnotesize}{\normalsize}


\addbibresource{works-cited.bib}

My current bilbiography looks like the following. As you can see, the urls still go over the margins regardless of all the things I've tried. Current Appearance of Bibliography

  • 1
    Can you add a full MWE/MWEB, please. It would include not only your document preamble, but also a few problematic .bib entries and it should be compilable if copied and pasted into a new file. That way we can make sure we all talk about the same thing, get started more quickly and can make sure that our solutions work for you. – moewe Apr 19 '18 at 5:39
  • Also: Welcome to TeX.SX! – moewe Apr 19 '18 at 5:39
  • 1
    You may also want to look into making your URLs shorted by removing unnecessary clutter from them. I don't have access to the Opinionarchive, but for the very first link in your screenshot http://search.opinionarchives.com/WM_Web/DigitalArchive.aspx?aid=04501055_1 seems to be an alternative. – moewe Apr 19 '18 at 10:13
  • Any news here? If the answer given below helped you, please consider accepting it by clicking the green checkmark next to the top left of the answer. If it did not help you, I'm afraid we need more help to figure out your problem. Please post an MWE (links in my first comment) so we can help you. – moewe Apr 21 '18 at 6:13
  • Any news here? Did the answer help you? Do you need more help? – moewe Apr 26 '18 at 11:24
1

100 might be a bit low for the penalty. Did you play around with higher numbers?

Without an MWE, it's impossible to test, but you could additionally try

\usepackage{etoolbox}
\apptocmd{\UrlBreaks}{\do\XXX{}{}

where XXX is the sign where your URL is actually breaking.

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.