Skip to content

nametags:0.1.0#4798

Open
cwimpy wants to merge 1 commit into
typst:mainfrom
cwimpy:nametags-0.1.0
Open

nametags:0.1.0#4798
cwimpy wants to merge 1 commit into
typst:mainfrom
cwimpy:nametags-0.1.0

Conversation

@cwimpy
Copy link
Copy Markdown
Contributor

@cwimpy cwimpy commented May 7, 2026

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.

  • Two functions: nametag and nametent
  • Logos passed as bytes via read("logo.png", encoding: none) so paths resolve relative to the calling file
  • Auto-sized name text on tents (52 / 60 / 68 pt) by character count
  • Font fallbacks for compilers without the licensed display fonts

Source: https://github.com/cwimpy/typst-templates/tree/main/nametags-package

@cwimpy cwimpy temporarily deployed to Package Check May 7, 2026 05:01 — with GitHub Actions Inactive
@typst-package-check typst-package-check Bot added the new A new package submission. label May 7, 2026
Copy link
Copy Markdown
Member

@saecki saecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this package!

- **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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@saecki saecki added the waiting-on-author Pull request waits on author label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new A new package submission. waiting-on-author Pull request waits on author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants