nametags:0.1.0#4798
Conversation
| - **Logos are bytes, not paths.** Typst resolves `image()` paths relative to the file containing the call, so passing a path string into a packaged function won't find a file in your project. Loading the bytes once with `read()` and handing them in sidesteps this. | ||
| - **Example logos are placeholders.** `examples/logo-left.png` and `examples/logo-right.png` are simple wordmarks generated for the demo. Replace them with your own. | ||
| - **Fonts.** Both functions default to "Industry Inc Test Base" (headings) and "Oriya MN" (body), with Impact / Times New Roman as fallbacks. Edit the `heading-font` and `body-font` lists at the top of `nametag.typ` / `nametent.typ` to swap. | ||
| - **Quarto users.** A Quarto-driven version of this template lives at [`cwimpy/typst-templates/nametags`](https://github.com/cwimpy/typst-templates/tree/main/nametags), with an R chunk that reads the CSV and emits Typst calls. |
There was a problem hiding this comment.
Could you use a perma-link or a link to a specific branch/tag? This will ensure the link stays valid and always links to the correct version.
| description = "Conference nametag badges (4x3 in lanyard) and table tents (folded tabloid), driven from a CSV or any iterable." | ||
| repository = "https://github.com/cwimpy/typst-templates/tree/main/nametags-package" | ||
| keywords = ["nametag", "badge", "conference", "tent"] | ||
| categories = ["office"] |
There was a problem hiding this comment.
If you decide to keep the examples directory, could you exclude it here? See https://github.com/typst/packages/blob/main/docs/tips.md#what-to-commit-what-to-exclude
There was a problem hiding this comment.
The whole examples directory will be very hard to find on Typst Universe unless it, or the resources are linked from the readme. Given that there are already code examples in the readme, could you either remove it or add links?
|
|
||
| ## Notes | ||
|
|
||
| - **Logos are bytes, not paths.** Typst resolves `image()` paths relative to the file containing the call, so passing a path string into a packaged function won't find a file in your project. Loading the bytes once with `read()` and handing them in sidesteps this. |
There was a problem hiding this comment.
Packages commonly require the user to pass in an image. You use a set rule to still specify the default size. This would also allow passing in other content. You're not required to change this, just wanted to give some options :)
| @@ -0,0 +1,11 @@ | |||
| [package] | |||
| name = "nametags" | |||
There was a problem hiding this comment.
This name is a little too descriptive. We try to avoid canonical names so multiple packages serving the same purpose can coexist without one having an unfair advantage. Could you change the name to something else, for example by adding a non-descriptive prefix or suffix, or ideally by coming up with something a little more creative? See our naming rules
Conference nametag badges (4 × 3 in lanyard inserts) and table tents (tabloid landscape, folded to 11 × 4.25 in), driven from any CSV or array.
nametagandnametentread("logo.png", encoding: none)so paths resolve relative to the calling fileSource: https://github.com/cwimpy/typst-templates/tree/main/nametags-package