since the ftp server does not seem to work,
here is the macro:
(it is probably too long!)
Christian.
//Description of use:
//edit the .log file in Vedit. Put the cursor //on a line showing an error message
//(the line number in the .tex file is at the //beginning of this line).
//Executing this macro will open the .tex //file at the correct line number to correct //the error
// I. Set file specs
//
//Empty registers
Reg_Push(20,23)
Num_Push(20, 23)
#20 = BufNum // Buffer of log file
Reg_Set(21,FILEONLY)
// name of the log file //without extension->@(21)
Reg_Set(22,PATHNAME)
// full name with path of the log file -> //@(22}
Reg_set(23,PATHONLY)
// full path of the directory of the log file //-> @(23)
//get the line number in the current error //message and puts it in numerical register //23
Begin_Of_Line
Char(2)
#23=Num_Eval(SUPPRESS)
// II. Check for open TeX file; if open close //it
//
#22=File_Check("|@(23)\|@(21).tex")
if(#22 > 0) {
Buf_Switch(#22)
Buf_Quit(delete)}
//Opens the TeX file
Num_Push(30,32)
Buf_Switch(Buf_Free)
File_Open("|@(23)\|@(21).tex")
#32 = Screen_Lines - Win_Reserved_Bottom - Win_Reserved_Top -20
if (#32 < 4) { #32 = 4 }
Win_Create(Win_Free,20,1,#32,Screen_Cols)
Win_Switch(Win_Num,ATTACH)
Margin_Right(70)
//Go to line of the error
Goto_Line(#23)
//restore various registers
Num_Pop(30,32)
Reg_Pop(20,23)
Num_Pop(20,23)
|
|