Closed kmccurley closed 3 months ago
It's not clear if this belongs in this repository or in the IACR/cicjournal
repository. The bibtex from a paper comes straight from running bibexport
, which simply makes a copy of the entries without sorting them. The way it does this is peculiar, because it runs bibtex using a specific style export.bst
which simply writes the entry to output. By contrast, sorting is done in the alphaurl
style within the bst file. We could try to create a special .bst
file that merges the sorting feature from alphaurl
with the simply writing done by export.bst
, and maybe that is simplist (and most reliable). The way the bibtex entries are marked up is within the IACR/cicjournal
repository, where the raw bibtex field is parsed by pybtex
and rewritten as html. We could theoretically make a key like what alphaurl
generates and sort by that before writing out to the web page. Both approaches are somewhat complicated.
Since we store the raw bibtex and convert to HTML on the fly, we can use the code in pybtex.style.labels.alpha.py
to generate the labels and sort on that before we show the references in HTML. I just haven't investigated how to use it.
The sort order is now the same as in the PDF. The solution was in bibparse.py:get_citation_map()
where it looks in either the main.aux
file (for bibtex) or the main.bbl
file (for biblatex). This returns an ordered dictionary for the correct ordering.
the bibtex references are currently sorted in the order they appear in the bibtex file, but should really be sorted according to what urlalpha does.