diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-18 01:07:50 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-18 01:07:50 +0100 |
| commit | 05ec0f993b4a1b8481e494ee16285d23f000872f (patch) | |
| tree | bad1ea092025213173e66a3a88cf2c8d3f4ca3a3 /tests | |
| parent | acae6e2a54f11b27bae343a15d9eff952323fe28 (diff) | |
Headers and footers
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/layout/page-marginals.png | bin | 0 -> 68057 bytes | |||
| -rw-r--r-- | tests/ref/utility/strings.png | bin | 10699 -> 10634 bytes | |||
| -rw-r--r-- | tests/typ/layout/page-marginals.typ | 22 | ||||
| -rw-r--r-- | tests/typeset.rs | 2 |
4 files changed, 23 insertions, 1 deletions
diff --git a/tests/ref/layout/page-marginals.png b/tests/ref/layout/page-marginals.png Binary files differnew file mode 100644 index 00000000..734973b6 --- /dev/null +++ b/tests/ref/layout/page-marginals.png diff --git a/tests/ref/utility/strings.png b/tests/ref/utility/strings.png Binary files differindex c623aa00..d4d575d9 100644 --- a/tests/ref/utility/strings.png +++ b/tests/ref/utility/strings.png diff --git a/tests/typ/layout/page-marginals.typ b/tests/typ/layout/page-marginals.typ new file mode 100644 index 00000000..2d969647 --- /dev/null +++ b/tests/typ/layout/page-marginals.typ @@ -0,0 +1,22 @@ +#set page( + paper: "a8", + margins: 30pt, + horizontal: 15pt, + header: align(horizon, { + text(eastern)[*Typst*] + h(1fr) + text(80%)[_Chapter 1_] + }), + footer: page => v(5pt) + align(center)[\~ #page \~], +) + +But, soft! what light through yonder window breaks? It is the east, and Juliet +is the sun. Arise, fair sun, and kill the envious moon, Who is already sick and +pale with grief, That thou her maid art far more fair than she: Be not her maid, +since she is envious; Her vestal livery is but sick and green And none but fools +do wear it; cast it off. It is my lady, O, it is my love! O, that she knew she +were! She speaks yet she says nothing: what of that? Her eye discourses; I will +answer it. + +#set page(header: none, height: auto, top: 15pt, bottom: 25pt) +The END. diff --git a/tests/typeset.rs b/tests/typeset.rs index 626fc113..dadcfed3 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -498,7 +498,7 @@ fn test_incremental( ctx.layout_cache.turnaround(); - let cached = silenced(|| template.layout(&mut Vm::new(ctx)).unwrap()); + let cached = silenced(|| template.layout_pages(&mut Vm::new(ctx)).unwrap()); let total = reference.levels() - 1; let misses = ctx .layout_cache |
