sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.67k stars 99 forks source link

In-text, note and bibliography citation styles are not supported as per their definition #2049

Open Omikhleia opened 5 months ago

Omikhleia commented 5 months ago

As of 0.14.17-0.15.0, the bibtex package provides two commands:

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?

Where does SILE stands?

So nothing is right here.

Omikhleia commented 5 months ago

I wonder what's the path here:

alerque commented 5 months ago

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.

Omikhleia commented 5 months ago

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.)

Omikhleia commented 2 months ago

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 ;)