-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Convenient syntax for nested import #2148
Copy link
Copy link
Closed
Labels
feature requestNew feature or requestNew feature or requestgood contributionSuitable for contribution, but unlike "good first issue", it may need prior experienceSuitable for contribution, but unlike "good first issue", it may need prior experiencepackagesAnything related to Typst package management.Anything related to Typst package management.scriptingAbout Typst's coding capabilitiesAbout Typst's coding capabilities
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or requestgood contributionSuitable for contribution, but unlike "good first issue", it may need prior experienceSuitable for contribution, but unlike "good first issue", it may need prior experiencepackagesAnything related to Typst package management.Anything related to Typst package management.scriptingAbout Typst's coding capabilitiesAbout Typst's coding capabilities
Description
It would be highly convenient to allow full folders to exist as local packages:
Currently, this results in the following error:
Use Case
I have one templates folder with several options:
Currently, the best workaround is to use a relative import:
This is not ideal because (1) it is sensitive to the location of the main document and (2) requires typst to be run with
--rootto work.I would love to symlink this folder to
typst/packages/localand access it as a "package" to increase reusability. Even if I were to "publish"templatesas a package to make this happen, it would still require "flattening" each template into something individually accessible since only one entrypoint can be specified:It seems like potential solutions are to:
localwithout complaining that they are nonconformant packages