-
Hi everybody, I am writing my own DVI/XDV tooling and previewer. Currently, I am building it on top of TeXlive, but I would like to move to tectonic which I find more convenient. However, with TeXlive I can use either kpsewhich command or kpathsea library to lookup files, but I can't find a Tectonic equivalent.
What I would like is some command that takes a file name and returns its path in the store or directly the contents of the file. Some thoughts on this problem:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Fred, Thanks for asking! First of all, I'll mention that Tectonic includes an xdv crate that does some basic parsing of the DVI/XDV format. It doesn't handle everything, and doesn't properly handle some things like RTL text segments, but depending on your needs, it might come in handy. As for your main question, I can think of at least a few different ways to approach the problem that you want to solve. But if it's what you want, it wouldn't be that complicated to put together some kind of program that takes "TeX paths" as inputs and responds with the file contents, using Tectonic's on-the-fly fetching and caching framework. The first step is to set up the "bundle" to use, and you can get the "sensible default" with As for concurrent accesses, there isn't any super clever locking, but the caching layer should allow them. The cache is basically append-only, which reduces the number of possible pitfalls. Basically the worst failure mode might be that the index of downloaded files gets multiple entries for the same file, although I can't say that I've really hammered on the implementation to look for edge cases. |
Beta Was this translation helpful? Give feedback.
Hi Fred,
Thanks for asking!
First of all, I'll mention that Tectonic includes an xdv crate that does some basic parsing of the DVI/XDV format. It doesn't handle everything, and doesn't properly handle some things like RTL text segments, but depending on your needs, it might come in handy.
As for your main question, I can think of at least a few different ways to approach the problem that you want to solve. But if it's what you want, it wouldn't be that complicated to put together some kind of program that takes "TeX paths" as inputs and responds with the file contents, using Tectonic's on-the-fly fetching and caching framework. The first step is to set up the "bundle" to use, and you can …