Add page numbering (to remove it) to typst template #10370
Replies: 3 comments 6 replies
-
It is in the template.
So, it should work to do this: copy Point taken, though: there should be a variable controlling this. |
Beta Was this translation helpful? Give feedback.
-
It works! Steps to reproduce$ mkdir 0
mkdir: created directory '0'
$ cp a.md 0/
1 folder(s) ( 4.0 KiB) copied in 0.0s ( 0.0 KiB/s).
$ cd 0
$ wget --quiet https://github.com/jgm/pandoc/raw/refs/heads/main/data/templates/template.typst
$ wget --quiet https://github.com/jgm/pandoc/raw/refs/heads/main/data/templates/default.typst
$ sed -i -E 's/^( +pagenumbering: )"1",/\1none,/g' template.typst
$ pandoc a.md -t typst --template=default.typst -o o.pdf
$ xdg-open o.pdf It also works to have the 3 template files related to typst in a different folder and use it like this: From: /data/templates: template.typst
default.typst
definitions.typst $ pandoc a.md -t typst --template=/home/user/templates/default.typst -o out.pdf
|
Beta Was this translation helpful? Give feedback.
-
The OP could also have used header-includes metadata to inject the Typst code, no need to mess with the Typst templates at all: header-includes: |
```{=typst}
#set page(numbering: none)
``` |
Beta Was this translation helpful? Give feedback.
-
There are many cases when page numbering is not needed (ex: one page pdf), now is enabled by default. Right now, there is no way to disable page numbering by template, as you can see, is not there (gives no output):
in.md (sample file):
Checking typst output, is there (but not in the template):
roff has page numbering in template and I can create a custom one like this:
but with typst, I can't, because is not in the template (is in another place).
Workaround 1: modify typst output and compile
Workaround 2: disable footer by template
Workaround 3: use +raw_attribute
Extra: horizontalrule
The same happens with horizontalrule definition, right now is too small for me, I would like to change it in my custom template, and not modify typst output and compile:
Beta Was this translation helpful? Give feedback.
All reactions