-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ce953f
commit a5ec5d7
Showing
1 changed file
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
//! This is a stub package for typst.ts's dyn-svg controlling the layout | ||
//! Here is a good example of dynamic layout template: <https://github.com/Myriad-Dreamin/typst-book/blob/308e0aacc2578e9a0c424d20332c6711d1df8d1c/contrib/typst/gh-pages.typ> | ||
|
||
// It is in default A4 paper size | ||
#let page-width = 595.28pt | ||
|
||
// default target is "pdf" | ||
/// default target is "pdf", typst.ts will set it to "web" when rendering to a | ||
/// dynamic layout | ||
/// Example: | ||
/// ```typc | ||
/// #let is-web-target() = target.starts-with("web") | ||
/// #let is-pdf-target() = target.starts-with("pdf") | ||
/// ``` | ||
#let target = "pdf" | ||
|
||
/// It is in default A4 paper size | ||
/// example: | ||
/// ```typc | ||
/// set page( | ||
/// width: page-width, | ||
/// height: auto, // Also, for a website, we don't need pagination. | ||
/// ) if is-web-target; | ||
/// ``` | ||
#let page-width = 595.28pt |