-
Notifications
You must be signed in to change notification settings - Fork 25
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
automatic DOI links in the reference list #65
Comments
Yes, that would be nice, and I don't yet know which csl files do this well and which don't. It seems that recent R Journal and/or JSS manage but I haven't looked in detail yet. The But I also don't like to add too many extra files as part of the build so hesitant to add a csl. Good enough if we document it? |
I can (should) also ask Achim about how to enable this for jss.bst. Maybe there is an option... |
What JSS does is the following:
At some point last year I had a look whether I could quickly produce a As for APA style: While this is a nice and widely-used style I personally rarely use it, namely because displaying additional information like URLs, access dates, version information, DOIs, etc. is not intended. However, for software-related papers this is needed frequently. |
Thanks, Achim. I guess we need to fiddle more, and probably for now document use of APA as a way out. I don't feel I want to make APA the default though. |
Sorry, it seems that I described the issue vaguely. The resulting APA styled reference list does not have DOI links. |
I had a vague suspicion that PNAS and I might be to blame -- and just "proved it". In short:
Achim: Thoughts on whether hacking that into the bst level In any event the issue of this ticket is now fixed in this new branch so take a look. Edit: Just made it backwards compatible to |
But I just tried copying this from jss.cls and no mas: latex error on redefinition / use different from definition:
|
To avoid the
or
|
@statibk You rock. The second variant, with an added Which is no nice that we can almost consider making the URL optional. For another time... |
Thanks again to @ikashnitsky for raising this, and to @statibk for the quick help. I rolled this up as release 0.0.7 which just got the beloved |
I'm having problems with the new
|
Make sure you get a new copy of It's in my sources: edd@rob:~/git/pinp(master)$ ag doifooter
inst/rmarkdown/templates/pdf/resources/template.tex
72:\doifooter{$doi$}
76:\doifooter{$doi_footer$}
inst/rmarkdown/templates/pdf/skeleton/pinp.cls
282: \fancyfoot[L]{\footerfont\@ifundefined{@doifooter}{}{\@doifooter}}
294:\fancyfoot[LE]{\footerfont\textbf{\thepage}\hspace{7pt}|\hspace{7pt}\@ifundefined{@doifooter}{}{\@doifooter}}
359:\newcommand{\doifooter}[1]{\def\@doifooter{#1}}
edd@rob:~/git/pinp(master)$ and in the installed 0.0.7 package: edd@rob:~/git/pinp(master)$ ag doifooter /usr/local/lib/R/site-library/pinp/
/usr/local/lib/R/site-library/pinp/rmarkdown/templates/pdf/resources/template.tex
72:\doifooter{$doi$}
76:\doifooter{$doi_footer$}
/usr/local/lib/R/site-library/pinp/rmarkdown/templates/pdf/skeleton/pinp.cls
282: \fancyfoot[L]{\footerfont\@ifundefined{@doifooter}{}{\@doifooter}}
294:\fancyfoot[LE]{\footerfont\textbf{\thepage}\hspace{7pt}|\hspace{7pt}\@ifundefined{@doifooter}{}{\@doifooter}}
359:\newcommand{\doifooter}[1]{\def\@doifooter{#1}}
edd@rob:~/git/pinp(master)$ That said, it is still entirely possible I messed this up but I ran a few tests over the last few days with/without this set in YAML. |
Hmm, this is a funny issue then. The files Also, if I get it right the patch only works for |
Yup. My "premature optimisation" of not copying existing files. (Which is still the Right Thing (TM) bigger picture I'd argue.)
Yup. See Achim's comments above. You need advanced LaTeX wizard skills for this, which Achim has. This is not a standard feature. His It is still a big net improvement as only advanced users like you even switch bibliographic styles. And if you do, well then you get to keep the pieces ;-) |
Sure, I agree that my concern only touches a minor group of {pinp} users. |
Need to think that through because we then also have to conditionally copy apa.bst in and all that but I guess it could be done. And from a quick glance APA does not seem all that different. Is is really worth it? |
I would like to report that the new pinp package version doesn't seem to compile the previous versions of pinp (.rmd). The log file reports an error : ' !undefined control sequence'. \1.50 \doifooter. |
You need to replace you |
It works!! many thanks, Dirk |
I notice that the current solution is just a tiny step from being perfect. I think, whenever bib entry has a DOI, and {pinp} automatically generates a nice hyperlink in the reference list, there us no need to also include the URL, which eats up space and effectively directs to the same page as DOI link. |
This SO question looks very relevant |
@eddelbuettel I've found empirically that the desired behavior is implemented in |
tl;dr -- maybe default bibliography to APA?
I am specifying a custom .csl using the option (apa.csl is in the parent directory)
The resulting reference list looks fine. The only issue -- it omits DOI link at the very end. I think it's useful to have a direct link to the papers from the PDF.
The text was updated successfully, but these errors were encountered: