mattmight / bib2sx Goto Github PK
View Code? Open in Web Editor NEWA tool for manipulating bibtex files as s-expressions
License: Other
A tool for manipulating bibtex files as s-expressions
License: Other
Hi,
This tool looks quite useful, but I ran into an error. I often use @preamble{"\providecommand{\baptiste}{First, Last}"}
in my bib files, and have entries such as
@article{dummy,
Author = {\baptiste and Other People},
Journal = {Journal of things},
Number = {1},
Pages = {00000},
Title = {Some title},
Volume = {10},
Year = {2016}}
I find it convenient because I can override the definition in a TeX file, e.g. to make my name bold,
\newcommand{\baptiste}{\textbf{First Last}}
@string
seems more limited in scope and doesn't really allow this sort of partial transformation.
This:
@inproceedings{wasserrab-nst-OOPSLA06,
author={Daniel Wasserrab and Tobias Nipkow and Gregor Snelting and Frank Tip},
title={An Operational Semantics and Type Safety Proof for Multiple
Inheritance in {C}++},
booktitle={{OOPSLA} '06: Object oriented programming, systems, languages,
and applications},
publisher={ACM Press},
year=2006
}
causes
parsing error: #t { #f
context...:
/Applications/Racket v6.1.1/share/pkgs/parser-tools-lib/parser-tools/yacc.rkt:337:16: parsing-loop
#%mzc:bib2sx: [running body]
loop
It could be the above really is malformed, though I can't see why if so.
It looks like this tool can convert BibTeX to JSON, but it would be great if it could convert that JSON back to BibTeX.
The following input
@inproceedings{foo,
author = {Rastislav Bod{\'{\i}}k},
title = {Some Test}
}
and command bib2sx --parse-names
fails with a parse error. If you remove the outer braces to turn the last name into Bod\'{\i}k
, then the parser splits the name into
(author (name (first "Rastislav" " " "Bod\\'") (von) (last '"\\i" "k") (jr)))
which is wrong.
If you change it to Bod{\'\i}k
, you get
(author (name (first "Rastislav" " " "Bod") (von) (last '"\\'\\i" "k") (jr)))
The form with two sets of braces comes from a DBLP record; I don't know if it, or any of the others, is correct BibTeX.
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.