ulyngs / oxforddown

Template for writing an Oxford University thesis in R Markdown; uses the OxThesis LaTeX template and was inspired by thesisdown.
https://ulyngs.github.io/oxforddown/
MIT License
220 stars 80 forks source link

URLs in references section not wrapping #53

Closed tomislavmedak closed 2 years ago

tomislavmedak commented 2 years ago

Hi again, when exporting my thesis to PDF, URLs in the references section stretching across three lines do not wrap, here is an example:

pdf

I assume that's a latex quirk?

Thanks

ulyngs commented 2 years ago

Can you check it this solution works: https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url

I.e. try adding \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} to templates/template.tex

tomislavmedak commented 2 years ago

Thanks. It does work, but not for all links for some reason. I've looked further in that stackexchange thread and actually found that this solution works universally: https://tex.stackexchange.com/a/407368.

One has to load the following package to template.tex :

\usepackage{xurl}

BTW, I still owe you a neat .docx template. It's almost there, approximating the LaTeX template as closely as possible, but still not there.

ulyngs commented 2 years ago

So I simply need to add \usepackage{xurl} to template.tex and it should be fine?

tomislavmedak commented 2 years ago

That's correct.

ulyngs commented 2 years ago

Fixed with da020d9bb64183fd2cfac7d813282651287e6ef7