3

the issues I'm facing in vscode are:

  1. "View LaTeX PDF" does not update: I made some edits to my .tex file, saved them with ctrl + s, but the PDF does not update (it does not show the new changes).
  2. PDF to code does not work: I want my PDF to jump to the position where my cursor is in the coding tab. I have tried ctrl + click, ctrl + alt + j, and some other shortcuts that other forum posts have said to use. (And yes, I have SyncTeX enabled as well in settings). However, the PDF always stays in its original position (it does not jump to my cursor).

Other information: system is Windows 10 and I installed VSCode yesterday. Extension is LaTeX Workshop.

UPDATE: if I edit the file with another .tex editor (Sublime Text), it shows the edits in VSCode's PDF Viewer. But it still doesn't show if I edit the LaTeX in VSCode itself.

  • Welcome to this site! While it is possible you get a useful answer here (and questions about TeX editors are indeed welcome), what you're facing seems to be a problem specific to VS Code (or even more specifically, whatever extension you're using for LaTeX preview), so you may have better luck asking among experienced VS Code users. – ShreevatsaR Jul 16 '21 at 21:40
  • Thanks! I'll try on reddit. – Joshua Lin Jul 16 '21 at 21:47
  • Or at least, it may help if you mentioned in the question what VS Code LaTeX extension(s) you're using (e.g. "LaTeX Workshop" I imagine, as that seems to be most popular?). When you make changes and save the file, does the file get recompiled (do you see "Build" activity in the status bar), for instance? What happens if you invoke the command "LaTeX Workshop: Refresh all LaTeX PDF viewers" from the command palette? Does the command "LaTeX Workshop: Build LaTeX project" work? Are you seeing the PDF in a VS Code tab, or browser tab, or external viewer? Details like that. – ShreevatsaR Jul 16 '21 at 21:47
  • Yep, it's LaTeX Workshop - I added it to my question. By build activity in status bar, do you mean that grey dot that appears when there are unsaved changes? If so, then yes, it appears. Unfortunately, using "LaTeX Workshop: Refresh all LaTeX PDF viewers" does not work; it cites an error as "MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'." However, I have Active State Perl and MikTeX installed already. – Joshua Lin Jul 16 '21 at 21:51
  • 1
    Ah then it is possibly an issue with your TeX distribution/installation (MiKTeX) rather than VS Code specifically. You could look at this question (and the question linked from that question) which seems to be about the same error message, and also try to see whether you can compile .tex files outside of VS Code directly using the same MiKTeX that VS Code is using. I'm sorry I can't help further as I'm not using Windows at the moment. – ShreevatsaR Jul 16 '21 at 21:58
  • I can compile .tex in other editors like TeXMaker and Sublime Text. At any rate, thanks for the help anyways. – Joshua Lin Jul 16 '21 at 22:19
  • Did you fix it? I'm having the same problem. I would like to auto refresh the PDF Viewe – Igor Caliman Jan 02 '23 at 16:54
  • @IgorCaliman I started using the vimtex extension to auto-update instead. – Joshua Lin Jan 11 '23 at 17:26

0 Answers0