Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to connect GEdit and xdvi. I don't use the gedit latex lugin as I don't use LaTeX, but plain TeX. Well, for the inverse search I compile the TeX file with the "external tools" plugin and the following code:

#!/bin/bash
TEXFILE=$GEDIT_CURRENT_DOCUMENT_NAME
DVIFILE=${TEXFILE/%.*/.dvi}
LOGFILE=${TEXFILE/%.*/.log}
if pdftex -output-format=dvi -src-specials -halt-on-error $TEXFILE; then
    xdvi -editor gedit $DVIFILE
    else gedit $LOGFILE
    fi

and the inverse search works quite well.

BUT I'm not able to set correctly the direct search. I'm trying the following code

#!/bin/bash
TEXFILE=$GEDIT_CURRENT_DOCUMENT_NAME
DVIFILE=${TEXFILE/%.*/.dvi}
xdvi -sourceposition $GEDIT_CURRENT_LINE_NUMBER $DVIFILE

but it doesn't work. The error message is "No reference to source file "test.dvi" in DVI file."

Where is the fault?

share|improve this question
    
If you are happy to use Evince rather then xdvi you can checkout askubuntu.com/q/68015/19490 –  N.N. Aug 6 '12 at 16:06
    
@N.N. Sorry, it doesn't works. Thanks anyway. –  Jean Baldraque Aug 6 '12 at 20:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.