From d14d1e867f83de631e7252ec5bdb2aa2dd870c8e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 17 May 2023 12:55:25 +0200 Subject: Fix figure detection --- tests/ref/meta/figure.png | Bin 71757 -> 59579 bytes tests/typ/meta/figure.typ | 27 +++++++++------------------ 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/ref/meta/figure.png b/tests/ref/meta/figure.png index 593c6438..524f6cfd 100644 Binary files a/tests/ref/meta/figure.png and b/tests/ref/meta/figure.png differ 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 ) #figure( - pad(y: -11pt, image("/cylinder.svg", height: 3cm)), + pad(y: -6pt, image("/cylinder.svg", height: 2cm)), caption: [The basic shapes.], numbering: "I", ) @@ -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), - ) -) - +// Testing figures with tables. #figure( table( columns: 2, [Second cylinder], - image("/cylinder.svg", height: 3cm), + image("/cylinder.svg"), ), caption: "A table containing images." ) @@ -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 ) #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]) -- cgit v1.2.3