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

Questions to current state of parsing and an error message. #7

Open
kellertuer opened this issue Oct 31, 2020 · 2 comments
Open

Questions to current state of parsing and an error message. #7

kellertuer opened this issue Oct 31, 2020 · 2 comments

Comments

@kellertuer
Copy link

I am looking forward to using DocumenterCitations.jl somewhen in my repositories and started playing around with BibParser trying to understand how I can maybe help going forward to CSL capabilities.

When I just take a Bibtex Example file – e.g. https://raw.githubusercontent.com/brechtm/citeproc-py/master/examples/xampl.bib

I get

julia> bib = BibParser.parse_file("xampl.bib")
ERROR: Expected } on line 345
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] expect at .julia/packages/BibParser/jVXKY/src/bibtex.jl:52 [inlined]
 [3] field!(::BibParser.BibTeX.Parser{Array{SubString{String},1}}, ::Dict{String,String}) at .julia/packages/BibParser/jVXKY/src/bibtex.jl:102
 [4] parse_bibtex(::String) at .julia/packages/BibParser/jVXKY/src/bibtex.jl:158
 [5] parse_file(::String) at .julia/packages/BibParser/jVXKY/src/bibtex.jl:169
 [6] #parse_file#1 at .julia/packages/BibParser/jVXKY/src/BibParser.jl:19 [inlined]
 [7] parse_file(::String) at .julia/packages/BibParser/jVXKY/src/BibParser.jl:18
 [8] top-level scope at REPL[7]:1

It seems to be a problem with doubly curly braces? Since line 345 is indeed

   author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",

What's missing for this to be parsed?

Further if I shorten the file above to just the first entry

@ARTICLE{article-minimal,
   author = {L[eslie] A. Aamport},
   title = {The Gnats and Gnus Document Preparation System},
   journal = {\mbox{G-Animal's} Journal},
   year = 1986,
}

and parse the file only containing the, I get an empty dictionary.

@Azzaare
Copy link
Member

Azzaare commented Apr 13, 2021

As mentioned in #8 , I missed all the messages for a while ...
Once I finish with the new bibtex parser, I will try your examples and see if there is still a need for a fix.

@Azzaare
Copy link
Member

Azzaare commented May 4, 2021

I think the parsing of xampl.bib is better now. However, it is far from satisfying (see #16 for instance)

Ideally, the content of the entries should be stored in BibInternal in a format that does not contain any more LaTeX code.

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