Comments (7)
My
main.tex
which I call viavim main.tex
in a folder containing the.tex
file and above.vimrc
is: …
FYI: I updated your example and removed the unnecessary white space.
Inverse search with "Shift + Left Mouse Click" on the Okular pdf file location, however, does not work.
I indeed have set within "Configure Okular dialog box" following https://docs.kde.org/stable5/en/okular/okular/inverse_search.html the setup of "Custom Text Editor" with Command:
vim --remote-silent +%l %f
Ah, but you didn't set it following the VimTeX docs. ;)
Please see :help vimtex-view-okular
and :help vimtex-synctex-inverse-search
. I'll be glad to help if you still find it hard to set up, but I believe the docs should give the necessary info.
from vimtex.
You can try to run the command from a terminal. E.g.:
- Open your LaTeX file (e.g.
test.tex
) with Vim like you normally would. - Verify that you have a servername (e.g. with
\li
). - Compile the file from VimTeX.
- In a different terminal,
cd
to the directory where your LaTeX file is. - Run
vim -v --not-a-term -T dumb -c "VimtexInverseSearch 3 'test.tex'"
in the terminal.
This should move your cursor to line 3 inside the VimTeX buffer. If it works as expected, then we should be able to make it work in Okular as well.
While debugging in Okular, one simple trick is to use echo CMD ARGS > /home/USER/okular.log
. E.g., you can try to use echo "vim -v --not-a-term -T dumb -c ""VimtexInverseSearch %l '%f'"" > /home/USER/okular.log"
(notice how ""
becomes a single double quote within a double quoted string).
from vimtex.
I am able to confirm that your steps 1 through 5 indeed work as you describe. When I copy pasted your echo command modifying USER appropriately, strangely, no log file is created in /home/USER
Perhaps this is a bug with Okular than. :-(
My initial thought is that you may be using the wrong sequence for activating backward search? E.g., perhaps it is CTRL + right click? I'm not sure, but that would be one thing to look into.
I tried within Okular simply
echo "pwd > /home/TryerGit/Okular.log"
and this also does not create any log file.
You should use echo "pwd" > /home/TryerGit/Okular.log
(or echo $PWD ...
).
I installed qpdfview and it seems to work. So, all is well now. In the qpdfview documentation, perhaps you can consider adding the place where the setting should be specified. I could not find it specified otherwise.
I'm glad to hear it! I've found qpdfview to be a solid viewer (although I personally prefer Zathura). And thanks, I'll update the docs.
from vimtex.
Just wanted to close the loop in terms of my tests thus far. While reverse-search seems to work in single .tex files, somehow neither Okular/Zathura/qpdfview seem to work for me with multi-file projects. Time permitting, I will create some minimal working example and share it.
----Edit----
On a simple small example multifile project's forward and reverse search work fine. On my larger main project, it does not work. So, there is something in my config that is incorrect. VimTeX seems fine.
from vimtex.
I am still struggling, @lervag .
Are you referring to the line?
To configure with `VimtexInverseSearch`, use: >bash
vim -v --not-a-term -T dumb -c "VimtexInverseSearch %l '%f'"
in https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt
Initially, I was confused about the >bash
at the beginning line there before I opened this issue. Then, after your post, when I looked into :help
from within Vim, I realized that the >bash
is used for formatting purposes. (something new is learned everyday!)
In any case, I put in vim -v --not-a-term -T dumb -c "VimtexInverseSearch %l '%f'"
into the command argument of Okular and tried it again and it still does not work. Is there a way to capture within Vim (some debug output?) what is happening when Shift Click is pressed in Okular?
Thanks for your patient help.
----Edit---
I should add that :echo serverlist()
does return VIM
, so I would imagine that the server is indeed running on my Vim side.
from vimtex.
I am able to confirm that your steps 1 through 5 indeed work as you describe.
When I copy pasted your echo command modifying USER appropriately, strangely, no log file is created in /home/USER
Perhaps this is a bug with Okular than. :-(
I tried within Okular simply echo "pwd > /home/TryerGit/Okular.log"
and this also does not create any log file.
from vimtex.
I installed qpdfview and it seems to work. So, all is well now. In the qpdfview documentation, perhaps you can consider adding the place where the setting should be specified. I could not find it specified otherwise.
It is in Edit->Setting->Source Editor->vim -v --not-a-term -T dumb -c "VimtexInverseSearch %2 '%1'"
Then, rightclicking on the document pdf opens up a popup the first option of which is the file / line number of the .tex file.
Thank you!
from vimtex.
Related Issues (20)
- Use new synctex interactive mode to speed up synctex HOT 5
- Toggle to revert changes made in issue 2401 HOT 2
- Mainfile detection fails when \input is in enumerate environment HOT 4
- l:file not defined in function vimtex#compiler#compile_selected(type) HOT 4
- Setup text argument in user-defined command HOT 3
- Wrong TeXMathZone result from `vimtex#syntax#stack()` HOT 5
- Compilation failed when using xelatex HOT 2
- Compilation fail with option "-c" HOT 10
- Can't open .tex files... sort of? HOT 3
- Zathura issues with finding Window ID HOT 2
- Disabling "latexmk is not executable" message on startup HOT 3
- Cannot create directory: file already exists error when compiling HOT 7
- Continuous mode for OpenBSD fails due to option HOT 8
- citekey: link to BibDesk HOT 49
- Concealing subscript letters stopped working HOT 4
- [help] Is there possible way for another plugin to get mainfile path that vimtex finds? HOT 1
- Viewer (evince) opening on top of neovim instance instead of new window HOT 1
- Support for nofile buffers (e.g. AirLatex) HOT 3
- inverse search not working WSL HOT 9
- Inline math environment not detected as text object HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.