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

Possible issue with forward search and the subfiles package #208

Closed
wbthomason opened this issue Apr 16, 2020 · 2 comments
Closed

Possible issue with forward search and the subfiles package #208

wbthomason opened this issue Apr 16, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@wbthomason
Copy link

Bug description

When using forward search in a multi-file document with sections managed using https://ctan.org/pkg/subfiles, texlab seems to use the wrong path for substituting the %p variable in invoking the viewer for forward search.

In particular: using forward search from the main LaTeX file succeeds, indicating that the basic forward-search setup is configured correctly. However, trying forward search from a subfile results in an error when the viewer tries to open a nonexistent file.

For example, in a project organized as follows:

main.tex
sections/
    foo.tex

where foo.tex is included in main.tex using \subfile{sections/foo.tex}, forward search from a point in foo.tex causes the viewer to try to open sections/./foo.pdf instead of main.pdf.

Versions

texlab version: 1.10.0
LSP client/editor: coc.nvim and Neovim, both latest from master.
Platform: Arch Linux

Config

"latex.build.onSave": false,
"latex.forwardSearch.executable": "okular",
"latex.forwardSearch.args": ["--unique", "file:%p#src:%l%f"],

Empty latexmkrc, compilation managed with vimtex configured as

let g:vimtex_view_forward_search_on_start = 0
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
let g:vimtex_view_general_options_latexmk = '--unique'
@pfoerster pfoerster self-assigned this Apr 17, 2020
@pfoerster pfoerster added the bug Something isn't working label Apr 17, 2020
@pfoerster
Copy link
Member

Thanks for the detailed report. The issue should be fixed with v2.0.0.

@wbthomason
Copy link
Author

Confirmed fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants