Skip to content

Conversation

mewmew
Copy link
Contributor

@mewmew mewmew commented Sep 15, 2025

I am submitting

  • a new package
  • an update for a package

Description: a template for University lab reports, essays and exams.

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
  • 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.

Just replace the logo with the one of your University to use the template.

@typst-package-check typst-package-check bot added the new A new package submission. label Sep 15, 2025
@mewmew

This comment was marked as resolved.

@elegaanz elegaanz self-assigned this Sep 17, 2025
@elegaanz
Copy link
Member

Can you please change the name to something less generic? Also, you should add at least one category in the manifest, as reported here.

mewmew added a commit to mewmew/efter-plugget that referenced this pull request Sep 17, 2025
mewmew added a commit to mewmew/efter-plugget that referenced this pull request Sep 17, 2025
@typst-package-check typst-package-check bot changed the title uni-report:0.1.0 efter-plugget:0.1.0 Sep 17, 2025
@mewmew
Copy link
Contributor Author

mewmew commented Sep 17, 2025

Can you please change the name to something less generic? Also, you should add at least one category in the manifest, as reported here.

Hi Ana!

Thanks for the review.

I've now renamed the package to "efter plugget" which is a tribute to a Swedish song about finishing Uni.

I've also added the "report" category to the Typst manifest, as this package is intended for lab reports, Uni assignments, etc.

Cheers,
/robin

@mewmew mewmew marked this pull request as draft September 18, 2025 08:51
@mewmew
Copy link
Contributor Author

mewmew commented Sep 18, 2025

Converted to draft for now, as I need to update some show rules for figures before publishing the package.

@mewmew mewmew marked this pull request as ready for review September 18, 2025 23:19
@mewmew
Copy link
Contributor Author

mewmew commented Sep 18, 2025

Converted to draft for now, as I need to update some show rules for figures before publishing the package.

Now the package is ready for review again : )

It depends on the latest version of the hallon package (see #3103).

Copy link
Member

@elegaanz elegaanz left a comment

Choose a reason for hiding this comment

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

The invisible warning reported by CI is because of exclude (the warning is reported on the whole directory, and GitHub doesn't know how to display that).

description = "Lab report, essay and exam template for Typst."
repository = "https://github.com/mewmew/efter-plugget"
categories = ["report"]
exclude = ["inc"]
Copy link
Member

Choose a reason for hiding this comment

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

This also matches template/inc, can you please replace it with /inc to only match the top-level directory?

Copy link
Contributor Author

@mewmew mewmew Sep 22, 2025

Choose a reason for hiding this comment

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

This also matches template/inc, can you please replace it with /inc to only match the top-level directory?

Ah, wow. Good catch! Didn't know that's how it worked. I'll send an update.

Edit: Done in 014b082

mewmew added a commit to mewmew/efter-plugget that referenced this pull request Sep 22, 2025
@elegaanz
Copy link
Member

Thank you.

@elegaanz elegaanz merged commit 4bc714d into typst:main Sep 22, 2025
3 checks passed
@mewmew
Copy link
Contributor Author

mewmew commented Sep 23, 2025

@elegaanz, thank you for the review :)

I tried to use efter-plugget:0.1.0 from Typst.app.

However, it seems like the webapp is using an old/wrong version of the package?

See the following exmple which was generated from the efter-plugget:0.1.0 template (no changes made). It fails to compile, and gives the following error:

"File not found (searched at inc/default_logo.png)."

efter_plugget_file_not_found

When I try to do the same locally it works without error.

typst init @preview/efter-plugget:0.1.0
cd efter-plugget
# Compiles successfully.
typst compile report.typ

So it seems like what was deployed for the Typst.app is not the same as what is stored in the packages repository? It seems like it uses an old version.

Note, the image imported is /inc/default_logo.png in the 0.1.0 version in the typst/packages repository.

logo: image("/inc/default_logo.png"),

My guess is that what was deployed to Typst.app uses a slightly older version which imports inc/default_logo.png? Or that the exclude rule didn't take effect (#3085 (comment))?

@elegaanz
Copy link
Member

I think paths are normalized to be relative to the project root before being displayed, at least in the web app, so the missing leading slash is not relevant here. The web app should use the exact same archive as the CLI, I wonder if maybe there was some kind of race condition that made the editor load before the image file was actually created, did you try to close and re-open the project, to force it to reload all the files?

@mewmew
Copy link
Contributor Author

mewmew commented Sep 23, 2025

I think paths are normalized to be relative to the project root before being displayed, at least in the web app, so the missing leading slash is not relevant here. The web app should use the exact same archive as the CLI, I wonder if maybe there was some kind of race condition that made the editor load before the image file was actually created, did you try to close and re-open the project, to force it to reload all the files?

I tried again and get the same results. Typst.app example project

screenshot_2025-09-23_15:37:56

It should be easy to reproduce this:

  1. Go to https://typst.app/universe/package/efter-plugget and click "Create project in app".
  2. Notice error "File not found (searched at inc/default_logo.png).

Do the same but from the command line.

typst init @preview/efter-plugget:0.1.0
cd efter-plugget
# Successful compile.
typst compile report.typ

Notice that in the web app we get a "file not found" error, and from the command line it works. But using the same version of efter-plugget. At least as far as I can tell.

Please try to see if you can reproduce. And then we know if it is only on my machine.

Cheers,
Robin

@elegaanz
Copy link
Member

I can reproduce the issue, both in the web app and using the CLI. The issue is that the /inc directory should not have been excluded at all in the first place, since you need the default_logo.png file for your package to compile. The thumbnail is automatically excluded anyways. Sorry I didn't catch that during review.

Can you please publish a new version, without the exclude key in the manifest, to fix the issue?

mewmew added a commit to mewmew/efter-plugget that referenced this pull request Sep 24, 2025
@mewmew mewmew mentioned this pull request Sep 24, 2025
2 tasks
@mewmew
Copy link
Contributor Author

mewmew commented Sep 24, 2025

I can reproduce the issue, both in the web app and using the CLI. The issue is that the /inc directory should not have been excluded at all in the first place, since you need the default_logo.png file for your package to compile. The thumbnail is automatically excluded anyways. Sorry I didn't catch that during review.

Can you please publish a new version, without the exclude key in the manifest, to fix the issue?

No worries! And thanks for reproducing it.

I updated the exclude key to only exclude the thumbnail:

https://github.com/typst/packages/pull/3130/files#diff-d4b1b588e17cbb4799c081fa32a8d7fdea43e025ab5b9e876b84b91dc7f2986eR10

exclude = ["/inc/thumbnail.png"]

Hope this should work :)

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