Skip to content

Latex Support

Liv edited this page Oct 1, 2023 · 1 revision

Enable Latex Support

🧪 Tested on MacOS Sonoma 14.0

Prerequisites

  1. PDF Latex which has been changed to basictex

  2. Latexmk.

  3. Skim.

Installation

First, install basictex

brew install --cask basictex

After installing basictex, you will need to quit your shell program. This will automatically install tlmgr, which is a package manager for latex.

Before Downloading latexmk, you will need to update tlmgr. This is made with the sudocommand because the directory where it's placed is not writable on mac by default.

sudo tlmgr update --self

Now we proceed to install latexmk.

sudo tlmgr install latexmk

Here is how to set up Skim to work with Neovim running VimTeX.

  • You will need Skim installed.

  • After making sure your Skim version is up to date, enable automatic document refreshing (so Skim will automatically update the displayed PDF after each compilation) by opening Skim and navigating to Settings > Sync. Then select Check for file changes and Reload automatically.

Configure VimTex

Place the following code in an appropriate config file:

return {
  -- VImTex configuration
  {
    'lervag/vimtex',
    init = function ()
      vim.g.vimtex_view_method = "skim"
    end,
    event = "BufRead",
  },
}
Clone this wiki locally