Skip to content

RFC Ideas #4

@tingerrr

Description

@tingerrr

Here's a list of things that people have thought about standardizing in some form or fashion:

  • Standard Template Entrypoint API
    A standardized API for templates could make it easier for people to easily use multiple templates (as it happens with presentations and, posters and theses all requiring similar inputs).
    Initial research is done by @PgBiel with elembic as a possible stepping stone towards APIs with custom types in Typst proper.
    • Template-Independent Author Information Schema
      This was suggested by @jamesrswift and partially implemented in valkyrie, but it currently lacks widespread adoption. Standardization could be especially helpful for authors who create presentations alongside their documents, or who intend to write different versions of one document. This has some overlap with the standard API guidelines below.
  • Doc Comment Syntax
    A widely used syntax in the community is available with tidy's v0.3.0 comment syntax, this version is supported by tinymist, which helped its adoption. A second version of this was extensively discussed in Add api and style section about documentation package-api-guidelines#8. While it was implemented in tidy v0.4.0, it was not further pursued by the tinymist authors. @Myriad-Dreamin has offered to author a document on the standardization of the doc syntax to reiterate his points in this decision. 1
  • Default Project Structure
    The standardization of a project structure for both complex (multi-file) documents and packages/templates would help reduce the burden on maintainers and authors to configure various tools. Some initial research on what would constitute a good standard structure were done by @SillyFreak and @jamesrswift in https://github.com/typst-community/typst-package-template. The work done on this repo could eventually be turned into a standard supported by many 3rd-party Typst tools.
  • Conventional API Guidelines
    Some initial design work was done in https://github.com/typst-community/guidelines, but it has since stalled. A collection of standard API design practices help strengthen the principle of least surprise and makes switching or combining packages easier.
  • Conventional Style Guidelines
    Similar to the API guidelines, initial work was done but has since stalled. Typstyle may serve as a good piece of research on what should be a preferred standard style. A standardized style across the ecosystem makes it easier for contributors and maintainers to read and maintain code across many packages.
  • Test Syntax & Structure
    Standardization of test syntax and structure would help package/template authors in particular to reduce the split in tooling that currently exists between tytanic and tinymist and make it easier for new testing solutions to be backwards compatible with packages. This is something I'm particularly interested in, though, it will be some time until work on this can begin from tytanic's side, so I wouldn't see this as particularly urgent.
  • Package Manager Features
    The various package manager implementations that currently exist could benefit from all supporting the same common features.

The primary motivation for standardization is to reduce friction for both existing maintainers and new Typst community members.

This tracking issue can serve as a place of open discussion to get certain RFCs started, feel free to suggest other topics. Make sure to check out the community forge on the Typst discord to discuss your ideas in real time.

Footnotes

  1. The suggestion to author a document detailing the benefits and drawbacks of the different doc comment versions actually kicked off the creation of this repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaConcerns RFC process or validation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions