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

Page numbers in the reference #33

Closed
basille opened this issue Mar 28, 2013 · 2 comments
Closed

Page numbers in the reference #33

basille opened this issue Mar 28, 2013 · 2 comments

Comments

@basille
Copy link

basille commented Mar 28, 2013

Dear Carl

I really like knitcitations! Together with knitr, it provides a very neat way to prepare web pages with code and citations embeded, something I wouldn't have dreamt of not very long ago!

This said, if I print a reference, say the one you present in the examples, here is what I get:

print(ref("10.1890/11-0011.1"))
Abrams P, Ruokolainen L, Shuter B and McCann K (2012).Harvesting Creates
Ecological Traps: Consequences of Invisible Mortality Risks in
PredatorPrey Metacommunities._Ecology_, *93*. ISSN 0012-9658, <URL:
http://dx.doi.org/10.1890/11-0011.1>.

One can notice that there is no page numbers in the print, which is however the usual way to print references. Would it be possible to modify formatref (I think that's the one function responsible of it) in order to include the page numbers in the reference? If I look at the details of ans in the function ref, i.e. before the formatting by formatref, I can see that the page numbers are actually available:

ans
<?xml version="1.0" encoding="UTF-8"?>
<doi_records>
...
          <pages>
            <first_page>281</first_page>
            <last_page>293</last_page>
          </pages>
...
</doi_records>

With this addition, that would turn knitcitations into a more complete bibliographic tool.
Thanks in advance!

Mathieu

@cboettig
Copy link
Owner

Thanks for catching this! I had entirely ignored extracting that data from the XML for some reason. Should be fixed in the latest commit. Let me know if it doesn't work or if you hit any other issues.

@basille
Copy link
Author

basille commented Mar 29, 2013

Thanks a lot Carl! It works beautifully, I love it :)

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

2 participants