Re: Inverse and Forward Search : This is not what I expected
Stefan Ulrich <[email protected]> Thu, 2 Feb 2006 20:23:13 +0100
| Newsgroups | gmane.comp.tex.xdvi.devel,gmane.comp.tex.tetex.general |
|---|---|
| Message-ID | <[email protected]> |
Ahmet Nurlu <[email protected]> writes: > When I make a forward search in WinEdt, YAP displays the position roughly > corresponding to your current position in YAP. [...] > In my Debian/Sarge system, I use TeTeX(ver:3.0.13) and Xdvi(ver:22.84.9). When I > initiate a forward search from gvim, Xdvi draws a rectangle around the paragraph > in which the correspoding line in a source file belongs to. So it is a big > margin of error. Inverse search works with the same big margin of error. It > doesn't matter where you click in a paragraph in Xdvi, it always points the > begining of a paragraph in the corresponding source file. One thing you could try is make sure that you enabled all types of source specials: 'latex --src-specials=cr,display,hbox,math,par,parend,vbox' - maybe this will be more similar to the MikTeX behaviour. As far as I know, the original implementation was adopted from MikTeX, but it might have changed; e.g. specials at some positions could have caused problems with TeX behaving differently from non-special mode (i.e. failing the Trip test) so that they were removed; or maybe the MikTeX implementation has also changed in the meantime so that it uses more/better specials now. FWIW, I also used source specials heavily and found the paragraph-level resolution sufficient in most cases. (FWIW, xdvi can also do a string search in the DVI file if you're looking for a specific word). Some more remarks on xdvi: The source special markers are at certain positions in the DVI file. What xdvi does is highlight the text region (by drawing a rectangle around it) that 'belongs' to a certain special marker, ie. all the text following the marker up to, but not including, the next one. You can debug this behaviour by typing 'Ctrl-V' into the xdvi window. This will display the positions of all special markers with small rectangles, and print a list of all specials found on the page to stderr. The specials have the format "src:<line number><source file>". You can also type 'Ctrl-X' and it will tell you the coordinates and line number of the closest source special in the statusline at the bottom of the window. If the specials displayed by 'Ctrl-V' do correspond to what's highlighted in 'forward search' (.tex to DVI), it is indeed a problem with TeX not inserting 'enough' specials. You could also take a DVI file with source specials produced by MikTeX and view that in xdvi to compare it directly and see whether you get more/better special markers. Best, Stefan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642