Skip to content
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

Fix a bug of synctex edit command #231

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

naoh16
Copy link
Contributor

@naoh16 naoh16 commented Sep 2, 2024

This PR would be a solution for the following issues:

Their problem are occured when the notebook_dir is a blank, because the generated path is an absolute path from the root: e.g. '/sample.tex'.

NOTE: This is a same solution of the implementation in build_synctex_view_cmd() function.

pdf_path = os.path.join(self.notebook_dir, tex_name+".pdf")
tex_path = os.path.join(self.notebook_dir, tex_name+".tex")
cmd = (
c.synctex_command,
'view',
'-i',
f'{pos["line"]}:{pos["column"]}:{tex_path}',
'-o',
f'{pdf_path}'
)

(cherry picked from commit 4f45491)
Copy link

github-actions bot commented Sep 2, 2024

Binder 👈 Launch a Binder on branch naoh16/jupyterlab-latex/fix_synctex

@ktaletsk ktaletsk added the bug label Sep 3, 2024
@ktaletsk ktaletsk self-requested a review September 3, 2024 20:16
Copy link
Collaborator

@ktaletsk ktaletsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you @naoh16

@ktaletsk ktaletsk merged commit 5a48105 into jupyterlab:master Sep 3, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants