Absolute newbie here. Is there a way to configure a document so that all code blocks (triple backquotes) are indented by a certain amount? Like they do in O’Reilly books, for example.
Hello @fxn,
you can use a show rule to get all raw
elements, and use pad
to indent them. With the option block: true
only the triple backquotes get affected.
#show raw.where(block: true): it => pad(left: 2em, it)
#lorem(30)
```
if (right < left) {
tmp = right;
right = left;
left = tmp;
}
```
Test `test`. #lorem(30)