nvarner / typst-lsp

A brand-new language server for Typst, plus a VS Code extension
MIT License
1.18k stars 76 forks source link

"et al." not applied after the first use of citation #512

Closed miles-1 closed 1 month ago

miles-1 commented 2 months ago

Issue

If using a style like "apa" in bibliography, the first instance of a citation correctly truncates the number of authors with "et al.", but any additional instances of that citation include all author names.

Thanks very much for your work to maintain this repo! It is much appreciated.

yochem commented 1 month ago

This should probably be transferred to typst/typst, typst/hayagriva or citation-style/styles. Could you provide a MWE?

miles-1 commented 1 month ago

No, this is not an issue for typst (or tinymist, which I have since switched to because of this issue), just for the typst-lsp vscode extension.

MWE is just as I said, use a citation twice with "apa" for bibliography. For a file citations.yml containing the following:

Roche_2012a:
    type: Article
    title: "Linking community and disease ecology: the impact of biodiversity on pathogen transmission"
    author: ['Roche, Benjamin', 'Dobson, Andrew P.', 'Guégan, Jean-François', 'Rohani, Pejman']
    date: 2012-10
    page-range: 2807-2813
    parent:
        title:
            value: "{Phil. Trans. R. Soc. B}"
        volume: 367

... an a typst file containing the following:

@Roche_2012a

@Roche_2012a

#bibliography(
  "citations.yml",
  style: "apa"
)

... typst online and tinymist both render the two citations as (Roche et al., 2012), but typst-lsp adds all authors but just to the second (and any subsequent) citation.

Enivex commented 1 month ago

No, this is not an issue for typst (or tinymist, which I have since switched to because of this issue), just for the typst-lsp vscode extension.

This is a typst issue. It's just that typst-LSP is still on 0.11.0, where that bug hadn't been fixed yet.

miles-1 commented 1 month ago

I see, I appreciate the info. Will close this issue.