Skip to content

Commit 6990d52

Browse files
authored
Book: Add FAQ section (#203)
* Book: Add FAQ section * Add note about list marker workaround * Reflow text to not exceed 80 columns
1 parent fabc305 commit 6990d52

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

book/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [Next heading](./toolbox/next-heading.md)
2121
- [Big](./toolbox/big.md)
2222
- [Full width](./toolbox/full-width.md)
23+
- [FAQ](./faq/faq.md)
2324
- [External tools](./external/external.md)
2425
- [pdfpc](./external/pdfpc.md)
2526
- [Changelog](./changelog.md)

book/src/dynamic/obo-lbl.md

+5
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ A more complex example involving enums and term lists:
5656

5757
Note that the list markers and enum numbers are not hidden.
5858
You can truly consider this a bug or a feature...
59+
60+
This is due to a [bug](https://github.com/typst/typst/issues/619) in typst.
61+
See the
62+
[FAQ](../faq/faq.md#is-it-possible-to-also-hide-the-markers-of-hidden-list-items)
63+
for a workaround.

book/src/faq/faq.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Frequently Asked Questions
2+
3+
## Is it possible to also hide the markers of hidden list items?
4+
5+
Yes. You can use the following show rules:
6+
7+
```typ
8+
#let no-par-spacing(it) = (
9+
context {
10+
set par(spacing: par.leading)
11+
it
12+
}
13+
)
14+
15+
#show list: no-par-spacing
16+
#show enum: no-par-spacing
17+
18+
#show hide: it => {
19+
show list.item: list
20+
show enum.item: enum
21+
22+
it
23+
}
24+
```
25+
This works by splitting up the list into multiple lists,
26+
each with one list item.
27+
This change hides the list marker properly,
28+
but also increases the spacing between individual list items
29+
(as the items are now individual lists).
30+
The first two show rules in the snippet above fix this by reducing
31+
the spacing between lists to be the same as the
32+
spacing between list items within one list.

0 commit comments

Comments
 (0)