juliatex / bibtex.jl Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
This suffers the same problem as Humans-of-Julia/BibParser.jl#5 (which is not surprising, as BibParser.jl uses the same code):
julia> using BibTeX
julia> bibtex = """@article{Heun1900,
title = {Neue Methoden zur approximativen Integration der
Differentialgleichungen einer unabh\\\"{a}ngigen Ver\\\"{a}nderlichen},
author = {Heun, Karl},
journal = {Z. Math. Phys},
volume = {45},
pages = {23--38},
year = {1900},
}""";
julia> preamble, result = parse_bibtex(bibtex)
("", Dict("Heun1900" => Dict("volume" => "45","author" => "Heun , Karl","pages" => "23--38","journal" => "Z. Math. Phys","year" => "1900","title" => "Neue Methoden zur approximativen Integration der Differentialgleichungen einer unabh\\ \" { a } ngigen Ver\\ \" { a } nderlichen","type" => "article")))
julia> result["Heun1900"]["title"]
"Neue Methoden zur approximativen Integration der Differentialgleichungen einer unabh\\ \" { a } ngigen Ver\\ \" { a } nderlichen"
When I try to parse the example file from the repository, parse_bibtex output a tuple with an empty string and an empty dict.
FYI, I am using Julia 4.2 on windows.
Instead of keeping the list of authors as a unique string, it would make sense to at least have the option to get it as a vector of individual authors?
Would it be possible to register this package?
Also, I noticed that the CI isn't hooked up. I'd be happy to help out if you can give me access.
After getting result
from parse_bibtex
, sometimes, I would like to select a part of items in result
(based on keys) and then export to another bib file. I want if it is possible to add a function (for example export_bibtex
) to do that? Thank you.
It would be helpful to mention the alternative https://github.com/Humans-of-Julia/BibParser.jl in the README.
The line
Line 17 in 08bd44b
{
and }
which makes it tricky to use for. I spent some time trying to figure out a workaround until I found BibParser which seems more feature-rich, actively maintained and the one used internally by https://github.com/JuliaDocs/DocumenterCitations.jl.It is common in some bibtex entry types to use a "type" field (well actually I don't know… but it's listed as a possible biblatex type in the documentation so it's reasonable to use it, even if I don't know what is the recommended usage). When parsing a document with such fields, the entry type is overwritten. Is it a desired behavior? Wouldn't it be better to export the entry type to a specific key to prevent that, or at least to have some optional parameter to specify this?
Here is an example:
julia> BibTeX.parse_bibtex("@mytype{mycoolpaper, note={Submitted to AwesomeConference} }")
("", Dict("mycoolpaper" => Dict("note" => "Submitted to AwesomeConference", "type" => "mytype")))
julia> BibTeX.parse_bibtex("@mytype{mycoolpaper, type={Submitted to AwesomeConference} }")
("", Dict("mycoolpaper" => Dict("type" => "Submitted to AwesomeConference")))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.