knap icon indicating copy to clipboard operation
knap copied to clipboard

Error that could not launch the viewer on Windows 11

Open leanhdung1994 opened this issue 8 months ago • 15 comments

I am using:

  • Windows 11 Pro version 23H2 and build 22631.3593.
  • Neovim verison 0.10.0.

My init.lua (for Windows as suggested by @andregpss in his comment) is the following:

require "paq" {
    "savq/paq-nvim";
    "frabjous/knap";
}

-- set shorter name for keymap function
local kmap = vim.keymap.set

-- F5 processes the document once, and refreshes the view
kmap({ 'n', 'v', 'i' },'<F5>', function() require("knap").process_once() end)

-- F6 closes the viewer application, and allows settings to be reset
kmap({ 'n', 'v', 'i' },'<F6>', function() require("knap").close_viewer() end)

-- F7 toggles the auto-processing on and off
kmap({ 'n', 'v', 'i' },'<F7>', function() require("knap").toggle_autopreviewing() end)

-- F8 invokes a SyncTeX forward search, or similar, where appropriate
kmap({ 'n', 'v', 'i' },'<F8>', function() require("knap").forward_jump() end)

local gknapsettings = {
    texoutputext = "pdf",
    textopdf = "pdflatex -interaction=batchmode -halt-on-error -synctex=1 %docroot%",
    textopdfviewerrefresh = "none",
    textopdfviewerlaunch = "sioyek --inverse-search \"nvim --headless -es\"  --new-window %outputfile%",
    textopdfviewerrefresh = "none",
     textopdfforwardjump = "sioyek --inverse-search \"nvim --headless -es\" --reuse-window --forward-search-file %srcfile% --forward-search-line %line% %outputfile%",   
    textopdfshorterror = "A=%outputfile% ; LOGFILE=\"${A%.pdf}.log\"" }

    vim.g.knap_settings = gknapsettings

I have a tex file C:\Users\Akira\Documents\LaTex\test.tex and open it in Neovim by :e C:\Users\Akira\Documents\LaTex\test.tex:

image

I press F7 to launch the viewer. The messages knap routine started and then ERR show up:

image

Could you elaborate on how to solve this issue? @andregpss please help me...

leanhdung1994 avatar Jun 02 '24 17:06 leanhdung1994