-
Notifications
You must be signed in to change notification settings - Fork 4
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
Previewer opens often in the wrong position #29
Comments
Is this with the zathura config in the wiki or another config/PDF viewer? |
Links with details for my own reference: If you worked out a configuration which works well for you please share here. I'm looking at introducing "auto configurations" for some PDF viewers (experimenting on this branch https://github.com/lnay/zed-latex/tree/auto-preview). I also hadn't come across these "tasks" in Zed up until now; I will try them as I'm curious to see if there is a convenient use case with this extension. |
Another issue it seems you came across is executing arbitrary language server requests (notably |
If you read the responses in texlab you will see that there is no current configuration that would work. |
Here's a suggestion, it does not fix the issue of building on command that you brought up elsewhere, but gives a decent result for forward-backwards search circumventing texlab, which you could adjust for skim: Create a forward search task, for me with zathura it looks like this: // .zed/tasks.json
[
{
"label": "Forward Search",
"command": "zathura --synctex-forward \"$ZED_ROW:$ZED_COLUMN:$ZED_FILE\" -x 'zed %{input}:%{line}' main.pdf",
"allow_concurrent_runs": true,
"reveal": "never"
}
] Note that this involves hard-coding the pdf file, instead of letting And then you can add a keymap for this: // ~/.config/zed/keymap.json
// ...
{
"context": "Workspace",
"bindings": {
"shift shift": ["task::Spawn", { "task_name": "Forward Search" }]
}
}
] For zathura, opening the PDF beforehand stops the window from closing and reopening every time. |
This works for Skim:
But the pdf would have the same stem as the source hardwired.
in the current file, removes "tex" at the end of file and appends pdf, and if not it uses the current file name. Roberto |
Solved for Skim
It sucks that JSON does not allow line split literals. Note that this allows a file to be opened and previewed from an included one if the included file contains a line like The Skim displaylike allows to give also a tex file name as the parameter AFTER the pdf file and this version allows to jump also to the right place FROM an included file, as long as there is a commented line containint I guess this should be included in the latex-lsp extension with an option to install the Skim.app command. Roberto |
Finding the location of the PDF file is difficult in general (for example, it can be affected values set in Here is a recap of the situation that this extension finds itself in:
This is not far off the default experience in Overleaf so is not too bad (albeit requires extra user config atm). Those last two features are held back by this Zed issue.
As for forward-search Zed tasks:
However the wiki could include examples for tasks such as the ones in this discussion, that users may inevitably need to adjust. And then when the above Zed issue is addressed, all of these problems disappear anyway. My main point is that any
I don't think any of the relevant projects that would install Skim themselves. Overreaching aside, if a tool commits to installing a PDF viewer, it would have to be an opiniated choice. Something I do see this extension doing, is testing if it can find a supported PDF viewer, setting up a config if so, otherwise notifying the user (not currently possible I believe) with a link to a wiki page suggesting various PDF viewers to install. |
Does it? Because apparently there are issues with the included files and there are bugs there. Sometimes a workaround is necessary. Many LaTeX programs have a command like
Nope, it is bad since the experience in Overleaf is bad. Even simple programs like TeXShop get precisely these features just right and TeXShop even compiles a yet-unsaved file. But I do not need the last thing. I want a file to be saved before compiling it, so build on save is fine (since it re-builds also when no save is necessary).
Too bad. Either they support what it necessary or people will have to use workarounds.
This is a zed problem. However $ZED_STEM, $ZED_ROW $ZED_DIRNAME $ZED_FILE exists for shell commands. I wonder whether they are also available for the executables passed to
So i can pass a tex file and
This is serious, but you can remove this and assume a 1-1 mapping of tex to pdf files, without inclusions, and without parsing for the
My examples were not really more than that.
Of course! I just wanted to show that this was still possible using the current state of
Any LaTeX user on macOS would use Skim since it is the only previewer that supports synctex, unless they are using TeXShop or some other environment that has a builtin previewer, or zathura, which looks anbd behaves like an extraneous body under macOS. So offering to install Skim, or telling where it is, is definitely a must-be-offered option under macOS.
This would definitely be the right way. However, under macOS, AFAIK the choices are limited. |
personal notes relating to this
That comment was made from the memory of reading this page however it turns out it was only referring to keeping the PDF view in sync. Maybe this extension could enable users to build and preview using Zed tasks completely outside of
|
[removed]
The text was updated successfully, but these errors were encountered: