On Fri, 10 Jan 2003, Andre Poenitz wrote:
> Has anybody an idea what would be involved to make "click in xdvi to move
> Cursor in LyX" work?

I was thinking about this. Latex (at least in tetex 1.0.7+20011202)
has t5he option -src-specials, which puts a "source special" at the end of
each line in the latex source. So I think that two approachs are possible:

1. lyx invokes latex with the option -src-specials. In this case, lyx has
to have some function like goto_latexline that would take one argument, so
that 'goto_latexline n' would leave the cursor in the place of the lyx
view that generates the nth latex output line. The simple way to do this
is to generate the latex output counting its lines each time
goto_latexline is called.

2. Lyx itself inserts "source specials" at convenient points, and has the
function 'goto_srcspecial', so that 'goto_srcspecial n' would be
equivalent to a search in the lyx buffer.

Option 1 would involve a good policy in breaking lines in the latex
output; option 2 would involve good policy in inserting the "source
specials".

Another much useful feature that could be achieved with source specials is
to show the dvi preview at the page where the cursor is in the lyx view.

Regards,
Joao.

Reply via email to