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

bibliography(): print accent characters #50

Closed
zkamvar opened this issue Feb 4, 2014 · 6 comments
Closed

bibliography(): print accent characters #50

zkamvar opened this issue Feb 4, 2014 · 6 comments

Comments

@zkamvar
Copy link

zkamvar commented Feb 4, 2014

Hi, I've run into a slight hiccup with citations that I put into a bibtex file where there are accents over the Authors' names.

This returns This:

Fran{\c{c}}ois Balloux, Laurent Lehmann, Thierry Mee{^u}s, (2003) The population genetics of clonal and partially clonal diploids. Genetics 164 (4) 1635-1644

Is there a flag that I can use to properly parse these entries?

@cboettig
Copy link
Owner

cboettig commented Feb 5, 2014

Thanks for the bug report, I'll look into how to avoid this automatically. Meanwhile, try: bibliography(style="text"), which should give you the utf-8 accent characters instead of the bibtex ascii notation for accents.

@zkamvar
Copy link
Author

zkamvar commented Feb 5, 2014

Oh, frag, I didn't realize the input link wasn't static, sorry about that. Here's the contents of the bibtex file:

@article{balloux2003population,
  title={The population genetics of clonal and partially clonal diploids},
  author={Balloux, Fran{\c{c}}ois and Lehmann, Laurent and de Mee{\^u}s, Thierry},
  journal={Genetics},
  volume={164},
  number={4},
  pages={1635--1644},
  year={2003},
  publisher={Genetics Soc America}
}

@cboettig
Copy link
Owner

cboettig commented Feb 5, 2014

No problem. This should work with the text option I mentioned. If not, you
may have an old version of knitcitations the bibtex package? Paste the
output of sessionInfo() after running your example.


Carl Boettiger
http://carlboettiger.info

sent from mobile device; my apologies for any terseness or typos
On Feb 4, 2014 8:21 PM, "Zhian N. Kamvar" notifications@github.com wrote:

Oh, frag, I didn't realize the input link wasn't static, sorry about that.
Here's the contents of the bibtex file:

@Article{balloux2003population,
title={The population genetics of clonal and partially clonal diploids},
author={Balloux, Fran{\c{c}}ois and Lehmann, Laurent and de Mee{^u}s, Thierry},
journal={Genetics},
volume={164},
number={4},
pages={1635--1644},
year={2003},
publisher={Genetics Soc America}
}

Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-34136542
.

@zkamvar
Copy link
Author

zkamvar commented Feb 5, 2014

It does seem to work with simply bibliography(style = "text"), however this does not work:

bibliography(.bibstyle = "pnas", style = "text")
Error: attempt to apply non-function

But the version without the style argument works. Below is my sessionInfo()

R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] knitcitations_0.5-0 bibtex_0.3-6        knitr_1.5          

loaded via a namespace (and not attached):
[1] digest_0.6.4   evaluate_0.5.1 formatR_0.10   httr_0.2      
[5] RCurl_1.95-4.1 stringr_0.6.2  tools_3.0.2    XML_3.95-0.2  
[9] xtable_1.7-1 

Thanks for the quick reply!

@cboettig
Copy link
Owner

cboettig commented Feb 5, 2014

I am afraid "pnas" is not a valid option for bibstyle. Knitcitations
doesn't support journal styles at this time.


Carl Boettiger
http://carlboettiger.info

sent from mobile device; my apologies for any terseness or typos
On Feb 4, 2014 10:33 PM, "Zhian N. Kamvar" notifications@github.com wrote:

It does seem to work with simply bibliography(style = "text"), however
this does not work:

bibliography(.bibstyle = "pnas", style = "text")
Error: attempt to apply non-function

But the version without the style argument works. Below is my
sessionInfo()

R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] knitcitations_0.5-0 bibtex_0.3-6 knitr_1.5

loaded via a namespace (and not attached):
[1] digest_0.6.4 evaluate_0.5.1 formatR_0.10 httr_0.2
[5] RCurl_1.95-4.1 stringr_0.6.2 tools_3.0.2 XML_3.95-0.2
[9] xtable_1.7-1

Thanks for the quick reply!

Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-34141122
.

@zkamvar
Copy link
Author

zkamvar commented Feb 5, 2014

Understood. Thank you for taking a look at 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