I'm becoming a TeXist by profession these days. This is the first real challenge from my new employer: I was asked if I could take a look at this problem and improve the current state, if it's possible at all.
We are typesetting some journals and we are getting references already typesetted (BBL or references typesetted in the thebibliography environment). I tried to parse such an input back to its fields many years ago and it's not working well.
My plan is to start requesting the BIB files from the authors (the authors have them, that's what I believe) and process them into a known TeX structure of the journal, e.g. \myauthor, \mytitle, (see an example below)... After I process the AUX file (or the TeX file and the \cite* commands) I'd be able to filter out entries from the BIB file.
- I was thinking to use BibTeX directly, but the language is not to my liking.
- I'm also considering BibLaTeX, but my knowledge about this tool is still limited.
- There are some interesting tools and scripts for processing AUX files and there is also fred available, :-), for processing BIB files.
- It might be easier to convert BIB files to CSV/TSV/DAT/JSON/SQL file first and then work with it afterwards. I was thinking of tools like JabRef and similar ones. But I'm not sure if these tools work from the command line.
I'll be happy to inform you about my progress, my current plan and first thoughts are to use Lua and try to:
- Process AUX file, I'd be able to say if I have all references I'm referring to.
- Process BIB file (or generated CSV file out of it...), sort entries in relation to the AUX file, if necessary, sort fields per reference type, if necessary, and polish as many things as possible to save people as many time as possible.
If the script would be working (I parsed nested parentheses several times), I should be getting the structure of this kind from the BIB file. The current state could be improved significantly, I hope, because several employees are parsing BBL/thebibliography manually. They won't lost their jobs even if such a script would work perfectly, because there will be some authors who will send references typesetted in the thebibliography environment no matter what.
\no 6
%\bibitem{nagel}
\by K.-J.\,Engel, R.\,Nagel
\book One-Parameter Semigroups for Linear Evolution Equations
\publ Graduate Texts in Mathematics 194
\publaddr Springer, Berlin
\yr 2000
\ZBL 0952.47036
\MR 1721989
\no 7
%\bibitem{iny}
\by W.\,Greenberg, C.\,van der Mee, V.\,Protopopescu
\book Boundary Value Problems in Abstract Kinetic Theory
\publ Operator Theory: Advances and Applications 23
\publaddr Birkh\"auser, Basel
\yr 1987
\ZBL 0624.35003
\MR 0896904
\no 8
%\bibitem{zs}
\by E.\,Hille, R.\,S.\,Phillips
\book Functional Analysis and Semi-Groups. rev. ed
\publ Colloquium Publications 31
\publaddr American Mathematical Society, Providence
\yr 1957
\moreref
\book Functional Analysis and Semi-Groups. 3rd printing of rev. ed. of 1957
\publ Colloquium Publications 31
\publaddr American Mathematical Society, Providence
\yr 1974
\ZBL 0392.46001
\MR 0089373
I wanted to ask you about your experience with different tools, I welcome comments and recommending links.
.bblor whatever. – Joseph Wright Jun 06 '14 at 09:58biblatex; its essential method is to make entries from.bibfile fields available to LaTeX via LaTeX commands. You might also like to look at how it interacts withbiberwhich is actually parsing the.bibfile. – Paul Stanley Jun 06 '14 at 11:43amsrefs. there's a mechanism to convert from.bibformat toamsrefs(although not the reverse), and it's not too difficult to set up a "formatter" to match your desired style (several examples are provided). if you have access to mathscinet, using the information from the author's bibliography, a properly-coded entry in either bibtex oramsrefsformat can be obtained if the item is in the database. – barbara beeton Jun 06 '14 at 13:28biberoutput module for this format by just copying thebbl.pmoutput module. Then you would have access to allbiberfeatures like re-encoding, UTF-8, cross resolution, source mapping etc. – PLK Jun 06 '14 at 20:28