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

Open documentation using local texdoc command #2300

Closed
matthiasbe opened this issue Jan 20, 2022 · 1 comment
Closed

Open documentation using local texdoc command #2300

matthiasbe opened this issue Jan 20, 2022 · 1 comment

Comments

@matthiasbe
Copy link

Is your feature request related to a problem? Please describe it.
I recently discovered the tool texdoc in texlive. When executing :VimtexDocPackage in neovim, this opens a web page in my browser on the https://texdoc.org website. This is quite nice ! However in the case of lacking internet connection, or because it is preferable to open local resources when possible, it would be nice to open the PDF documentation locally, as the behavior of the texdoc <package_name> command.

Describe the solution you'd like
It would be great to have an option to launch documentation request locally, instead of fetching them online.
Firing :VimtexDocPackage <package_name> in vim would open the PDF related to the package.

Additional context
Link to the texdoc package

Apologies if this is already addressed somewhere else, or if this is already present in the program. After some research I didn't find anything in the doc, nor in the issues.

lervag added a commit that referenced this issue Feb 3, 2022
@lervag
Copy link
Owner

lervag commented Feb 3, 2022

This was more or less already available. However, I've simplified the setup and you can now use a local texdoc handler with this:

let g:vimtex_doc_handlers = ['vimtex#doc#handlers#texdoc']

See also :help g:vimtex_doc_handlers for more info. It should be not so hard to implement a custom handler if you want even more flexibility.

For reference, see also #655.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants