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
Some issues with TeXShop previewer #2835
Comments
I don't use MacOS myself, so I'm not really acquainted with the osascript syntax.
I would be happy to consider a PR!
The original author is @michaelliebling, so I'll ping him and allow him to comment on this himself. But I would not be surprised if your suggested updates would be more than welcomed!
I'll be glad to help! |
Thanks for the reply! I guess I'll wait a bit then. I'm currently busy anyway so maybe early to mid December will be a good time. |
Great to hear that someone else is using the TeXShop - Vim combo on macOS!
I'm sorry to hear that things are not working for you. I can confirm that Vimtex is still doing forward and inverse searches as expected on macOS Sonoma 14.0, with MacVim r178 (Vim 9.0.1897), a fresh copy of vimtex cloned into filetype plugin on
let g:tex_flavor='latex'
let g:vimtex_view_method='texshop'
let g:vimtex_view_automatic=0
let g:vimtex_view_texshop_activate=1 Please note the last preference,
To avoid having the
Can you point to the part of the code which you think is responsible for this? (Where do you 'set' synctex?) I suspect this is linked to using TeXShop without the external editor setting set but can't be sure from what you write.
If multiple documents are open in TeXShop, I confirm that the current code will bring up the front document (assumption that only a single document is open). It is probably possible to cover other cases but I never really had a use for them. I'd be happy to test out a fork that provides these features.
Can you clarify which program is reporting syntax errors and what these errors are? What resembles AppleScript code in Again, happy to test alternatives! |
Thanks for the detailed reply! Yeah there's a lot to cover so I'll go through them one by one, in (possibly) multiple comments I'm afraid as I can't reply all at once. I'll start with ones that I find important then.
There are two for me, one more obvious and one more subtle.
BTW, Could you paste your
I did too but I don't know why it still pops up. I also set the hidden option as instructed.
The last file I tested using the original vimtex code (i.e. without my modification) was part of a big project and TeXShop reports some "undefined macro" error, possibly due to not being able to determine the project root correctly. But I didn't investigate that further because I would not want TeXShop to do the compilation. Two compilers at once is perhaps more error-prone. At the time I simply deleted the line for the
No I think it should stay 0. Window focus is not my problem. I do use large screens with tiling window manager so changing focus will be less efficient. Tbf I think most people who use (neo)vim for production are probably savvy enough to check manually if the focus doesn't change automatically.
Yeah I do have some temporary code that does work. Will definitely put it in a PR after the issues above are sorted out. |
I'm curious, should I leave this issue open or should I close it? I'm not planning to do any action myself, as I don't even know where to start. But if it makes sense I'll leave it open for you guys to continue discussing and possibly resolve through a PR? |
Hi Karl, sorry for letting you hanging. I have been busy with my writings and perhaps still will be for a while so I don't have time for PR yet. I have temporarily reverted back to zathura seeing it's the most stable for me. Seems no one else can confirm my issue with the current code, and I know it looks like a lot of work for marginal gain due to how niche TeXShop is. You can close it if you want, and maybe if someone else encounter the same problem they can reopen it. I realize my use case may be too niche for most people as I write complex LaTeX projects (sometimes multiple branches for different submission requirements) so maybe it's best for me to just write custom rules for previewer since VimTeX also supports that. |
I don't mind keeping it open if that may be of help to you or others that want to follow up on this. I've updated the tags to make it more clear that I'm not planning to work on this myself. |
Description
I've been trying out various previewers recently due to dissatisfaction of them (unrelated to vimtex itself):
So it leads to me trying out configuring TeXShop. As it turns out, vimtex's setup seems not working for me. I dug into the source and extracted the AppleScript code and tested it. Maybe it's due to OS version (I'm on Sonoma), I'm very surprised to find out that it has syntax errors.
I modified the code and finally got it working and it seems good enough. During my testing I also found out some shortcomings of the original code:
The reason I didn't create a PR is that I don't know if the original author had other intentions and if there is compatibility issues across macos versions. And I'm also not quite familiar with PRs (only done a very tiny one before). If anyone can confirm this issue I'd be happy to submit a PR later.
Steps to reproduce
Set
g:vimtex_view_method
to"texshop"
, and launch viewer.Expected behavior
TeXShop opens with the pdf only, and forward/inverse searching working.
Actual behavior
As is, nothing shows up. I described several other issues after testing the code in the description.
Do you use a latexmkrc file?
Yes
VimtexInfo
It's irrelevant as I was able to pin the error to the AppleScript code in texshop.vim
The text was updated successfully, but these errors were encountered: