Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modern-ysu-thesis:0.1.0 #634

Merged
merged 7 commits into from May 24, 2024
Merged

modern-ysu-thesis:0.1.0 #634

merged 7 commits into from May 24, 2024

Conversation

Woodman3
Copy link
Contributor

I am submitting

  • a new package
  • an update for a package

Description: Explain what the package does and why it's useful.

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.

Copy link
Contributor

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

Thank you for submitting this package. There are two issues that have to be solved before it can get merged. The first one is that Typst package can't currently ship fonts, and including them in a folder as you didn't won't work. Could you please delete this folder, and add a link in the README where users can download the required fonts if they don't have them?
The second issue is with the example figure in the template, as explained below.

]))

#figure(
image("..\assets\vi\ysulogo.png", width: 20%),
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work, as this file will not be copied when creating a project from this template. If you consider that this logo is important enough to be used by most people who use your package, you can export it from the package itself by adding this in lib.typ (or some other file, and re-exporting it here):

#let logo = image.with("assets/vi/ysulogo.png")

And then, in your template, you can do:

#logo(width: 20%)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,i am sorry that i am busy in do my thesis and no see this reply ,i will fix these as quick as i can

@elegaanz elegaanz added the new A new package submission. label May 13, 2024
@elegaanz elegaanz changed the title modern-ysu-thesis 0.1.0(new) modern-ysu-thesis:0.1.0 May 13, 2024
@reknih reknih force-pushed the main branch 6 times, most recently from 92aab43 to d06d87c Compare May 15, 2024 10:12
image("..\assets\vi\ysulogo.png", width: 20%),
caption: [图片测试],
) <ysu-logo>
#let logo = image.with("assets/vi/ysulogo.png")
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be defined in the package (e.g. lib.typ) and imported from there.

This is because here, it will be resolved relative to the user's working directory / the project root whereas in the package, resolution is relative to the package root. Since the file is in the package, only the latter will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,i have remove the picture

Copy link
Member

@reknih reknih left a comment

Choose a reason for hiding this comment

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

Removing the logo works. I have attached a review that shows how to do it - let me know if you want to apply the change!

#import "utils/style.typ": 字号

#import "layouts/page-header.typ": page-header

Copy link
Member

Choose a reason for hiding this comment

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

Removing the logo works too, but you could also add it here and have the package work as you intended:

Suggested change
#let logo = image.with("assets/vi/ysulogo.png")

@@ -0,0 +1,220 @@
#import "@preview/modern-ysu-thesis:0.1.0": documentclass, indent
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#import "@preview/modern-ysu-thesis:0.1.0": documentclass, indent
#import "@preview/modern-ysu-thesis:0.1.0": documentclass, indent, logo

) <timing-tlt>
]))


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#logo(width: 20%)

@Woodman3
Copy link
Contributor Author

Removing the logo works. I have attached a review that shows how to do it - let me know if you want to apply the change!

well,the logo just a example to tell user how to add picture and is not necessary,i don't want user confuse by lib.typ,so just remove it ,maybe user can learn how to add picture to there thesis by google.

@elegaanz
Copy link
Contributor

Okay, let's merge this then. Thank you!

@elegaanz elegaanz merged commit e907a56 into typst:main May 24, 2024
1 check passed
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.

None yet

3 participants