Open tecosaur opened 1 year ago
Unfortunately, this is not so easy to do. There are several DVI extensions/specials that require information from following pages, like link targets, annotation data from PDF specials etc. In order to retrieve that information, it's necessary to pre-scan the entire DVI file before the actual conversion. The collected data also speed up the conversion of selected pages and page sequences because it's not necessary to process all DVI commands of skipped pages.
With the current implementation, it's not easily possible to add a --follow
option, as this would require a different processing model, which I can't afford to implement at the moment due to lack of time.
Hmm, I don't suppose it would be possible to support this under the assumption that each page can be processed independently?
I don't think so. For example, if the page contains a hyperref link pointing to a location on a page further back in the document, the SVG can't be generated before the information on the link target (i.e. page number an position on that page) is available. There are a couple of further specials like this that prevent a conversion on-the-fly. Also, not all basic data required to convert a certain page is stored between the corresponding BOP/EOP pair in the DVI file. E.g. font definitions occurring on a page are still valid on all following pages and must not be repeated. That means, to convert a single page, all preceding pages must be processed as well. Alternatively, the collected font definitions present in the postamble can be used. As far as I can tell, a "follow functionality" would only be possible for a subset of currently supported DVI files that don't make use of more demanding specials.
Hello again,
When using dvisvgm to generate a whole batch of previews to apply to a file when opened it's nice to have the images start showing up as fast as possible. Currently, dvipng is significantly better in this regard thanks to it's support for a
--follow
flag that allows it to watch an incomplete DVI file and spit out results as pages are appended to it.If dvisvgm could support this behaviour too, that would be quite nice.