Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When converting from Typst, relative paths are handled incorrectly by read() (withBinaryFile) #10412

Open
NotCompsky opened this issue Nov 24, 2024 · 0 comments
Labels

Comments

@NotCompsky
Copy link

Severity: Very low (easy workaround is to move files or use absolute paths in source Typst code)
Version: 3.5 (on Linux/Ubuntu AMD64)

Minimal example

Create a directory structure like so:

  • main.typ
  • addons/
    • example.typ
  • something.txt

Contents of main.typ:

#import "addons/example.typ": utf8string
#utf8string

Contents of addons/example.typ:

#let utf8string = read("../something.txt")

Contents of something.txt:

Anything!

Commands

It is a valid Typst project:

$ typst compile main.typ main.pdf

But pandoc does not account for the relative directory:

$ ../pandoc --from typst -o main2.pdf main.typ
pandoc: ../something.txt: withBinaryFile: does not exist (No such file or directory)

Comment

Not really a problem for anyone, don't worry too much about it. I only ran into this because I'm using Typst in an unusual way.

Off topic, but I was amazed that pandoc had already got Typst support. It's going to be amazingly useful for me! Thanks guys.

@NotCompsky NotCompsky added the bug label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant