diff options
| author | John MacFarlane <[email protected]> | 2023-10-20 12:18:46 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-20 12:18:46 -0700 |
| commit | a67223c44219c5a6b2154a06dffedecdd26e925e (patch) | |
| tree | 8704193154020eefffa76994bd9cec2538e9c840 /test/writer.typst | |
| parent | 5e668118751b50aaf7f6ab675dd5dc628ced30bc (diff) | |
Typst writer: add `#box` around image to make it inline. (#9149)
An `#image` by itself in typst is a block-level element.
To force images to be inline (as they are in pandoc), we need
to add a box with an explicit width. When a width is not given
in image attributes, we compute one from the image itself, when
possible.
Closes #9104, supersedes #9105.
Diffstat (limited to 'test/writer.typst')
| -rw-r--r-- | test/writer.typst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/writer.typst b/test/writer.typst index aa5400e57..edcc87cc8 100644 --- a/test/writer.typst +++ b/test/writer.typst @@ -779,13 +779,13 @@ or here: <http://example.com/> <images> From "Voyage dans la Lune" by Georges Melies \(1902): -#figure([#image("lalune.jpg")], +#figure([#box(width: 150.0pt, image("lalune.jpg"))], caption: [ lalune ] ) -Here is a movie #image("movie.jpg") icon. +Here is a movie #box(width: 20.0pt, image("movie.jpg")) icon. #horizontalrule |
