-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyncTex with Skim pdf viewer? #318
SyncTex with Skim pdf viewer? #318
Comments
The command is path to vscode binary, and argument is to tell vscode to open which file and the line no. |
While @innerlee provided a workaround, I would like to note that this extension does not officially support 3rd-party pdf viewers. Multiple previous issues have discussed this problem. |
Which is a pity given how slow the international compilation/view cycle has become. |
Here is the full workaround, as a tip for aftercommings. Firstly, make a symbol link in ln -sf /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron /usr/local/bin/vscode Secondly, in the configuration of the LaTeX workshop extension, we have the following settings. "latex-workshop.view.pdf.external.command": {
"command": "displayfile",
"args": [
"-r",
"%PDF%"
]
},
"latex-workshop.view.pdf.external.synctex": {
"command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
"args": [
"-r",
"%LINE%",
"%PDF%",
"%TEX%"
]
},
"latex-workshop.view.pdf.viewer": "external", Here, for Finally, in Skim, we give the following settings, for reverse sync.
|
This does not seem to update the file in Skim upon finishing compilation, or to switch to right location. That has to be manually (ctrl-alt-v), which means time wasted waiting and monitoring for the compilation to finish... |
@vomout Skim can trace the chage of PDF file by it self. |
@Liam0205 But not jump to the correct location (where the build was triggered). This is what SublimeText LaTeXTools does: it will open the PDF after the build has finished in the location where the build was triggered. |
@vomout You might need to raise a new issue. : ) |
@Liam0205 , sorry for being slow, but where do you store your script displayfile? I suppose you have to make it executable and searchable? When you recompile, do you refresh the same instance of Skim or another instance will be opened? Finally can you explain why we need displayline and displayfile and not /Applications/Skim.app/Contents/MacOS/skim? Thank you! |
@Liam0205 , I think I answered some of my own questions but not all: It looks like if I use /Applications/Skim.app/Contents/MacOS/skim, I'll get a fresh instance each time without the "--revert" option. It also doesn't let me go to a specific line. Now what I'm still unsure about: Why can't we use displayline for the external command "latex-workshop.view.pdf.external.command" as well? This may make it easier for others to try without having to create the displayfile script and make it executable in a searchable location. I tested and it didn't work, but I'm unsure why, if it simply calls the command with the arguments. It wouldn't be a bad thing if upon opening the external view, you get to the right line right away. I also tried with %LINE% being replaced by 1, in the case the parameter isn't available, but it also doesn't work. So right now what I do is I always use the SyncTex command and never the Viewer command (ctrl-option-V). What I tried:
|
I would like to use Skim viewer to preview the tex document but I don't know how to configure the pdf sync command inside the Skim viewer since vscode is not in its preset config. I uploaded an screenshot to show where I am stuck.
The text was updated successfully, but these errors were encountered: