![]() Rm -f $remote_file # Delete previous remote file # Find the relative path to source based on target_file location -ĭirPdf="$(dirname $(realpath $target_file))" # defaults to the environment variable PWD. # 3) The vim_path must be the path to vim working directory. # 2) The source_file is a relative path based on vim working directory # 1) The target_file can be a file on the current directory or the absolute # the only argument, then a new remote instance of llpp is created. # parameters from SyncTeX to the viewer specific script. # the viewing script of the specific PDF viewer. # This script is called by the TeX editor. I hope this helps someone that was having trouble with syncing functionality of LaTeX files. I use LaTeX quite often to write mathematical papers, so please let me know any improvements or suggestions to improve those scripts. I'm open to suggestions if someone have a better idea or improvements to the scripts. To solve this, you can use \lv to open a remote instance of llpp first and then \ls. Also there is a known issue that I only have a workaround: if there is a non remote instance of llpp already opened, nothing happens when \ls is typed. I wish I could remove the dependencies of bc and xdotool, but I still haven't figure out a way to avoid them. Conversely, if you shift click in a pdf typeset with synctex flag, vim will open in the line of the corresponding click. Once the scripts are in place, you should be able to type \ls in vim to open llpp and highlight with a rectangle the position correspondent to the tex file. We will also need vim, vim-latexsuite, synctex command from texlive-bin and the AUR package llpp-git. ![]() You will need the packages: bc and xdotool. I insert two lines to the original Tex_ForwardSearchLaTex() function: If( Tex_GetVarValue('Tex_ExecuteUNIXViewerInForeground') != 1 ) " The line below was add it to the original Tex_ForwardSearchLaTeX() to make sure we use the defined viewer in the viewing rule " syntax is: viewer TARGET_FILE LINE_NUMBER SOURCE_FILE = Tex_Stringformat('-unique %s\#src:%s%s', target_file, linenr, sourcefileFull) = Tex_Stringformat('-name xdvi -sourceposition "%s %s" %s', linenr, sourcefile, target_file) = Tex_Stringformat('-unique file:%s\#src:%s%s', target_file, linenr, sourcefile) = Tex_Stringformat('-name xdvi -sourceposition "%s %s" -editor "gvim -servername %s -remote-silent \%l \%f" %s', linenr, sourcefile, v:servername, target_file) If Tex_GetVarValue('Tex_UseEditorSettingInDVIViewer') = 1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |