João Luis Meloni Assirati wrote:

> I need to review better your code, but I think this is the way to go.
> Forward search is currently not working.

I have to admit that I did not test that. I may have deleted too much.

>> I created the attached patch, based on your last one (dvi-search-3.diff).
>> It works for me (did only test xdvi).
>> In order to give the DVI file with source specials a different name I
>> defined the suffix of the new dvi2 format as dvix.
> 
> Is there a problem to have the format and suffix with the same name (both
> dvi2 or dvix)?

The format must end with a number so that it is recognized as a "child"
format (I don't like that magic, but it is implemented like that). I don't
see a problem to have "dvi2" also as extension.

> Changing extensions can break or alter the behavior of 
> programs so maybe this is an issue, but I doubt.

The TeX way is to first try to open the given file, and if that fails,
append the canonical extension to the name and try again, so this should be
indeed unproblematic, since LyX calls the viewer always with the full name.

>> One drawback of this solution compared to the original one is that an
>> existing dvi file in the temp dir will be overwritten (and then renamed)
>> if a dvi2 file is created. This could be easily solved by defining a
>> latex2 format and using that as source for dvi2 creation.
> 
> I think this is artificial. The problem here is interaction between
> converters. We are just lucky that 'dvips test.dvi' does not produce a
> test.aux, otherwise it would interact with latex. The correct solution
> would be to run converters in separate temporary directories (within lyx
> temporary directory).

In some cases this interaction is wanted: bibtex reads the .aux file, for
example.
Running the converters in a separate directory would create lots of
problems, I rather would not like to try that.

I know that the solution with a different extension is not perfect, but I
think it is still better than shuffling around the special flag
for_preview.


Georg

Reply via email to