Skip to content

Commit c7c68b1

Browse files
committed
Updated examples
1 parent b1b4698 commit c7c68b1

File tree

10 files changed

+32
-6
lines changed

10 files changed

+32
-6
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ size or margins.
1010
## Example
1111
```typst
1212
#import "@preview/hydra:0.0.1": hydra
13-
#set page(header: #[hydra() #line(length: 100%)])
13+
14+
#set page(header: hydra() + line(length: 100%))
1415
#set heading(numbering: "1.1")
1516
#show heading.where(level: 1): it => pagebreak(weak: true) + it
1617
@@ -28,8 +29,11 @@ size or margins.
2829
= Annex
2930
#lorem(10)
3031
```
31-
![example1][example1]
32-
![example2][example2]
32+
![ex1]
33+
![ex2]
34+
![ex3]
35+
![ex4]
36+
![ex5]
3337

3438
## Non-default behavior
3539
Changing the default behavior can be done using its keyword arguments:
@@ -100,6 +104,9 @@ than headings only, consider setting `display` too.
100104
`next-filter: default.next-filter.with(top-margin: ...)`. This margin must be known for the default
101105
implementation. If it does but you are using `a4`, then you found a bug.
102106

103-
[example1]: example1.png
104-
[example2]: example2.png
107+
[ex1]: examples/example1.png
108+
[ex2]: examples/example2.png
109+
[ex3]: examples/example3.png
110+
[ex4]: examples/example4.png
111+
[ex5]: examples/example5.png
105112
[typst]: https://github.com/typst/typst

example1.png

-22.5 KB
Binary file not shown.

example2.png

-33.3 KB
Binary file not shown.

examples/example1.png

9.47 KB
Loading

examples/example2.png

15.3 KB
Loading

examples/example3.png

3.11 KB
Loading

examples/example4.png

15.6 KB
Loading

examples/example5.png

6.65 KB
Loading

examples/main.typ

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#import "@local/hydra:0.0.1": hydra
2+
3+
#set page(header: hydra() + line(length: 100%))
4+
#set heading(numbering: "1.1")
5+
#show heading.where(level: 1): it => pagebreak(weak: true) + it
6+
7+
= Introduction
8+
#lorem(750)
9+
10+
= Content
11+
== First Section
12+
#lorem(500)
13+
== Second Section
14+
#lorem(250)
15+
== Third Section
16+
#lorem(500)
17+
18+
= Annex
19+
#lorem(10)

typst.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ repository = "https://github.com/tingerrr/hydra"
88
description = "Query and display headings of the currently active section"
99
keywords = ["heading", "introspection"]
1010
license = "MIT"
11-
exclude = ["example1.png", "example2.png", "LICENSE", "README.md"]
11+
exclude = ["example", "LICENSE", "README.md"]

0 commit comments

Comments
 (0)