Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified manual.pdf
Binary file not shown.
18 changes: 18 additions & 0 deletions manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,24 @@ This behavior can be disabled or modified:
```]
````]

To adjust the font, you can customize the #cmd-[raw.line] element function:

#example[````
#show raw.line: it => text(
font: "Comic Sans MS",
weight: 600,
size: 18pt,
it
)
#sourcecode[```cpp
import std;
int main() {
std::println("Hello, World!");
return 0;
}
```]
````]

To show code from a file, load it with #cmd[read] and pass the result to #cmd[sourcefile] alongside the filename:

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