diff --git a/jupyterlab_latex/synctex.py b/jupyterlab_latex/synctex.py index dbf91bf..0f1a2d0 100644 --- a/jupyterlab_latex/synctex.py +++ b/jupyterlab_latex/synctex.py @@ -79,11 +79,13 @@ def build_synctex_edit_cmd(self, pdf_name, pos): """ c = LatexConfig(config=self.config) + pdf_path = os.path.join(self.notebook_dir, pdf_name+".pdf") + cmd = ( c.synctex_command, 'edit', '-o', - f'{pos["page"]}:{pos["x"]}:{pos["y"]}:{self.notebook_dir}/{pdf_name+".pdf"}' + f'{pos["page"]}:{pos["x"]}:{pos["y"]}:{pdf_path}' ) return cmd