You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use termpdf for automatic reloading when writing latex code. The problem is that everything stops working after changing something in the tex file and compiling -- The program quits and also the text in my terminal becomes invisible (I think this is just a side effect termpdf terminating unexpectedly)
The issue seems to be that termpdf.py reloads the pdf too quickly, even though it is not available yet. After changing
Traceback (most recent call last):
File "<PATH>/termpdf.py/termpdf.py", line 1908, in <module>
main()
File "<PATH>/termpdf.py/termpdf.py", line 1901, in main
view(file_change, doc)
File "<PATH>/termpdf.py/termpdf.py", line 1546, in view
bar.update(doc)
File "<PATH>/termpdf.py/termpdf.py", line 1033, in update
p = doc.page_to_logical()
^^^^^^^^^^^^^^^^^^^^^
File "<PATH>//termpdf.py/termpdf.py", line 465, in page_to_logical
return self.logical_pages[p]
~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
I printed out doc.dict and after the change in the pdf it becomes
So the program loads a file with zero pages (doc.logical_pages = []) but cannot handle this.
To Reproduce
Open resulting pdf of Latex file with termpdf
change something in file source code and compile (e.g. with latexmk)
I think ideally termpdf.py should have some mechanism of trying to reload the pdf and entering a retry loop on encountering this error and keep showing the old pdf till this issue is resolved,
The text was updated successfully, but these errors were encountered:
I wanted to use termpdf for automatic reloading when writing latex code. The problem is that everything stops working after changing something in the tex file and compiling -- The program quits and also the text in my terminal becomes invisible (I think this is just a side effect termpdf terminating unexpectedly)
The issue seems to be that termpdf.py reloads the pdf too quickly, even though it is not available yet. After changing
to
I get the following error message
I printed out doc.dict and after the change in the pdf it becomes
So the program loads a file with zero pages (doc.logical_pages = []) but cannot handle this.
To Reproduce
I think ideally termpdf.py should have some mechanism of trying to reload the pdf and entering a retry loop on encountering this error and keep showing the old pdf till this issue is resolved,
The text was updated successfully, but these errors were encountered: