Posted on :: Tags: , , ,

Everything I need to not forget. This is my basic configuration for TeXpresso on Neovim, specifically Lazyvim.

Video Example

From the TeXpresso repository.

Setup

Installation

Follow these instructions.

Configuration

In ~/.config/nvim/lua/plugins/texpresso.lua:

return {
  {
    "let-def/texpresso.vim",
    ft = "tex", -- load only for TeX files for efficiency
    config = function()
      -- Set the custom path to your texpresso binary
      require("texpresso").texpresso_path = "/home/yourname/dev/texpresso/texpresso"
    end,
  }
}

In ~/.config/nvim/lua/config/keymamps.lua:

vim.keymap.set(
  "n",
  "<leader>öt", -- Or whatever you may want to use as a keymap
  ":TeXpresso %<CR>",
  vim.tbl_extend("force", opts, { desc = "Run TeXpresso on current file" })
)

Controls

Keyboard controls:

  • ←, →: change page
  • ↑, ↓: move within the page
  • p (for "page"): switch between "fit-to-page" and "fit-to-width" zoom modes
  • c ("crop"): crop borders
  • q ("quit"): quit
  • i ("invert"): dark mode
  • I : toggle theming
  • t ("top"): toggle stay-on-top (keeping TeXpresso above the editor window)
  • b ("border"): toggle window borders
  • F5: start fullscreen presentation (leave with ESC)

Mouse controls:

  • click: select text in window (TODO: move Emacs buffer with SyncTeX)
  • control+click: pan page
  • wheel: scroll page
  • control+wheel: zoom