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

Viewing with okular using temp files broke #2288

Closed
rolandherzog opened this issue Dec 29, 2021 · 5 comments
Closed

Viewing with okular using temp files broke #2288

rolandherzog opened this issue Dec 29, 2021 · 5 comments

Comments

@rolandherzog
Copy link

rolandherzog commented Dec 29, 2021

Description

I am using vimtex in nvim-qt with okular as a viewer and latexmk backend. A minimal init.vim to reproduce the issue is as follows.

call plug#begin('~/.cache/nvim/plugged')
Plug 'lervag/vimtex'
call plug#end()

let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_use_temp_files = 1

Expected behavior

Issuing :VimtexCompile, e.g., on a file named test.tex, produces test.pdf. Upon successful compilation, test.pdf is copied over to test_vimtex.pdf, which is the file opened by issuing :VimtexView. This used to work until recently (c72d34b ?)

Actual behavior

test.pdf is created but it is not copied to test_vimtex.pdf. Issuing :VimtexView results in a Viewer cannot read PDF file! error.

lervag added a commit that referenced this issue Dec 29, 2021
@lervag
Copy link
Owner

lervag commented Dec 29, 2021

Sorry, that was a silly regression bug introduced while doing some refactoring work. I think it is fixed now. Please test.

@lervag lervag closed this as completed Dec 29, 2021
@rolandherzog
Copy link
Author

Thanks for your quick reply. I believe this does not fully fix the issue though. Still, test.pdf is not copied to test_vimtex.pdf after a successful compile run. Consequently, okular, which displays test_vimtex.pdf, does not refresh. The file test.pdf is only copied over to test_vimtex.pdf once I issue :VimtexView (or perform a forward search).

@lervag
Copy link
Owner

lervag commented Dec 31, 2021

I've made some further changes that I think solves your issue. Can you update and test?

@rolandherzog
Copy link
Author

Yes indeed, the issue is now fixed and the behavior as expected. I appreciate your quick help!

@lervag
Copy link
Owner

lervag commented Jan 1, 2022

Great; thanks for noticing and reporting the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants