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

HTML or Markdown links for in-line citations #63

Open
zkamvar opened this issue Jul 18, 2014 · 2 comments
Open

HTML or Markdown links for in-line citations #63

zkamvar opened this issue Jul 18, 2014 · 2 comments

Comments

@zkamvar
Copy link

zkamvar commented Jul 18, 2014

Hello,

I recently updated to the most recent version (1.0-1) and noticed that I no longer have the ability to have html links in my in-line citation. I have produced a minimal reproducible example here: https://gist.github.com/zkamvar/f9335be4aaad413fe01c where I specify

cite_options(citation_format = "pandoc", max.names = 3, 
             cite.style = "authoryear", style = "markdown", 
             hyperlink = "to.doc")

I am expecting hyperlinks on my inline citations, but they don't appear even if I select style = "html". Is there a way to add this as an option?

@cboettig
Copy link
Owner

@zkamvar Yeah, that's correct; if you use citation_format = pandoc you won't get hyperlinks. Use citation_format = "text" and it should work, but it doesn't because of a real bug this time. I believe I have just fixed that bug with the most recent push to Github (v0.1.1.99). Of course without pandoc mode you cannot benefit from CSL stylesheets...

Recall that in pandoc mode, kniticitations tells knitr to just generating citations like [@authoryear] and pandoc is responsible for formatting them from there (using the CSL stylesheet specified). Since hyperlinks are not part of the CSL stylesheet, you don't get hyperlinked references. (You would think that is something that pandoc would be able to handle, but it turns out it's not so simple. See https://groups.google.com/forum/#!msg/pandoc-discuss/0UlUwrViCOQ/KBBs-6rNvY0J)

Thanks for the bug report.

@dhimmel
Copy link

dhimmel commented Jan 22, 2015

@cboettig, Thanks for creating this needed package. I first experienced the convenience of doi-only citation when writing my proposal for ThinkLab (Jesse mentioned you two had been in touch). Then I came looking for similar functionality for my html-out rmarkdown projects. I suspect doi-based citation will be the future, and I pity the publishers who still don't assign doi's to their articles.

I agree that hyperlinked inline citations are will be a major addition and provide great utility and elegance. Hopefully, some of these upstream issues get resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants