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

Minimize custom functions in template #54

Open
yunanwg opened this issue Aug 11, 2024 · 0 comments
Open

Minimize custom functions in template #54

yunanwg opened this issue Aug 11, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yunanwg
Copy link
Owner

yunanwg commented Aug 11, 2024

Due to current Typst constraint, one still has to include some custom hacky functions in the template files. For example, in cy.typ when importing:

#import "@preview/brilliant-cv:2.1.0": cv
#let metadata = toml("./metadata.toml")
#let import-modules(modules, lang: metadata.language) = {
  for module in modules {
    include {
      "modules_" + lang + "/" + module + ".typ"
    }
  }
}

Instead of an ideal way:

#import "@preview/brilliant-cv:2.1.0": cv

This involves several files:

  • the cv.typ and letter.typ
  • every module file having to add something like #let cv-section = cv-section.with(metadata: metadata)

This involves two technical issues:

  • The path handling mechanism not being mature and stable
  • The code evaluation and execution issue

More to update in this thread, and we will see how to tackle them with Typst's upgrades.

@yunanwg yunanwg converted this from a draft issue Aug 11, 2024
@yunanwg yunanwg added the enhancement New feature or request label Aug 11, 2024
@yunanwg yunanwg self-assigned this Aug 11, 2024
@yunanwg yunanwg added this to the v2.1.0 milestone Aug 11, 2024
@yunanwg yunanwg linked a pull request Aug 11, 2024 that will close this issue
@yunanwg yunanwg removed a link to a pull request Aug 11, 2024
@yunanwg yunanwg moved this from Short Term to Long Term in brilliant-CV Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Long Term
Development

No branches or pull requests

1 participant