*Evince [#fec1fb99]
*[[Evince:http://projects.gnome.org/evince/]] [#fec1fb99]

-[[Evince:http://projects.gnome.org/evince/]]
--[[log:http://git.gnome.org/browse/evince/log/]]
--[[Evince Document Viewer:http://library.gnome.org/users/evince/stable/index.html.en]]
---[[Evince Document Viewer › SyncTex » Supported Editors:http://library.gnome.org/users/evince/stable/synctex-editors.html.en]]

*Evince とは [#l8fbb2e6]

Evince は Windows, Linux で動作する PDF, PS, DVI ファイルが表示可能なドキュメント・ビューアです.~
PDF ファイルの自動更新機能もあります.~

*SyncTeX による forward and inverse search [#ga060086]

[[Evince 2.31.5:http://git.gnome.org/browse/evince/commit/?id=EVINCE_2_31_5]] から SyncTeX による forward and inverse search が可能になりました.
-[[[SOLVED] HOWTO: Evince + SyncTeX + vim/emacs/scite/lyx/kile/$EDITOR + forward/backward search - Ubuntu Forums:http://ubuntuforums.org/showthread.php?t=1716268]]
-[[[SOLVED] HOWTO: Evince + SyncTeX + vim/emacs/scite/lyx/kile/$EDITOR + forward/backward search [Archive]  - Ubuntu Forums:http://ubuntuforums.org/archive/index.php/t-1716268.html]]
//-[[latexince:http://code.google.com/p/latexince/]]

**注意点 [#s90f2b11]
TeX Live 2011 では SyncTeX が出力するファイル名が TeX Live 2010 とは異なっています.~
evince_forward_search で
 tex_file = os.path.abspath(sys.argv[3])
となっていますが,この場合フルパス表記 /dirname/basename.tex になってしまうので,/dirname/./basename.tex の場合に forward search ができません.~
tex_file の値を適切な値になるように修正すれば forward search が可能になります.
 #tex_file = os.path.abspath(sys.argv[3])
 tex_file = os.path.join(os.path.dirname(os.path.abspath(sys.argv[3])), './', os.path.basename(os.path.abspath(sys.argv[3])))
Evince 2.91.0 以降を使用する場合は [[D-Bus の仕様が変更されている:http://git.gnome.org/browse/evince/commit/?id=EVINCE_2_91_0]]ので evince_forward_search を
 #window.SyncView(tex_file, (line_number,1), dbus_interface="org.gnome.evince.Window")
 window.SyncView(tex_file, (line_number,1), 0, dbus_interface="org.gnome.evince.Window")
に修正して evince_backward_search を
 #    def on_sync_source(self, input_file, source_link):
     def on_sync_source(self, input_file, source_link, time):
         print input_file + ":" + str(source_link[0])
         cmd = re.sub("%f",input_file,self.editor)
         cmd = re.sub("%l",str(source_link[0]), cmd)
         print cmd
         subprocess.call(cmd, shell=True)
         if self.source_handler is not None:
 #            self.source_handler(input_file, source_link)
             self.source_handler(input_file, source_link, time)
に修正します.