Software: beastie

Karl Berry karl at freefriends.org
Mon May 20 22:35:42 CEST 2024


    I can imagine this would be a good starting point for a CSL
    implementation

FWIW, there's already https://ctan.org/pkg/citation-style-language.
(I haven't used it. The author said he would write an article for
TUGboat when it was more mature. I hope that happens.)

    I'm uncertain what the next useful direction would be.  

I don't know that it's relevant, but what came to mind is one of the
wishlist items that's been in my head for a long time: a bst or other
file that can do the usual bib processing, but outputs a reasonably
machine-readable marked-up file like:

\bibentry{somebib}
  \title{Some title}
  \author{A.U. Thor}
  ...

Or maybe better:
  bibentry = somebib
  title = Some title
  author = A.U. Thor

Or YAML. Or whatever. Preferably line-oriented.

The idea is then to parse that file with Perl|whatever (not TeX) and
creating a *structured* crossref citation. At present, I believe
unstructured citations are by far the more commonly used. (We only do
unstructured for TUGboat.) Here is one of their pages about it (the
schema is available on crossref.org):
https://www.crossref.org/documentation/schema-library/markup-guide-metadata-segments/references/

This output would only be used for crossref, not for creating typeset
output. So, for example, the punctuation between the parts of the entry,
which is quite a complication for typesetting, doesn't have to be
specified.

As far I can see, current biblatex output would be difficult to parse
with anything but TeX. And of course normal BibTeX output drops all the
markup so has no chance.

I've thought about starting from tugboat.bst and outputting something
like the above, and maybe that is the simplest way. It would not
surprise me if functionality at the bib-processor level would be needed,
or at least, very helpful. I haven't implemented anything and,
realistically, probably will never get around to it. So if you or
someone else wants to give it a try, that would be great.

I've also thought about starting from the .bib files, which gives the
structure for free, but then one ends up reimplementing bibtex/whatever
in order to get the right entries and choose the right fields, which
doesn't seem like the right approach.

Happy hacking,
Karl


More information about the texhax mailing list.