neotex


Ⅰ. 插件描述

latex live preview - plugin for neovim and vim 8

Ⅱ. 基本信息

创建日期:  2016-12-05
使用用户:  15
Github星:  155
插件作者:  donRaphaco

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'donraphaco/neotex'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'donraphaco/neotex'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'donraphaco/neotex'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/donraphaco/neotex

Ⅳ. 文档说明

# NeoTex

This plugin compiles latex files asynchronously while edditing.

The PDF output gives a live preview of your document as you type.

You have the option to highlight changes from the previous save using latexdiff.

Update: Now working on NeoVim and Vim 8

live preview of a latex document

Demo1 gif

live preview with latexdiff

Demo2 gif

Installation

Install using the plugin manager you like.

For example vim-plug:

Plug 'donRaphaco/neotex', { 'for': 'tex' }

Usage

For live previewing your latex file open the created PDF using a PDF viewer which supports auto reloading (I recommend zathura or evince).
The PDF is created in the same folder where your latex file is stored.

Options

OptionDefaultDescription
g:neotex_enabled10 = always disabled, 1 = default off, 2 = default on
g:neotex_delay1000Update intervall in milliseconds
g:neotex_latexdiff0enable latexdiff
g:neotex_latexdiff_options-additional options for latexdiff
g:neotex_pdflatex_add_options-additional options for pdflatex (-jobname=<filname> and -interaction=nonstopmode is always set)
g:neotex_pdflatex_alternative-alternative for pdflatex (e.g. xelatex or lualatex)
g:neotex_subfile0experimental support for subfiles (#8) (latexdiff won't work if enabled!)

I also recommend setting let g:tex_flavor = 'latex', which can prevent some issues. (see :h g:tex_flavor for information)

Commands

CommandDescription
:NeoTexCompile current buffer (asynchronously and without writing the file)
:NeoTexOnTurn live compilation on (for current buffer)
:NeoTexOffTurn live compilation off (for current bufffer)

Tipp

For better performance use a precompiled preamble.

添加新评论