Is this a bug? "typst w file.typ" on windows with wrong case in include

Hi there,

I just wasted some time searching for an error in typo (Windows) that wasn’t really an error but an unexpected result.

In short: I included a file in my main file using #include and misspelled the case of a letter. The command was:

#include "./Mytext.typ"

But the file is called “mytext.typ”.

When the main file is compiled, everything works fine because the Windows file system does not distinguish between the file “Mytext.typ” and the file “mytext.typ”.

I was a little surprised, though, that

typst w Main.typ

did not respond when I changed the file “mytext.typ”. And yes, I searched for some time before I realized the error in the case of the included file name.

I assume that Typst maintains a list of files to be monitored internally and sets a trigger that start a compilation process when any monitored file changes. In doing so, the case of the file name is obviously evaluated correctly. In my case, the monitored file “Mytext.typ” will never change because it does not exist in the file system at all. Accordingly, however, changes to the file “mytext.typ” are not sent to the Typst compiler because this file is not monitored.

I’m not sure if this is a “bug” because Linux and MacOS correctly distinguish between cases in file names, only Windows is sloppy here.
On the other hand, this entry should at least help the next person who wonders why Typst does not react to a file change to find the solution faster than I did.

Best regards

Hey, can you open an issue at our repository? Maybe someone will investigate it further there: GitHub - typst/typst: A new markup-based typesetting system that is powerful and easy to learn.

Thank you!

Done

1 Like