xuhdev / vim-latex-live-preview

A Vim Plugin for Lively Previewing LaTeX PDF Output
https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/
GNU General Public License v3.0
834 stars 74 forks source link

:LLPStartPreview runs with no errors, fails to compile or open pdf viewer #57

Closed kappanose closed 5 years ago

kappanose commented 6 years ago

Expected behavior

Preview Starts

Actual behavior

Preview does not compile or open an editor (I ran the start preview command and checked manually)

Neovim v0.2.2 The plugin installs with no errors, and no errors appear after running :LLPStartPreview in neovim. I also manually compiled the tex file with pdflatex from the command line, which worked. This was working earlier today, and I don't recall changing anything. My vim init file contains:

syntax on

call plug#begin('~/.vim/plugged')

Plug 'artur-shaik/vim-javacomplete2' Plug 'xuhdev/vim-latex-live-preview', {'for': 'tex'} Plug 'Shougo/deoplete.nvim', {'do': 'UpdateRemotePlugins'} Plug 'sbdchd/neoformat' Plug 'dylanaraps/wal.vim' " Plug 'lervag/vimtex', { 'for': 'tex'}

call plug#end()

colorscheme wal let g:deoplete#enable_at_startup=1 let g:deoplete#omni_patterns = {} let g:deoplete#omnipatterns.java = '[^. \t].\w' let g:deoplete#sources = {} let g:deoplete#sources. = [] let g:deoplete#file#enable_buffer_path = 1

highlight Pmenu ctermbg=8 guibg=2 highlight PmenuSel ctermbg=1 guifg=2 guibg=2 highlight PmenuSbar ctermbg=0 guibg=2

augroup astyle " autocmd! autocmd BufWritePre * Neoformat augroup END

autocmd Filetype java set number

autocmd Filetype tex let g:livepreview_engine='pdflatex'put of autocmd Filetype tex let g:livepreview_previewer='zathura' autocmd Filetype tex set syntax=context autocmd Filetype tex setl updatetime=1000

Thanks in advance.

Edit: Here is output of :echo b:livepreview_buf_data after attempting to open preview {'root_dir': '/home/kappanose/Documents/math/', 'py_exe': 'python3', 'tmp_dir': '/tmp/vim-latex-live-preview-dxir9mhu', 'run_cm d': 'env TEXMFOUTPUT=/tmp/vim-latex-live-preview-dxir9mhu/home/kappanose/Documents/math/ TEXINPUTS=/tmp/vim-latex-live-preview- dxir9mhu/home/kappanose/Documents/math/:/home/kappanose/Documents/math/: pdflatex -shell-escape -interaction=nonstopmode -output-directory=/tmp/vim-latex-live-preview-dxir9mhu/home/kappanose/Documents/math/promys /tmp/vim-latex-live-preview-dxir9mhu/home /kappanose/Documents/math/app', 'preview_running': 1, 'tmp_src_file': '/tmp/vim-latex-live-preview-dxir9mhu/home/kappanose/Doc uments/math/app'}

So 'preview_running': 1 suggests that the preview should have opened, yet it does not even compile.

kappanose commented 6 years ago

Okay, so commenting out the

if v:version < 700
finish
endif

lines in .vim/plugged/vim-latex-live-preview/plugin/latexlivepreview.vim works. I think this is because I'm using neovim instead of vim. For now, I have this commented out, but would appreciate it if the developers added neovim version support (so when I update the plugin I don't have to manually comment out the lines every time). Preview works flawlessly now.

xuhdev commented 6 years ago

I just tested it on neovim. v:version on neovim seems to be larger than 700. Are you sure this is the reason that it did not work?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!

ghost commented 6 years ago

Hi, I am having the almost same Issue under exact same setup. Neovim v0.2.2 The plugin installs without any error. but when I run ":LLPStartPreview" --> "Failed to compile" appears. But I have comiled the same file in other ways, which compiles perfectly.

g33kex commented 6 years ago

Same issue here, I have the following file \empty Hello world!\bye Which compiles fine using pdftex, and with vim-latex-live-preview, ":LLPStartPreview" leads to "Failed to compile" with no further error.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!

redapemusic35 commented 6 years ago

I am having the same issue with macvim. the document compiles properly every other way except with :LLPStartPreview.

byteofsoren commented 5 years ago

I to have the same problem.

redapemusic35 commented 5 years ago

I was able to fix mine. However I am not sure exactly how. I will try to figure it out and let you know.

Migacz85 commented 5 years ago

Yesterday I had working it perfectly but today: ":LLPStartPreview" is producing exactly the same problem like in this therad :/ What the heck?

ciolansteen commented 5 years ago

Same behaviour. But only when the file is in the root of user's home directory or lower (/home/. or /home/user/.). Any higher levels work just fine. Anyway, LLPStartPreview creates the /tmp/vim-latex-live-preview-xxxxxxxx/whatever.pdf file but cannot open it.

Vim 8.1

Migacz85 commented 5 years ago

@ciolansteen Check if you can manually compile latex to pdf without errors. I found that if there were errors while compiling - and this could be easyly resovled by passing few enters - this plugin had problems after to render pdf. And did not produce any information about that to the user.

ciolansteen commented 5 years ago

already checked and yes, i can. Another wierd thing would be, besides /home/. and /home/user/. there's also /home/user/.local and /home/user/.local/share, all other levels work fine as well as inside any other directory created in .local I manually compiled in all these locations and everything worked correctly.

xuhdev commented 5 years ago

Can any of you test whether removing line 19-21 in latexlivepreview.vim resolves the issue? The three lines read:

if v:version < 700
    finish
endif
SevenTailCat commented 5 years ago

hi~I have removed the three lines in latexlivepreview.vim, but it does not work. how can i do now? i am using macvim on my max os.

xuhdev commented 5 years ago

@SevenTailCat Are you on neovim?

SevenTailCat commented 5 years ago

No,I am on macvim which was installed by homebrew.

xuhdev commented 5 years ago

It looks like there are many different types of "not working" in this thread. I'll close this issue. Please open a new issue and state what kind of error you are encounting -- we'll start from there.

SevenTailCat commented 5 years ago

It looks like there are many different types of "not working" in this thread. I'll close this issue. Please open a new issue and state what kind of error you are encounting -- we'll start from there.

OK,Thanks.

ghost commented 4 years ago

It looks like there are many different types of "not working" in this thread. I'll close this issue. Please open a new issue and state what kind of error you are encounting -- we'll start from there.

OK,Thanks.

Did you resolve the issue?

fadli0029 commented 2 years ago

You probably have done this, but just in case, make sure you actually have texlive installed: sudo apt install texlive-full