typst icon indicating copy to clipboard operation
typst copied to clipboard

Specifying pdf opener does not work on macOS

Open patricorgi opened this issue 2 years ago • 0 comments

Description

My default pdf viewer is set to Preview.app which is a native app on macOS, and I have no intention to change this...On the other hand, I want to use zathura when watching a typst project.

I have tried the following

typst watch main.typ --open zathura # -> no pdf viewer opened
typst watch main.typ --open $(which zathura) # -> no pdf viewer opened
typst watch main.typ --open # -> default OS pdf viewer opened (Preview.app in this case)

They all print out the following message in terminal, and no error is shown.

watching main.typ
writing to main.pdf

[21:09:21] compiled successfully in 3.30s

However, I can open this main.pdf file fine in zathura with

zathura main.pdf

Reproduction URL

  1. Install zathura on macOS using homebrew
brew tap zegervdv/zathura
brew install zathura
  1. Create a main.typ file with the following content
#lorem(69)
  1. Try typst watch with default opener (Preview.app in this case)
typst watch main.typ --open

This will compile and open the compiled main.pdf file in the default pdf viewer.

  1. Try typst watch by specifying zathura
typst watch main.typ --open $(which zathura)

Nothing will happen after a successful compilation.

  1. Try opening main.pdf directly with zathura
zathura main.pdf

This will open main.pdf in zathura without any problem.

Operating system

macOS 14.2.1 (23C71)

Typst version

0.10.0

patricorgi avatar Jan 24 '24 22:01 patricorgi