Closed chardskarth closed 5 months ago
Does using
![]("imagehererelativetocurrentfile.png")
Not work? Or are you trying to use an image within typst somehow? I see the issue, I'm just curious of how you're using this..
This is what my slide currently looks like:
# Introduction on MBTI: 16 Personalities
<!-- new_lines: 2 -->
2 x 2 x 2 x 2 = 16
<!-- new_lines: 1 -->
I/E N/S T/F J/P
<!-- pause -->
<!-- column_layout: [1, 1] -->
<!-- column: 0 -->
```typst +render
#set text(font: "JetBrainsMono NF")
#scale(100%, reflow: false)[
#table(
columns: 3,
stroke: none,
align: horizon,
inset: (
x: 20pt,
y: 10pt
),
image("Intj.png", width:70pt), [INTJ], [Architect],
image("Intp.png", width:50pt), [INTP], [Logician],
image("infj.png", width:50pt), [INFJ], [Advocate],
image("infp.png", width:50pt), [INFP], [Mediator],
image("istp.png", width:50pt), [ISTP], [Virtuoso],
image("istj.png", width:50pt), [ISTJ], [Logistician],
image("isfp.png", width:50pt), [ISFP], [Adventurer],
image("isfj.png", width:50pt), [ISFJ], [Defender],
)
]
```typst +render
#set text(font: "JetBrainsMono NF")
#scale(100%, reflow: false)[
#table(
columns: 3,
stroke: none,
align: horizon,
inset: (
x: 20pt,
y: 10pt
),
image("entj.png", width:60pt), [ENTJ], [Commander],
image("entp.png", width:60pt), [ENTP], [Debater],
image("enfj.png", width:60pt), [ENFJ], [Protagonist],
image("enfp.png", width:60pt), [ENFP], [Campaigner],
image("estp.png", width:60pt), [ESTP], [Entrepreneur],
image("estj.png", width:60pt), [ESTJ], [Executive],
image("esfp.png", width:60pt), [ESFP], [Entertainer],
image("esfj.png", width:60pt), [ESFJ], [Consul],
)]
```
Back to 0
and this is what it looks like:
I just created #235 which addresses this. Can you try out the branch and see if it works for you? Do read the description in the PR. TL;DR; in your example you need to change your paths to be absolute like
...
image("/entj.png", width:60pt), [ENTJ], [Commander],
image("/entp.png", width:60pt), [ENTP], [Debater],
...
``
Your PR works for me!
Closing in favor of #235.
I'm new to rust and I really like this project.
I'm trying to render images using typst so tempdir wont work in my usecase.
Upside of my PR:
Downside:
typst
files in the current working directory.