{"id":13419957,"url":"https://github.com/xuhdev/vim-latex-live-preview","last_synced_at":"2025-03-04T02:44:46.712Z","repository":{"id":3302331,"uuid":"4344069","full_name":"xuhdev/vim-latex-live-preview","owner":"xuhdev","description":"A Vim Plugin for Lively Previewing LaTeX PDF Output","archived":false,"fork":false,"pushed_at":"2023-09-25T07:35:39.000Z","size":400,"stargazers_count":836,"open_issues_count":25,"forks_count":73,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-14T07:23:17.676Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuhdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-05-16T06:12:36.000Z","updated_at":"2025-01-13T08:00:11.000Z","dependencies_parsed_at":"2022-07-14T10:48:28.898Z","dependency_job_id":"8ca05b09-9c75-444a-8c3b-86850156b290","html_url":"https://github.com/xuhdev/vim-latex-live-preview","commit_stats":{"total_commits":60,"total_committers":14,"mean_commits":4.285714285714286,"dds":0.5,"last_synced_commit":"afdf3f4778119f0bfacb07629d0155d58eb5562a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhdev%2Fvim-latex-live-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhdev%2Fvim-latex-live-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhdev%2Fvim-latex-live-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhdev%2Fvim-latex-live-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuhdev","download_url":"https://codeload.github.com/xuhdev/vim-latex-live-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241773255,"owners_count":20018064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:23.416Z","updated_at":"2025-03-04T02:44:46.694Z","avatar_url":"https://github.com/xuhdev.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Tutorial","Vim script","Editors"],"sub_categories":["Windows Manager","General purpose text editors"],"readme":"A Vim Plugin for Lively Previewing LaTeX PDF Output\n===================================================\n\nThis plugin provides a live preview of the output PDF of your LaTeX file. The\ndisplay of the output PDF file will be updated lively as you type (just hold\nthe cursor and you will see the PDF file updated). Currently,\nvim-latex-live-preview only support UNIX-like systems. [Please let me know if\nyou have any suggestions.](.github/CONTRIBUTING.md)\n\nTable of Contents\n-----------------\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Known issues](#known-issues)\n- [Screenshot](#screenshot)\n\nInstallation\n------------\n\nBefore installing, you need to make sure your Vim version is later than 7.3,\nand is compiled with `+python` feature.\n\n### [vim-plug](https://github.com/junegunn/vim-plug)\n\nAdd the plugin in the vim-plug section of your `~/.vimrc`:\n\n```vim\ncall plug#begin('~/.vim/plugged')\n[...]\n\" A Vim Plugin for Lively Previewing LaTeX PDF Output\nPlug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }\n[...]\ncall plug#end()\n```\n\nThen reload the config and install the new plugin. Run inside `vim`:\n\n```vim\n:so ~/.vimrc\n:PlugInstall\n```\n\n### [Vundle](https://github.com/VundleVim/Vundle.vim)\n\nAdd the plugin in the Vundle section of your `~/.vimrc`:\n\n```vim\ncall vundle#begin()\n[...]\n\" A Vim Plugin for Lively Previewing LaTeX PDF Output\nPlugin 'xuhdev/vim-latex-live-preview'\n[...]\ncall vundle#end()\n```\n\nThen reload the config and install the new plugin. Run inside `vim`:\n\n```vim\n:so ~/.vimrc\n:PluginInstall\n```\n\n### Manually\n\nCopy `plugin/latexlivepreview.vim` to `~/.vim/plugin`.\n\nUsage\n-----\n\nSimply execute `:LLPStartPreview` to launch the previewer. Then try to type in\nVim and you should see the live update. The updating time could be set by Vim's\n['updatetime'][] option. If your pdf viewer crashes when updates happen, you can\ntry to set 'updatetime' to a higher value to make it update less frequently. The\nsuggested value of 'updatetime' is `1000`.\n\nIf the root file is not the file you are currently editing, you can specify it\nby executing `:LLPStartPreview \u003croot-filename\u003e` or executing `:LLPStartPreview`\nwith the following declaration in the first line of your source file:\n\n```latex\n% !TEX root = \u003croot-filename\u003e\n```\n\nThe path to the root file can be an absolute path or a relative path, in which\ncase it is **relative to the parent directory of the current file**.\n\n:warning: if `\u003croot-filename\u003e` contains special characters (such as space), they\nmust be escaped manually.\n\nConfiguration\n-------------\n\n### PDF viewer\n\nBy default, you need to have [evince][] or [okular][] installed as pdf viewers.\nBut you can specify your own viewer by setting `g:livepreview_previewer`\noption in your `.vimrc`:\n\n```vim\nlet g:livepreview_previewer = 'your_viewer'\n```\n\nPlease note that not every pdf viewer could work with this plugin. Currently\nevince and okular are known to work well. You can find a list of known working\npdf viewers [here](https://github.com/xuhdev/vim-latex-live-preview/wiki/Known-Working-PDF-Viewers).\n\n### TeX engine\n\n`LLP` uses `pdflatex` as default engine to output a PDF to be previewed. It\nfallbacks to `xelatex` if `pdflatex` is not present. These defaults can be\noverridden by setting `g:livepreview_engine` variable:\n\n```vim\nlet g:livepreview_engine = 'your_engine' . ' [options]'\n```\n\n### TeX Inputs\n\nTeX engines use the environment variable `TEXINPUTS` to search for packages and\ninput files (`\\usepackage{pkg}` or `\\input{filename}`). LLP passes this\nenvironment variable to the compiler by default.  The default can be overridden\nby setting the `g:livepreview_texinputs` variable:\n\n```vim\nlet g:livepreview_texinputs = '/path1/to/files//:/path2/to/files//'\n```\n\nNote:  The double trailing `/` tells the compiler to search subdirectories.\n\n### Bibliography executable\n\n`LLP` uses `bibtex` as the default executable to process `.bib` files. This can\nbe overridden by setting the `g:livepreview_use_biber` variable.\n\n```vim\nlet g:livepreview_use_biber = 1\n```\n\nPlease note that the package `biblatex` can use both `bibtex` and the newer\n`biber`, but uses `biber` by default. To use `bibtex`, add `backend=bibtex`\nto your `biblatex` usepackage declaration.\n\n```latex\n\\usepackage[backend=bibtex]{biblatex}\n```\n\nPlease note that `biblatex` will NOT work straight out of the box, you will\nneed to set either `g:livepreview_use_biber` or `backend=bibtex`, but not both.\n\n\n### Autocmd\n\nBy default, the LaTeX sources will be recompiled each time the buffer is written\nto disk, but also when the cursor holds. To prevent recompilation on cursor\nhold (autocmd events `CursorHold` and `CursorHoldI`), use the feature flag:\n\n```vim\nlet g:livepreview_cursorhold_recompile = 0\n```\n\nKnown issues\n------------\n\n### Swap error\n\nAn error `E768: Swap file exists` may occur. See\n[issue #7](https://github.com/xuhdev/vim-latex-live-preview/issues/7) to avoid\nswap filename collision.\n\n### Project tree\n\nCurrently, root file must be in the same directory or upper in the project tree\n(otherwise, one has to save file to update the preview).\n\n### E492: Not an editor command: LLPStartPreview\n\nSee [issue #12](https://github.com/xuhdev/vim-latex-live-preview/issues/12),\nprovided the plugin is correctly installed, this is likely a **Python** issue.\n\n### Python-related issues\n\nSee [issue #24](https://github.com/xuhdev/vim-latex-live-preview/issues/24),\ncurrently `vim-latex-live-preview` does not support `python/dyn` and Vim\nmust be recompiled with Python support.\n\n### Bibliography issues\n\nWhy doesn't my bibliography appear, with or without an error?\n\nSee [issue #46](https://github.com/xuhdev/vim-latex-live-preview/issues/46) and \n[PR #99](https://github.com/xuhdev/vim-latex-live-preview/pull/99).\nIf you're using `biblatex` this is most likely caused by not also setting \n`g:livepreview_use_biber = 1` in your `.vimrc`. Or if you intended to use\n`bibtex` not using that option when using the `biblatex` package. i.e.\n\n```latex\n\\usepackage[backend=bibtex]{biblatex}\n```\n\n\nScreenshot\n----------\n\n![Screenshot with Evince](misc/screenshot-evince.gif)\n\n\u003c!--\nThe screenshot is at ./misc/screenshot-evince.gif\n--\u003e\n\n['updatetime']: http://vimdoc.sourceforge.net/htmldoc/options.html#%27updatetime%27\n[evince]: http://projects.gnome.org/evince/\n[okular]: http://okular.kde.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhdev%2Fvim-latex-live-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuhdev%2Fvim-latex-live-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhdev%2Fvim-latex-live-preview/lists"}