Skip to content

How do I include images and use relative paths in a Typst Quarto extension? #12638

Answered by cderv
mattwarkentin asked this question in Q&A
Discussion options

You must be logged in to vote

So, basically to make this approach "work" we need to force the path to be treated as raw inline to avoid the escaping of characters, but by doing so we don't allow the path to be resolved when installing the extension. Am I understanding that correctly?

What happens is:

  • In pandoc, YAML metadata are considered Mardown to be parsed. And Pandoc Typst writer will escape the _ to \_

     ❯ pandoc -f markdown -t typst 
     _extensions
     ^Z
     \_extensions
    
  • By using raw inline, this would avoid in this markdown to typst conversion. But using raw inline in YAML field has some consequence.

Now that I remember how pandoc's work in detail, to avoid the Markdown reader applying to metadata, when a var…

Replies: 3 comments 25 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mcanouil
Comment options

@mattwarkentin
Comment options

Comment options

You must be logged in to vote
23 replies
@mattwarkentin
Comment options

@cderv
Comment options

@cscheid
Comment options

@cderv
Comment options

Answer selected by mattwarkentin
@mattwarkentin
Comment options

@mcanouil
Comment options

@cderv
Comment options

cderv May 2, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
extensions relates to Quarto extensions mechanism typst
4 participants