-
Notifications
You must be signed in to change notification settings - Fork 407
VimTeX in WSL1,when call the SumtraPDF to preview, it loads the wrong PDF Path #2566
Copy link
Copy link
Closed
Labels
Description
Description
Using Windows 10 WSL1 + NeoVim + VimTeX.
LaTeX project is located in D:\Project
SumatraPDF is the default PDF viewer in Windows
Access the project in WSL1 via cd /mnt/d/Project then call nvim. After successfully compiling the sumatraPDF shows error while loading the PDF file: D:/mnt/d/Project/main.pdf
From my understanding, the path is wrong, there shouldn't be /mnt/d there
Steps to reproduce
- LaTeX project is located in Windows 10
D:\Project - enter WSL1, enter the latex project root path via
cd /mnt/d/Project, then enter neovim vianvim - compile the latex project -> succeed
- try to preview it with SumatraPDF, which is installed in Windows 10
- SumatraPDF cannot load the generated PDF, shows error loading file:
D:/mnt/d/Project/main.pdf
Related Settings:
vim.g['vimtex_view_general_viewer'] = 'SumatraPDF.exe'
vim.cmd([[let g:vimtex_view_general_options
\ = '-reuse-instance -forward-search @tex @line @pdf'
\ . ' -inverse-search "' . exepath(v:progpath)
\ . ' --servername ' . v:servername
\ . ' --remote-send \"^<C-\^>^<C-n^>'
\ . ':execute ''drop '' . fnameescape(''\%f'')^<CR^>'
\ . ':\%l^<CR^>:normal\! zzzv^<CR^>'
\ . ':call remote_foreground('''.v:servername.''')^<CR^>^<CR^>\""']])
Expected behavior
After the compiling,sumatraPDF should be automatically called and loading the generated PDF
Actual behavior
SumtraPDF cannot load the generated PDF error, shows the error, "loading file: D:/mnt/d/Project/main.pdf", the path is wrong, it shouldn't contain "/mnt/d"
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: Ubuntu 20.04.5 LTS
Vim version: NVIM v0.9.0-dev
Has clientserver: true
Servername: /tmp/nvim.timo/afd90X/nvim.354.0
VimTeX project: main
base: main.tex
root: /mnt/d/Project/
tex: /mnt/d/Project/main.tex
main parser: texroot specifier
document class: scrbook
packages: adjcalc adjustbox alphalph amsbsy amsgen amsmath amsopn amstext array atbegshi atbegshi-ltx atveryend atveryend-ltx auxhook babel biblatex bigintcalc bitset blindtext blx-case-expl3 bookmark booktabs calc caption caption3 collectbox color colortbl csquotes datatool-base datatool-fp datetime2 defpattern enumitem environ epic etexcmds etoolbox everyshi expl3 fix-cm float fontenc fontspec fontspec-xetex footmisc fp fp-addons fp-basic fp-eqn fp-eval fp-exp fp-pas fp-random fp-snap fp-trigo fp-upn geometry gettitlestring glossaries glossaries-compatible-307 glossary-hypernav glossary-list glossary-long glossary-super glossary-tree graphics graphicx hycolor hyperref ifoddpage iftex ifthen ifvtex infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys l3keys2e letltxmacro lipsum listings logreq longtable lstmisc ltablex ltcaption ltxcmds mathtools mfirstuc mhsetup multirow nameref nccmath overpic pageslts pbox pdfcol pdfescape pdftexcmds pgf pgfcomp-version-0-65 pgfcomp-version-1-18 pgfcore pgffor pgfkeys pgfmath pgfrcs pgfsys ragged2e refcount rerunfilecheck rotating scalerel scrbase scrkbase scrlayer scrlayer-scrpage scrlfile scrlfile-hook scrlogo shellesc siunitx stringenc substr supertabular tabularx tcolorbox textcase textcomp tikz tocbasic tocloft tracklang translations translator trig trimclip trimspaces typearea ulem undolabl unicode-math unicode-math-xetex uniquecounter url varwidth verbatim xcolor xfor xfrac xkeyval xltabular xparse xspace xtemplate
source files:
main.tex
preamble.tex
compiler: latexmk
engine: -xelatex
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 0
executable: latexmk
viewer: General
job:
pid: 5944
cmd: SumatraPDF.exe -reuse-instance -forward-search '/mnt/d/Project/main.tex' 1 '/mnt/d/Project/main.pdf' -inverse-search "/usr/bin/nvim --servername /tmp/nvim.timo/afd90X/nvim.354.0 --remote-send \"^<C-\^>^<C-n^>:execute 'drop ' . fnameescape('\%f')^<CR^>:\%l^<CR^>:normal\! zzzv^<CR^>:call remote_foreground('/tmp/nvim.timo/afd90X/nvim.354.0')^<CR^>^<CR^>\""
qf method: LaTeX logfileReactions are currently unavailable