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

Fragile LaTeX parsing in ReadBib #16

Closed
EricEdwardBryant opened this issue Jun 20, 2016 · 1 comment
Closed

Fragile LaTeX parsing in ReadBib #16

EricEdwardBryant opened this issue Jun 20, 2016 · 1 comment

Comments

@EricEdwardBryant
Copy link

Hi there,

Parsing certain LaTex encoded Utf8 characters causes ReadBib to hang. This seems to really be a problem with tools::latexToUtf8, but perhaps a failsafe is in order?

# This works beautifully
library(RefManageR)
bib <- GetPubMedByID('19047157')
WriteBib(bib, 'example.bib')

# This will hang
result <- ReadBib('example.bib')

# because the following author fails in RefManageR:::ArrangeSingleAuthor
author <- "Mar{\\a'\\i}a A Balboa"
tools::latexToUtf8(tools::parseLatex(author))

Cheers,
Eric

Session info -------------------
 setting  value                       
 version  R version 3.3.0 (2016-05-03)
 system   x86_64, darwin13.4.0        
 ui       RStudio (0.99.1219)         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2016-06-20                  

Packages -----------------------
 package    * version  date       source        
 bibtex       0.4.0    2014-12-31 CRAN (R 3.3.0)
 bitops       1.0-6    2013-08-17 CRAN (R 3.2.0)
 devtools     1.11.1   2016-04-21 CRAN (R 3.3.0)
 digest       0.6.9    2016-01-08 CRAN (R 3.2.3)
 httr         1.1.0    2016-01-28 CRAN (R 3.2.2)
 lubridate    1.5.6    2016-04-06 CRAN (R 3.2.4)
 magrittr     1.5      2014-11-22 CRAN (R 3.2.0)
 memoise      1.0.0    2016-01-29 CRAN (R 3.2.2)
 plyr         1.8.4    2016-06-08 CRAN (R 3.3.0)
 R6           2.1.2    2016-01-26 CRAN (R 3.2.3)
 Rcpp         0.12.5   2016-05-14 CRAN (R 3.2.5)
 RCurl        1.95-4.8 2016-03-01 CRAN (R 3.2.4)
 RefManageR * 0.10.13  2016-04-04 CRAN (R 3.3.0)
 RJSONIO      1.3-0    2014-07-28 CRAN (R 3.3.0)
 stringi      1.1.1    2016-05-27 CRAN (R 3.2.5)
 stringr      1.0.0    2015-04-30 CRAN (R 3.2.0)
 withr        1.0.1    2016-02-04 CRAN (R 3.2.3)
 XML          3.98-1.4 2016-03-01 CRAN (R 3.2.4)
@crsh
Copy link

crsh commented Jul 26, 2016

Just encountered the same problem with the following name:

author <- "Abad, Mar{\\'\\i}a J. F."
tools::latexToUtf8(tools::parseLatex(author))

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