Download test.typ from m-rui001/typst_reference: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/datasets/m-rui001/typst_reference/resolve/main/test.typ
- Command line
-
hf download hf://datasets/m-rui001/typst_reference/test.typ
-
curl -L -o test.typ https://huggingface.co/datasets/m-rui001/typst_reference/resolve/main/test.typ
1.02 kB
| #set page( | |
| paper: "a4", | |
| header: [ | |
| #set align(right) | |
| #context{ | |
| let current_page=here().page() | |
| let all-h1 = query(heading.where(level: 1)) | |
| let is-chapter-start = all-h1.any(h => h.location().page() == current_page) | |
| let x=counter(page).get().first() | |
| if is-chapter-start [ | |
| #counter(page).display() | |
| #place(line(start:(0%,10%),end: (100%,10%),stroke: 2pt+black)) | |
| #place(line(start:(0%,18%),end: (100%,18%))) | |
| ] | |
| else[ | |
| #grid( | |
| columns: (0.1fr,2fr,0.1fr), | |
| align: (left,center,right), | |
| [],[aaaaaaaaa],[#counter(page).display()] | |
| ) | |
| #place(line(start:(0%,10%),end: (100%,10%))) | |
| ] | |
| } | |
| ], | |
| footer: [ | |
| #place(line(start:(0%,0%),end: (100%,0%)))\ | |
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
| ], | |
| ) | |
| #set par(justify: true) | |
| = aaaaa | |
| #lorem(500) | |
| == test02 | |
| #lorem(800) | |
| = bbbbb | |
| #lorem(500) | |
| == test03 | |
| #lorem(300) | |
| = ccccc | |
| #lorem(400) | |
| == test04 | |
| #lorem(300) | |