Skip to content

Comments

frugal-haw-kiel:0.1.0#3766

Draft
Arne-Berner wants to merge 1 commit intotypst:mainfrom
Arne-Berner:main
Draft

frugal-haw-kiel:0.1.0#3766
Arne-Berner wants to merge 1 commit intotypst:mainfrom
Arne-Berner:main

Conversation

@Arne-Berner
Copy link

I am submitting

  • a new package
  • an update for a package

Description: The package is supposed to help people at the haw (university of applied science) kiel to start with a thesis template that conforms to the requirements.

I have read and followed the submission guidelines and, in particular, I

  • selected a name that isn't the most obvious or canonical name for what the package does
  • added a typst.toml file with all required keys
  • added a README.md with documentation for my package
  • have chosen a license and added a LICENSE file or linked one in my README.md
  • tested my package locally on my system and it worked
  • excluded PDFs or README images, if any, but not the LICENSE

@Arne-Berner
Copy link
Author

Arne-Berner commented Jan 1, 2026

  • ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

Edit: I now use STIX Two Text instead of Times New Roman, because the adobe licensing seems to be a bit more open to change.
Also some paths in the example were still pointing to @Local instead of @Preview. Is the reimport in example/abstract.typ possible as seen here? It was possible via the @Local directory.

Thank you for taking the time!

(I did forget to recompile the main.typ in examples, hence the two force pushes..)

Copy link
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! I've left a few comments regarding the readme, making this a template and the included main.pdf file.

Copy link
Member

Choose a reason for hiding this comment

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

You probably want to add a [template] section to your typst.toml manifest. So a user can conveniently initialize a project from this package.

@saecki
Copy link
Member

saecki commented Jan 9, 2026

Is the reimport in example/abstract.typ possible as seen here? It was possible via the @Local directory.

Yes this is the correct way to do it for templates.

@Arne-Berner
Copy link
Author

Arne-Berner commented Jan 11, 2026

Thanks to you I also managed to fix some issues when a glossary was not provided or when someone tried to use the "en" version. Thanks a lot!
Is it uncommon to push the examples with the template in this repo?

disciplines = ["computer-science", "engineering"]
exclude = ["/example/"]

[template]
Copy link
Member

Choose a reason for hiding this comment

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

The template naming is a bit convoluted, a template is more of an example/starting point of how to use the package. In your case it should point to either example-deutsch or example-english and the entrypoint should be main.typ.

Copy link
Author

Choose a reason for hiding this comment

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

It took me a while, but I think I understood you now:
Please correct me, but the template described in the toml is not the template as described in the docs, but it is the template described in the README, right?
So if people wanted to have a starting point with stuff in it, they could use that.
I might need to rework it a bit then. I used it as a showcase rather than as a starting point for others.
Would it make more sense to have the following filestructure:

package/
├─ lib/
│ ├─ lib.typ
│ ├─ pages/
├─ init/
│ ├─ init.typ
├─ examples/
│ ├─ example-deutsch/
│ ├─ example-english/
├─ LICENSE
├─ README

Where:

  • init is the template as described in the README
  • examples can be used to see a working example
  • lib is the template as described in the docs
    ?

Is it preffered to use empty files or fill them with example text in a template? I'd tend to leave them empty and just create some sort of structure.

Is there some naming conventions for templates (from the readme)? The first example I found used the name template for both: The readme version and the docs version. So a folder named template/main.typ and a template.typ file at the root of the project.
I could not find an open issue about the naming of template vs template yet. Do you know more about it? :)

Thank you for your reviews and time.

Copy link
Member

Choose a reason for hiding this comment

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

Please correct me, but the template described in the toml is not the template as described in the docs, but it is the template described in the README, right?
So if people wanted to have a starting point with stuff in it, they could use that.

Exactly

Would it make more sense to have the following filestructure:

package/
├─ lib/
│ ├─ lib.typ
│ ├─ pages/
├─ init/
│ ├─ init.typ
├─ examples/
│ ├─ example-deutsch/
│ ├─ example-english/
├─ LICENSE
├─ README

Where:
init is the template as described in the README
examples can be used to see a working example
lib is the template as described in the docs
?

Sure, sounds good

Is it preffered to use empty files or fill them with example text in a template? I'd tend to leave them empty and just create some sort of structure.

I don't think there really is a preferred way, do whatever feels right to you :)

Is there some naming conventions for templates (from the readme)? The first example I found used the name template for both: The readme version and the docs version. So a folder named template/main.typ and a template.typ file at the root of the project.

Usually the library code (docs template as you called it) has a lib.typ entrypoint and the code is placed in a src directory. The starting point (readme template) is placed in a template directory with a main.typ entry point.
An examples directory for any additional content is also quite common. If you include examples, make sure to create links from the readme, otherwise people will have a hard time finding them.

@Arne-Berner Arne-Berner marked this pull request as draft January 12, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new A new package submission.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants