Skip to content

muellerbernd/latex-previewer.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

latex-previewer Plugin for neovim

latexmk setup

  • change your latexmk config $HOME/.latexmkrc
$dvi_previewer = 'start xdvi -watchfile 1.5';
$ps_previewer  = 'start gv --watch';
$pdf_previewer = 'start zathura';
  • set zathura as default viewer

zathura setup

  • change your zathura config $HOME/.config/zathura/zathurarc
set synctex true
set synctex-editor-command "nvr --remote-silent +%{line} %{input}"
  • enable synctex set synctex-editor-command, needed for backward search (zathura to neovim)

backward search

  • ctrl + left click in pdf opens source file

latex build command

latexmk -pdf -interaction=nonstopmode -pvc -quiet -synctex=1 -shell-escape <my_main_file>.tex
  • run latexmk
  • -pdf output pdf
  • -synctex=1 enable synctex
  • -pvc continuously checking all input files for changes and re-compile the whole document if needed and always display the result
  • more information here

magic comments

  • add the following to your latex files in the very first line
% !TEX root = <my_main_file.tex>
  • you need to set the path to your main latex file, so that the plugin can show the correct preview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages