-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
[Feature] Add typst CAYW citations #2817
Comments
|
As per this comment:
|
🤖 this is your friendly neighborhood build bot announcing test build 6.7.169.2817.5949 ("cayw-typst") This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.169.2817.5949, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...". |
This is almost working. But the citation key has to be surrounded by '<' and '>'. As the |
Maybe this way?: public async typst(citations, _options): Promise<string> {
const regex = /^[a-zA-Z0-9_\-:.]+$/;
return await citations.map(citation =>
regex.test(citation.citationKey)
? `#cite(<${citation.citationKey}>)`
: `#cite(label("${citation.citationKey}"))`
).join('\n');
} |
I took that from your earlier implementation. |
Yeah my bad. New build incoming. |
No locators or anything? |
|
What do you mean by locators?
The supplement could be useful. |
Does typst accept
You can suppress author in the cite, which would mean |
You can just use the key in typst like: |
🤖 this is your friendly neighborhood build bot announcing test build 6.7.169.2817.5952 ("fixes #2817") This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.169.2817.5952, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...". |
This is working great, thank a lot! |
Debug log ID
TWJFUAK7-euc/6.7.169-7
What happened?
I would like to insert the citations into my typst document and thus would love to see typst support for the CAYW feature.
I noticed the pandoc uses the
@citation-key
syntax which also works with typst most of the time. But I would like to see the#cite(<citation-key>)
syntax as this is much more versatile.Also here is the link to the typst citation documentation.
The text was updated successfully, but these errors were encountered: