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

[feature request] support native typst references #431

Open
pbsds opened this issue Apr 12, 2024 · 1 comment
Open

[feature request] support native typst references #431

pbsds opened this issue Apr 12, 2024 · 1 comment

Comments

@pbsds
Copy link

pbsds commented Apr 12, 2024

Currently pandoc-crossref when targeting typst replace references with text+hyperlinks as it would for html, and will append \quad (<number>) in equations.

Would it be possible to support native references in typst?
This will improve mapping between markdown and typst, allowing authors to cooperate in the format they prefer to work in.

https://typst.app/docs/reference/model/ref/

@lierdakil
Copy link
Owner

lierdakil commented Apr 13, 2024

I did this for LaTeX, and frankly I think it was a mistake. Ultimately, I ended up in the situation where features available for other output formats are not supported by LaTeX and vice versa, and there's no easy fix (apart from reimplementing the whole of pandoc-crossref logic in LaTeX, which is not something I'm willing to do, and it would be ultimately rather pointless).

If you just want to translate references between the pandoc-crossref format and something else, without any nifty extra features (which for compatibility you have to eschew), it could be achieved with a relatively simple Lua filter. Just take citations (yes, we're using citation syntax for references) and convert them to raw blocks in the target format. There are some edge cases, but they're comparatively few.

P.S. Since I don't use typst, and don't plan to, I'm certainly not the best person for the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants