ismayc / thesisdown

An updated R Markdown thesis template using the bookdown package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DOI overstretching in references

andreifoldes opened this issue · comments

Greetings,

Describe the bug
I notice some of my references are overstretching the page margins. It seems that bookdown/thesisdown is unsure when to calculate a newline for the DOI URL. It does seem to be okay with splitting the DOI if there is a dash "-" in it but unwilling otherwise (for example ".")
image

To Reproduce
In screenshot it is this reference that is acting up: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0269439

Expected behavior
I believe all references should fit in the page margin DOI included.

Desktop (please complete the following information):

  • OS: Windows 10
packageVersion("thesisdown")
[1] ‘0.2.0.9000’

Additional context
Add any other context about the problem here.

Hey there. Thanks for flagging. I'd guess this is more of a LaTeX issue. I'll do some Stack Overflow research when I get a chance to see if there are some additional settings to be added to get this working there.

Thanks, I'll try to look into it too this weekend!

I haven’t been able to test this yet, but can you try adding in this line in place of \usepackage{hyperref} to the LaTeX template?

\usepackage[breaklinks]{hyperref}

Hi
I replaced
\usepackage{hyperref} with
\usepackage[breaklinks]{hyperref} in the template.tex file. No success so far..

Another option would be to create short URLs using a site like tinyurl or bit.ly as well. You could then have a table referencing what those links go to that is not in the actual references section that has these spacing limitations.

I think that's a very good idea! I will go over with tinyurl over the problematic ones over the weekend!

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.