Open Omikhleia opened 5 months ago
I wonder what's the path here:
I'm not opposed to leveraging stuff Typst uses or provides. The biggest thing I'd note is that the main distinctive at this point is that we give users free reign with all the internals at run time, and Typst takes the opposite approach of allowing nothing. That doesn't mean we can't wrap some libraries and provide their functions to Lua and have that be a good usable interface for folks, but it does affect the boundary of where tinkering can and can't happen.
On this particular issue, fixing our existing code at least to have a reference implementation for earlier iterations might be the easiest way to go...
But eventually, CSL support would need to be considered, and it's typically a case where a 3rd party library could be neat -- SILE would keep the hands on providing the bib entries and formatting the output, but it should not need tinkering with the internals (CSL XML parsing, implementation of rules etc.)
Vs. CSL = sure, CSL support would make most of this issue moot.
I'm keeping it though: There would be an interested challenge checking (from the CSL style) whether the style is "in-text" or "note", the citation command should output a text content... or directly a \footnote
... I'd want to check how feasible this is (and one problem might be whether we need to "gobble" spaces before the \cite
to make it generic, but space-gobbling and punctuation-shifting is too Latex-reminiscent for me to be sure, years after remembering it ;)
As of 0.14.17-0.15.0, the bibtex package provides two commands:
\cite
-- in our current Chicago-style author-date implementation, (Doe 2023)\reference
-- in our Chicago-style implementation... something, but see below....The crux of the matter is that most bibliography styles define not 2, but 3 ways of formatting entries -- and. Chicago doesn't make an exception here...
Where does CSL stands?
<citation>
and one for "note"<citation>
<bibliography>
reference format usually depends on the former citation style, e.g. (I'm simplifying)Where does SILE stands?
\cite
corresponds to the "in-text" citation but takes one key only, so can't handle (Doe, 2023; Smith 2024)...\reference
is unclear, but the fact that it uses a comma after the contributors hints toward a "note" citation style, not a bibliography one...So nothing is right here.