커맨드 라인 SumatraPDF forwardsearch
SumatraPDF의 forwardsearch 기능을 이용하기 위해서는 WinEdt과 같이 DDE 프로토콜을 지원하는 텍스트 에디터가 필요합니다.
SumatraForwardsearch는 DDE 프로토콜을 지원하지 않는 UltraEdit 와 같은 에디터를 위해 텍스트 에디터 대신 SumatraPDF로 DDE 명령을 보내주는 AutoHotKey 스크립트를 컴파일 한 파일입니다.
커맨드라인에서 직접 실행할 수 있으며 형식은 다음과 같습니다.:
SumatraForwardsearch “경로를 포함한 PDF 파일이름” “경로를 포함한 tex 파일 이름” “행 번호” “열 번호”
예를 들어,
SumatraForwardsearch.exe “D:\test.pdf” “D:\test.tex” “182″ “1″
파일을 아무 위치에나 저장하신 후, 사용하시는 텍스트 에디터가 (주로 User Tool 메뉴) 이 정보들을 스크립트로 넘기도록 설정하시면 됩니다.
다운로드: SumatraForwardsearch
EditPlus, UltraEdit, SlickEdit에서 SumatraForwardsearch 를 설정하는 법:
SlickEdit
SlickEdit의 경우, Document-> Tex Options –> General –> Language-Specific Project… button -> Tools tab 에서 설정할 수 있습니다.
그러나 SlickEdit은 built-in 된 열 번호와 행 번호 변수가 없으므로, 약간의 Slick-C Macro 코딩이 필요합니다.
macro를 load한 후, 다음과 같이 설정합니다.:
Command line: SumatraForwardsearch.exe “%p%n.pdf” “%f” “%M current_line_number%” “%M current-col-number%”
Run from dir: SumatraForwardsearch.exe 가 있는 디렉토리
EditPlus
EditPlus의 경우, Tools-> Configure User tools -> Add Tool -> Program 에서 다음과 같이 설정합니다:
Menu text: Sumatra Forwardsearch (또는 아무 이름)
Command: SumatraForwardsearch.exe
Argument:”$(FileDir)\$(FileNameNoExt).pdf” “$(FilePath)” “$(CurLine)” “$(CurCol)”
Working Directory: SumatraForwardsearch.exe 가 있는 디렉토리
Run as text filter: 체크하지 않음
Tools-> Preferences -> Keyboard -> Tool에서 이 User Tool에 핫키를 지정할 수 있습니다.
UltraEdit
UltraEdit의 경우, Advanced -> Tool Configuration 메뉴에서 다음과 같이 설정합니다:
Menu Item Name: Sumatra Forwardsearch (또는 아무 이름)
Command Line: SumatraForwardsearch.exe “%p%n.pdf” “%f” “%line%” “%col%”
Working Directory: SumatraForwardsearch.exe 가 있는 디렉토리
Advanced -> Configuration -> Key Mapping 에서 핫키 지정할수 있습니다.