Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Omikhleia opened this issue Jun 8, 2024 · 3 comments
Assignees
Labels
bug Software bug issue enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages

Comments

@Omikhleia
Copy link
Member

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

  • "an inline citation", with \cite -- in our current Chicago-style author-date implementation, (Doe 2023)
  • "a full reference", with \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...

  • "in-text" citation = how one would format a citation in the text flow. In "true" form: Some text (Doe, 2023; Smith, 2024).
  • "note" citation = how one would format a (ex. foot)note. A longer form, e.g. John Doe, "My Article." etc.
  • "bibliography" reference = how one format the entry in a bibliography (typically at the end of an article), e.g. Doe, John. "My Article." etc.

Where does CSL stands?

  • It usually has 2 different style files, one for "in-text" <citation> and one for "note" <citation>
  • This does make sense, because:
    • Normally one does not mix both citation types in a given work.
    • The <bibliography> reference format usually depends on the former citation style, e.g. (I'm simplifying)
      • With "in-text citations (Doe, 2023), the reference in a bibliography would be keyed: Doe, John. 2023. "My Article." etc.
      • With "note" citations, the reference in a bibliography would be keyed: Doe, John. "My Article." etc. (note the use of a period here, not a comma)

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.

@Omikhleia Omikhleia added bug Software bug issue modules:packages Issue relates to core or 3rd party packages enhancement Software improvement or feature request labels Jun 8, 2024
@Omikhleia
Copy link
Member Author

I wonder what's the path here:

  • Fix our Lua implementation as a MWE.
  • Use a CSL engine such as citeproc-lua - not obvious due to the ties with LuaTeX
  • Use another CSL engine, e.g. Rust-based now that 0.15 is surfacing, such as hayagriva (And let's bits of Typst enter SILE. Erm...)

@alerque
Copy link
Member

alerque commented Jun 8, 2024

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
Copy link
Member Author

Omikhleia commented Jun 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages
Projects
Development

No branches or pull requests

2 participants