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

Label defined multiple times #5

Open
tingerrr opened this issue Apr 19, 2024 · 2 comments
Open

Label defined multiple times #5

tingerrr opened this issue Apr 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tingerrr
Copy link
Contributor

I wanted to try out mantys for a new package I was working on and ran into an issue, the following code complained about the labels for the functions being defined multiple times:

#import "@preview/mantys:0.1.1": *

#import "/src/lib.typ" as subpar

#let package = toml("/typst.toml")

#show: mantys.with(
  ..package,
  title: [subpar],
  date: datetime.today().display(),
  abstract: [
    Subpar provides easy to use subfigures with sensible default numbering and related features like chapter-relative numbering in mind.
  ],
  example-scope: (subpar: subpar)
)

#tidy-module(read("/src/lib.typ"))

You can see the full repository at this point here.

@jneug
Copy link
Owner

jneug commented Apr 21, 2024

mantys and tidy both create labels for the functions and without a namespace for the tidy module, those labels collide. I will look into that.
For now, you can simply set a name when calling tidy-module:

#tidy-module(read("/src/lib.typ"), name:"lib")

@jneug
Copy link
Owner

jneug commented Apr 21, 2024

As a sidenote: String arguments seem to be escaped twice. I opened an issue (#6) and will look into that as well.

@jneug jneug added the enhancement New feature or request label Apr 21, 2024
@jneug jneug self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants