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

Double figure captions in typst output #442

Closed
SwiftSeal opened this issue Jun 19, 2024 · 2 comments
Closed

Double figure captions in typst output #442

SwiftSeal opened this issue Jun 19, 2024 · 2 comments

Comments

@SwiftSeal
Copy link

Hello!

Original issue with details is here: jgm/pandoc#9888

When generating typst documents, the figure caption is duplicated. This doesn't occur for word or latex output.

@lierdakil
Copy link
Owner

So basically pandoc-crossref inserts its numbers, and then typst inserts its own on top of those. It's similar to LaTeX in that sense. There's a lot of special-casing for LaTeX output, and it lacks some features, and I'm not too keen on adding the same for typst (not least because I don't use it and have no idea how it works).

You have two options:

  1. Tell typst to skip any special handling of item titles. No idea how to do that, but it's possible in LaTeX, so I assume there is a way in typst, too.
  2. Write a simple LUA filter to convert certain citations to the format typst expects and not use pandoc-crossref at all.

Since typst has its own support for numbering, if you intend to share this with someone and/or edit it after the fact, the latter option is likely what you want. If you're going to pursue that, see also #431.

@SwiftSeal
Copy link
Author

Thanks for letting me know! In the end I found that the following typst code (option 1) fixes the issue

#show figure.where(kind: image): set figure(supplement: none)

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