vim患者之LaTeX in neovim

安装 mactex

下载地址:
https://tug.org/mactex/

补全

安装lsp

  • 首先安装
    :CocInstall coc-texlab

  • 安装服务器

预览

pdf阅读器 git

安装zathura

使用brew

brew tap zegervdv/zathura
brew install zathura

# plug
$ brew install zathura-pdf-poppler
$ mkdir -p $(brew --prefix zathura)/lib/zathura
$ ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib

# For mupdf:
$ brew install zathura-pdf-mupdf
$ mkdir -p $(brew --prefix zathura)/lib/zathura
$ ln -s $(brew --prefix zathura-pdf-mupdf)/libpdf-mupdf.dylib $(brew --prefix zathura)/lib/zathura/libpdf-mupdf.dylib

集成在本机

# unlink installed zathura and girara
brew unlink girara
brew unlink zathura

# install HEAD
brew install girara --HEAD
brew install zathura --HEAD
mkdir -p $(brew --prefix zathura)/lib/zathura
ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib
```   vcbgjhknjmk,aqswderx.   
### macports
macports [macport](https://www.macports.org/install.php)

https://jdhao.github.io/2019/03/26/nvim_latex_write_preview/

## 补全
https://github.com/neoclide/coc-vimtex

offical method

  1. brew install dbus
Q: Does Zathura + VimTeX work on macOS?
A: Yes, it should work.  The following recipe has been reported to work [0].
   The steps assume the user has installed and knows how to use Homebrew [1].

   1. Zathura needs `dbus` to work properly. Install it with the following:
      `brew install dbus`, or, if it is already installed, reinstall (this
      seems necessary for some unknown reason): `brew reinstall dbus`

   2. Add this to your `.bashrc` or `.zshrc` file (or similar): >
      export DBUS_SESSION_BUS_ADDRESS="unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET"
<
   3. Changed the value of `<auth><\auth>` in
      `/usr/local/opt/dbus/share/dbus-1/session.conf` from `EXTERNAL` to
      `DBUS_COOKIE_SHA1`.

   4. Run `brew services start dbus`

   5. Now install Zathura (most recent version, aka HEAD): >
      brew tap zegervdv/zathura
      brew install girara --HEAD
      brew install zathura --HEAD --with-synctex
      brew install zathura-pdf-poppler
      mkdir -p $(brew --prefix zathura)/lib/zathura
      ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib
<
   6. Reboot and enjoy.

   Note: If you already had Zathura and girara installed and things don't
         work, then first uninstall and unlink them and try to follow the
         above steps from step 1.

   [0]: https://github.com/lervag/vimtex/issues/1737#issuecomment-759953886
   [1]: https://brew.sh
	

latex #mac

posted @ 2022-02-13 13:19  勒勒乐了  阅读(239)  评论(0)    收藏  举报