diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-05-17 12:55:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-05-17 12:55:25 +0200 |
| commit | d14d1e867f83de631e7252ec5bdb2aa2dd870c8e (patch) | |
| tree | 0bd1b391c704ba2776810cfe6e6a5c4361263514 /tests | |
| parent | 88cb8c26264713d6914c74226c962d4377b64668 (diff) | |
Fix figure detection
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/meta/figure.png | bin | 71757 -> 59579 bytes | |||
| -rw-r--r-- | tests/typ/meta/figure.typ | 27 |
2 files changed, 9 insertions, 18 deletions
diff --git a/tests/ref/meta/figure.png b/tests/ref/meta/figure.png Binary files differindex 593c6438..524f6cfd 100644 --- a/tests/ref/meta/figure.png +++ b/tests/ref/meta/figure.png diff --git a/tests/typ/meta/figure.typ b/tests/typ/meta/figure.typ index 81db3edf..fcf92740 100644 --- a/tests/typ/meta/figure.typ +++ b/tests/typ/meta/figure.typ @@ -13,7 +13,7 @@ We can clearly see that @fig-cylinder and ) <tab-basic> #figure( - pad(y: -11pt, image("/cylinder.svg", height: 3cm)), + pad(y: -6pt, image("/cylinder.svg", height: 2cm)), caption: [The basic shapes.], numbering: "I", ) <fig-cylinder> @@ -25,20 +25,12 @@ We can clearly see that @fig-cylinder and --- -// Testing figures with and without caption -#figure( - table( - columns: 2, - [First cylinder], - image("/cylinder.svg", height: 3cm), - ) -) <fig-image-in-table-no-caption> - +// Testing figures with tables. #figure( table( columns: 2, [Second cylinder], - image("/cylinder.svg", height: 3cm), + image("/cylinder.svg"), ), caption: "A table containing images." ) <fig-image-in-table> @@ -76,6 +68,7 @@ We can clearly see that @fig-cylinder and ) } +#set page(width: 150pt) #figure( $a^2 + b^2 = c^2$, supplement: "Theorem", @@ -93,19 +86,17 @@ We can clearly see that @fig-cylinder and ) <fig-formula> #figure( - caption: [Hello world in #emph[rust].], -)[ - #show raw: set align(left) ```rust fn main() { - println!("Hello, world!"); + println!("Hello!"); } - ``` -] + ```, + caption: [Hello world in _rust_], +) --- // Test breakable figures -#set page(width: 200pt, height: 6em) +#set page(height: 6em) #show figure: set block(breakable: true) #figure(table[a][b][c][d][e], caption: [A table]) |
