Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOI overstretching in references #198

Closed
andreifoldes opened this issue Sep 22, 2023 · 8 comments
Closed

DOI overstretching in references #198

andreifoldes opened this issue Sep 22, 2023 · 8 comments
Assignees

Comments

@andreifoldes
Copy link

andreifoldes commented Sep 22, 2023

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.

@ismayc
Copy link
Owner

ismayc commented Sep 22, 2023

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.

@andreifoldes
Copy link
Author

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

@ismayc
Copy link
Owner

ismayc commented Sep 23, 2023

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}

@andreifoldes
Copy link
Author

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

@ismayc
Copy link
Owner

ismayc commented Sep 25, 2023

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.

@andreifoldes
Copy link
Author

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

@github-actions
Copy link

github-actions bot commented Oct 1, 2023

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.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants