question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

latex.ForwardSearch does not work

See original GitHub issue

The following config does neither of running zathura nor jumping to the corresponding section (forward search).
Only [coc.nvim] preview success message is shown. If I omit latex.forwardSearch.args, a blank zathura would be brought up.

    // coc-texlab
    "latex.build.args": [
        "-pdf",
        "-interaction=nonstopmode",
        "-synctex=1",
        "-pvc"
    ],
    "latex.build.onSave": true,
    "latex.lint.onSave": true,
    "latex.lint.onChange": true,
    "latex.forwardSearch.executable": "/usr/bin/zathura",
    "latex.forwardSearch.args": [
        "--synctex-forward",
        "%l:1:%f",
        "%p"
    ],

Some info:

## versions

vim version: VIM - Vi IMproved 8.2 8022590
node version: v12.21.0
coc.nvim version: 0.0.80-fedaf52837
coc.nvim directory: /home/pooya/.vim/plugged/coc.nvim
term: dumb
platform: linux

## Log of coc.nvim

2021-03-13T22:29:34.098 INFO (pid:30427) [services] - registered service "languageserver.dockerfile"
2021-03-13T22:29:34.100 INFO (pid:30427) [services] - registered service "languageserver.sql"
2021-03-13T22:29:34.126 INFO (pid:30427) [services] - registered service "diagnostic-languageserver"
2021-03-13T22:29:34.370 INFO (pid:30427) [services] - registered service "texlab"
2021-03-13T22:29:34.371 INFO (pid:30427) [services] - TexLab state change: stopped => starting
2021-03-13T22:29:34.376 INFO (pid:30427) [plugin] - coc.nvim 0.0.80-fedaf52837 initialized with node: v12.21.0 after 357ms
2021-03-13T22:29:34.383 INFO (pid:30427) [language-client-index] - Language server "texlab" started with 30438
2021-03-13T22:29:34.391 INFO (pid:30427) [attach] - receive notification: registNotification [ 'cquery', '$cquery/publishSemanticHighlighting' ]
2021-03-13T22:29:34.391 INFO (pid:30427) [attach] - receive notification: registNotification [ 'cquery', '$cquery/setInactiveRegions' ]
2021-03-13T22:29:34.392 INFO (pid:30427) [attach] - receive notification: registNotification [ 'ccls', '$ccls/publishSemanticHighlight' ]
2021-03-13T22:29:34.392 INFO (pid:30427) [attach] - receive notification: registNotification [ 'ccls', '$ccls/publishSkippedRanges' ]
2021-03-13T22:29:34.508 INFO (pid:30427) [services] - TexLab state change: starting => running
2021-03-13T22:29:34.513 INFO (pid:30427) [services] - service texlab started
2021-03-13T22:29:35.055 INFO (pid:30427) [attach] - receive request: CocAutocmd [ 'BufWritePre', 1 ]
2021-03-13T22:29:37.430 INFO (pid:30427) [attach] - receive notification: openList [ 'commands' ]
2021-03-13T22:29:37.460 INFO (pid:30427) [attach] - receive notification: runCommand [ 'coc-helper.internal.didVimEvent_1', 'BufDelete', 2 ]
2021-03-13T22:29:37.461 INFO (pid:30427) [attach] - receive notification: runCommand [ 'coc-helper.internal.didVimEvent_2', 'BufDelete', 2 ]
2021-03-13T22:33:27.434 INFO (pid:30427) [attach] - receive notification: showInfo []

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
vimpostorcommented, May 29, 2021

I had the same problem. There was a breaking change in texlab 3.0. Here is the correct config to make it work with texlab 3.0 and zathura:

	"texlab.build.args": [
		"-pdf",
		"-interaction=nonstopmode",
		"-synctex=1",
		"-pvc",
		"%f"
	],
	"texlab.forwardSearch.args": ["--synctex-forward", "%l:1:%f", "%p"],
	"texlab.forwardSearch.executable": "zathura"

And here is the complete diff (coc-texlab 2 -> coc-texlab 3.0):

-       "latex.build.args": [
+       "texlab.build.args": [
                "-pdf",
                "-interaction=nonstopmode",
                "-synctex=1",
-               "-pvc"
+               "-pvc",
+               "%f"
        ],
-       "latex.forwardSearch.args": ["--synctex-forward", "%l:1:%f", "%p"],
-       "latex.forwardSearch.executable": "zathura",
+       "texlab.forwardSearch.args": ["--synctex-forward", "%l:1:%f", "%p"],
+       "texlab.forwardSearch.executable": "zathura",
1reaction
fannheywardcommented, Jun 3, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Forward/Inverse Search Does Not work on certain tex files
In TeXmaker synctex (i.e. jump to pdf or jump to source ) fails if either the directory or the file name has a...
Read more >
Forward search does sometimes not work · Issue #1026 - GitHub
I am using SumatraPDF 3.1.2 as a viewer when typesetting with LaTeX, and for some of my TeX files forward search does not...
Read more >
LaTeX-on-Windows.pdf
In TeXworks, forward and inverse search are easy. To do a forward search, right-click on text in the source window and choose the...
Read more >
Forward search does not work - LaTeX.org
Hi everybody. Im faced with a problem when using TexnicCenter together with Yap. When i compile and view a document, then TexnicCenter/Yap ...
Read more >
Search with SyncTeX
Backward search should always work, even if you don't add the modeline. Backward search: from PDF to TeX (from the document viewer to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found