jupyterlab / jupyterlab-latex

JupyterLab extension for live editing of LaTeX documents
BSD 3-Clause "New" or "Revised" License
622 stars 69 forks source link

Synctex behaves inconsistently #94

Closed macbuse closed 6 years ago

macbuse commented 6 years ago

With jupyter lab on ChromeBook/Ubuntu Xenial via crouton/crouton extension.

https://github.com/dnschneid/crouton/wiki/crouton-in-a-Chromium-OS-window-(xiwi)

Details of full config below.

-----------------Behavior--------------------

.tex compiles correctly and is displayed in preview

synctex fails (see trace below) when jupyter lab is executed in a different directory from the .tex source file.

synctex works correctly when jupyter lab is executed in the same directory as the .tex.

-----------------Config ---------------------

python 3.6.6

Jupyter Lab Version 0.34.7 installed via pip install jupyterlab-latex

Ubuntu Xenial 16.04.5 Linux localhost 3.18.0-18121-g8c0cb17dd7e0 #1 SMP PREEMPT Wed Aug 29 14:14:24 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux

installed via crouton on Chrome OS Version 69.0.3497.73 (Official Build) beta (64-bit)

-----------------Trace of error --------------------

[E 14:24:14.578 LabApp] SyncTex command synctex edit -o 1:0:0:axes_mondal.pdf errored with code: 255 [E 14:24:14.582 LabApp] Uncaught exception GET /latex/synctex/AXES_FINAL/axes_mondal.pdf?page=1&x=0&y=0&1536755054548 (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/latex/synctex/AXES_FINAL/axes_mondal.pdf?page=1&x=0&y=0&1536755054548', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "/usr/local/conda3/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute result = yield result File "/usr/local/conda3/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result() File "/usr/local/conda3/lib/python3.6/site-packages/tornado/gen.py", line 1147, in run yielded = self.gen.send(value) File "/usr/local/conda3/lib/python3.6/site-packages/jupyterlab_latex/synctex.py", line 191, in get out = json.dumps(parse_synctex_response(out, pos)) File "/usr/local/conda3/lib/python3.6/site-packages/jupyterlab_latex/synctex.py", line 215, in parse_synctex_response raise Exception(f'Unable to parse SyncTeX response: {response}') Exception: Unable to parse SyncTeX response: This is SyncTeX command line utility, version 1.2

[W 14:24:14.591 LabApp] Unhandled error [E 14:24:14.593 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (X11; CrOS x86_64 10895.40.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.73 Safari/537.36", "Dnt": "1", "Authorization": "token c7f3e4eb4b7d0773bf45f5504d2df3bbcdd9a35f5d6c40fe", "Content-Type": "application/json", "Accept": "/", "Referer": "http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-IE,en;q=0.9,fr-FR;q=0.8,fr;q=0.7,zh-CN;q=0.6,zh;q=0.5,en-US;q=0.4", "Cookie": "_xsrf=2|3e27440f|156278aef6ff8417cdadfb97e6f88b1d|1536255268; username-localhost-8889=\"2|1:0|10:1536503672|23:username-localhost-8889|44:ZjNlMzJmMjFjMTI5NDNkMWEyNTg5ZDMyNzUxNzdjZjk=|694d1e500a20d151d7d9296d4b0a7087c8df17a09ef4c6f04e3d5a33a8669aa2\"; username-localhost-8888=\"2|1:0|10:1536755051|23:username-localhost-8888|44:NzA1MjYzOWFmYWYxNGMzMDkzZmRjODllMDNlN2JiYTk=|5114e5f9e2fe8a4f31ff8e586bab9ef1cdbd5823bb80e43699a160dcf4614883\"" } [E 14:24:14.594 LabApp] 500 GET /latex/synctex/AXES_FINAL/axes_mondal.pdf?page=1&x=0&y=0&1536755054548 (::1) 39.96ms referer=http://localhost:8888/lab

t-makaro commented 6 years ago

Related #93.

ian-r-rose commented 6 years ago

@macbuse, thanks for the report! I just published v0.4.1 of the python package, which may have fixed this issue. Can you check if it has?

macbuse commented 6 years ago

On Thu, 13 Sep 2018 at 23:36, Ian Rose notifications@github.com wrote:

@macbuse https://github.com/macbuse, thanks for the report! I just published v0.4.1 of the python package, which may have fixed this issue. Can you check if it has?

Works perfectly now. Thanks very useful.

This was the really the only thing left that I needed to switch from my MacBook to the Chromebook..

ian-r-rose commented 6 years ago

Glad to hear it. Fixed by #93