summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-17 12:55:25 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-17 12:55:25 +0200
commitd14d1e867f83de631e7252ec5bdb2aa2dd870c8e (patch)
tree0bd1b391c704ba2776810cfe6e6a5c4361263514 /tests
parent88cb8c26264713d6914c74226c962d4377b64668 (diff)
Fix figure detection
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/meta/figure.pngbin71757 -> 59579 bytes
-rw-r--r--tests/typ/meta/figure.typ27
2 files changed, 9 insertions, 18 deletions
diff --git a/tests/ref/meta/figure.png b/tests/ref/meta/figure.png
index 593c6438..524f6cfd 100644
--- a/tests/ref/meta/figure.png
+++ b/tests/ref/meta/figure.png
Binary files 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
) <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])