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 only converted to URL for first reference when also using package hyperref #28

Closed
jpjoines opened this issue Nov 16, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@jpjoines
Copy link

I'm using APA style, with citation-style-language {2022-09-23} {v0.2.2} in TexLive 2022, and compiling with LuaLatex. DOIs should be converted to URLs in the reference list by prepending https://doi.org/ to the DOI. However, when package hyperref is also used, only the first reference in the list has https://doi.org/ prepended to the DOI. Here's a MRE:

\documentclass{article}
  
\begin{filecontents}[overwrite, noheader]{mwe-csl.bib}
@article{edge-garza.etal-2014-Mol.Breed.,
  title = {A high-throughput and cost-efficient {{DNA}} extraction protocol for the tree fruit crops of apple, sweet cherry, and peach relying on silica beads during tissue sampling},
  author = {Edge-Garza, Daniel A. and Rowland, Terrence V. and Haendiges, Stacey and Peace, Cameron},
  date = {2014-12-01},
  journaltitle = {Molecular Breeding},
  volume = {34},
  number = {4},
  pages = {2225--2228},
  issn = {1380-3743, 1572-9788},
  doi = {10.1007/s11032-014-0160-x},
}

@article{paris.etal-2017-MethodsEcolEvola,
  title = {Lost in parameter space: {{A}} road map for {{Stacks}}},
  shorttitle = {Lost in parameter space},
  author = {Paris, Josephine R and Stevens, Jamie R and Catchen, Julian M},
  date = {2017-03-01},
  journaltitle = {Methods in Ecology and Evolution},
  shortjournal = {Methods Ecol Evol},
  volume = {8},
  pages = {1360--1373},
  issn = {2041-210X},
  doi = {10.1111/2041-210X.12775},
}

@article{peterson.etal-2012-PLoSONE,
  title = {Double digest {{RADseq}}: an inexpensive method for de novo {{SNP}} discovery and genotyping in model and non-model species},
  shorttitle = {Double {{Digest RADseq}}},
  author = {Peterson, Brant K. and Weber, Jesse N. and Kay, Emily H. and Fisher, Heidi S. and Hoekstra, Hopi E.},
  date = {2012-05-31},
  journaltitle = {PLoS ONE},
  volume = {7},
  number = {5},
  pages = {e37135},
  issn = {1932-6203},
  doi = {10.1371/journal.pone.0037135},
}
\end{filecontents}

\usepackage{citation-style-language}
\cslsetup{style = apa}
\addbibresource{mwe-csl.bib}

\usepackage{hyperref}

\begin{document}

        First citation \cite{edge-garza.etal-2014-Mol.Breed.}.

        Second citation \cite{peterson.etal-2012-PLoSONE}.

        Third citation \cite{paris.etal-2017-MethodsEcolEvola}.

        \printbibliography

\end{document}
@zepinglee
Copy link
Owner

Thanks for your feedback and I can reproduce this bug.

@zepinglee zepinglee added the bug Something isn't working label Nov 17, 2022
@zepinglee
Copy link
Owner

It should be fixed in 83caeb9.

Screen Shot 2022-11-17 at 11 25 16

@jpjoines
Copy link
Author

Thanks! That fixed the issue and your work makes mine much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants