Skip to content

Commit 7a86cbf

Browse files
committed
docs: document how to adjust the font size
1 parent 07ffd20 commit 7a86cbf

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

manual.pdf

12.1 KB
Binary file not shown.

manual.typ

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,24 @@ This behavior can be disabled or modified:
198198
```]
199199
````]
200200

201+
To adjust the font, you can customize the #cmd-[raw.line] element function:
202+
203+
#example[````
204+
#show raw.line: it => text(
205+
font: "Comic Sans MS",
206+
weight: 600,
207+
size: 18pt,
208+
it
209+
)
210+
#sourcecode[```cpp
211+
import std;
212+
int main() {
213+
std::println("Hello, World!");
214+
return 0;
215+
}
216+
```]
217+
````]
218+
201219
To show code from a file, load it with #cmd[read] and pass the result to #cmd[sourcefile] alongside the filename:
202220

203221
#example(raw("#sourcefile(read(\"typst.toml\"), file:\"typst.toml\")"))[

0 commit comments

Comments
 (0)