Skip to content

Conversation

@cwickham
Copy link
Collaborator

@cwickham cwickham commented Jun 26, 2024

Adds Typst Partials: Preview
Closes quarto-dev/quarto-cli#8500

@github-actions
Copy link
Contributor

🚀 Deployed on https://deploy-preview-1202.quarto.org

@github-actions github-actions bot temporarily deployed to pull request June 26, 2024 22:31 Inactive
@cwickham cwickham marked this pull request as ready for review June 26, 2024 22:34
Copy link
Contributor

@gordonwoodhull gordonwoodhull left a comment

Choose a reason for hiding this comment

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

To my knowledge, looks correct and helpful!

@cderv
Copy link
Collaborator

cderv commented Jun 28, 2024

If that can help check correct understanding, we do document a bit those partial in our skeleton for someone when creating a typst format extension

From https://github.com/quarto-dev/quarto-cli/blob/e8c3cbf43a0217c7d4a2afc31b3ee42c5b37db09/src/resources/create/extensions/format-typst/_extensions/qstart-filesafename-qend/typst-template.typ#L2-L12

// This is an example typst template (based on the default template that ships
// with Quarto). It defines a typst function named 'article' which provides
// various customization options. This function is called from the
// 'typst-show.typ' file (which maps Pandoc metadata function arguments)
//
// If you are creating or packaging a custom typst template you will likely
// want to replace this file and 'typst-show.typ' entirely. You can find
// documentation on creating typst templates and some examples here:
// - https://typst.app/docs/tutorial/making-a-template/
// - https://github.com/typst/templates

From https://github.com/quarto-dev/quarto-cli/blob/e8c3cbf43a0217c7d4a2afc31b3ee42c5b37db09/src/resources/create/extensions/format-typst/_extensions/qstart-filesafename-qend/typst-show.typ#L1-L13

// Typst custom formats typically consist of a 'typst-template.typ' (which is
// the source code for a typst template) and a 'typst-show.typ' which calls the
// template's function (forwarding Pandoc metadata values as required)
//
// This is an example 'typst-show.typ' file (based on the default template
// that ships with Quarto). It calls the typst function named 'article' which
// is defined in the 'typst-template.typ' file.
//
// If you are creating or packaging a custom typst template you will likely
// want to replace this file and 'typst-template.typ' entirely. You can find
// documentation on creating typst templates here and some examples here:
// - https://typst.app/docs/tutorial/making-a-template/
// - https://github.com/typst/templates

@cwickham cwickham merged commit fa2fa6c into main Jul 2, 2024
@cwickham cwickham deleted the issues/8500 branch July 2, 2024 20:07
@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Successfully created backport PR for prerelease:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Typst partials with other partials

4 participants