Should the path of the image
function escape special characters?
#3992
-
I recently tried to add a figure in a typst file like this: #figure(image("assets\test\some_image.png")) which threw the error: The reason my path contains backward slashes ( The same thing happens with I'm just gonna assume that My question is what use case is there where that behaviour would be wanted in a path? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The problem is that the argument to |
Beta Was this translation helpful? Give feedback.
-
Note that you can do
instead of using escape sequences. |
Beta Was this translation helpful? Give feedback.
The problem is that the argument to
image
is just a regular string, and there are good reasons to allow escape sequences in string literals. There is a proposal for a separatepath
type (#971). If this came with its own syntax, it would likely not allow escape sequences.