if (x!=0) { tagjump; } else { call OpenBible; endmacro; } if (!result) { #x = x; #y = y; $datapath = getenv("DATA"); $org_search_strings = searchbuffer; #org_search_option = searchoption; setsearch "",#org_search_option; gowordtop; getsearch; if (searchbuffer == "") { call OpenBible; endmacro; } $filename = searchbuffer; gowordend; if (code == ascii(".")) { right; getsearch; $ext = searchbuffer; if ($ext == $filename) { call OpenCite; } else { $view_file_path = $datapath + $filename + "." + $ext; if ($ext == "wmf" || $ext == "bmp" || $ext == "jpg" || $ext == "gif") { run "c:\\bin\\view\\view.exe " + $view_file_path; } if ($ext == "lzh" || $ext == "zip") { run "C:\\Bin\\Explzh\\Explzh.exe " + $view_file_path; } if ($ext == "xls") { run "C:\\Progra~1\\Micros~2\\Office\\excel.exe " + $view_file_path; } if ($ext == "org") { openfile $view_file_path; } if ($ext == "htm") { run "c:\\progra~1\\intern~1\\iexplore.exe " + $view_file_path; } if ($ext == "pdf") { run "c:\\bin\\acrobat\\exchange\\acroex32.exe " + $view_file_path; } if ($ext == "pfc") { run "c:\\Pagemgr\\psd_view.exe " + $view_file_path; } if ($ext == "att") { openfile getenv("HOME") + $filename + "." + $ext; } if ($ext == "ra") { run "c:\\windows\\system\\realplay.exe " + $view_file_path; } } setsearch $org_search_strings, #org_search_option; endmacro; } call GetTeXCommand; if (##return) { if ($command == "cite") { #hyphen_pos = strstr($option, "-"); if (#hyphen_pos > 0) $option = leftstr($option, #hyphen_pos); $strings = "[" + $option + "]"; call OpenCite; gofiletop; if ($option != "") searchdown $strings,word; } else if ($command == "ref") { $strings = "\\label{" + $filename + "}"; if ($option != "") openfile $datapath + $option + ".org"; gofiletop; searchdown $strings,word; } else if ($command == "label") { $strings = "\\ref{" + $filename + "}"; gofiletop; searchdown $strings,word; } else if ($command == "input") openfile $filename + ".org"; else if ($command == "bibliographystyle") openfile "c:\\bin\\xtr\\" + $filename + ".xtr"; } setsearch $org_search_strings, #org_search_option; } endmacro; GetTeXCommand: #c = 0; while(#c < 5) { #c = #c + 1; wordleft; left; if (code == ascii("-") || code == ascii(":")) #c = #c - 1; if (code == ascii("\\")) break } if (#c <= 3) { right; getsearch; $command = searchbuffer; if (#c == 3) { wordright; beginsel; left; gokakko; getsearch; $option = searchbuffer; escape; #c = strstr($option, "-"); if (#c > 0) $option = leftstr($option, #c); } moveto #x, #y; return 1; } moveto #x, #y; else return 0; OpenCite: moveto #x, #y; $citation_file_path = $datapath + $filename + ".cit"; #open_file_num = findhidemaru($citation_file_path); if (#open_file_num <= -1) openfile $citation_file_path; else setactivehidemaru #open_file_num; return; OpenBible: if (rightstr(basename, 3) =="cit") { $label = "{" + leftstr(basename, strstr(basename, ".")); if (findhidemaru("booklist.bib") == -1) { openfile $datapath + "booklist.bib"; } else { setactivehidemaru findhidemaru("booklist.bib"); } gofiletop; searchdown $label; if (result == no) { beginclipboardread; setclipboard "extag:" + $label; execmacro "texset.mac"; } } if (rightstr(basename, 3) =="trn") { $label = leftstr(basename, strstr(basename, ".")) + ".\*"; openfile $label; } return;