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

図の中で文献を引用すると文献番号ではなく図番号が振られてしまう #3

Closed
zushi0516 opened this issue Nov 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@zushi0516
Copy link

#img(
  image("path"),
  caption: [
  caption @paper
    ],
) <figure1>

のように図を書くと、@paperの部分が文献番号ではなく図番号になってしまいます。

@chantakan chantakan added the bug Something isn't working label Nov 29, 2023
@chantakan
Copy link
Collaborator

Could you please tell me a bit more about this?
There doesn't seem to be any problems in my environment.

@chantakan
Copy link
Collaborator

I got it! if you cite a reference on a figure, the numbering is preferred.
I added the following to-string function with reference to this issue

#let to-string(content) = {
  if content.has("text") {
    content.text
  } else if content.has("children") {
    content.children.map(to-string).join("")
  } else if content.has("body") {
    to-string(content.body)
  } else if content == [ ] {
    " "
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants