Chktex For Mac
Previously, I have written a poston how to write and compile LaTeX source code in Sublime Text. Now that I amfamiliar with Neovim, I want to do everything related to text editing insideNeovim. In this post, I would like to share how to configure Neovim for LaTeXediting and previewing.
Download the latest version of ChkTeX for TeXShop for Mac - GUI for the LaTeX semantic checker ChkTeX. Read 0 user reviews of ChkTeX for.
Before we begin, you should make sure that you have installed the followingsoftwares and plugins.
- TeX Distribution: TeX Live is preferred since it is bundled with the possible many tools you will ever need for writing LaTeX.
- Auto-complete plugin: Since I use Neovim, so I recommend using deoplete.
- Snippet Engine and snippet plugin: I recommend Ultisnips along with the many snippets provided by plugin vim-snippets.
Then we need to install the LaTeX plugin for Neovim.Vimtex is a great choice. To install it, wecan use vim-plug:
Auto-completion
In writing LaTeX source code, auto-completion is crucial for fast editing andimproves our efficiency dramatically. Vimtex supports completion for citations,labels (for figure, equation, table, section, etc.), commands, environments,packages and document classes and more. For more documentation on completion,see :h vimtex-completion
.
Vimtex can work with several completion engines such as deoplete,YouCompleteMe, ncm2.Since I use deoplete for completion, I will just introduce how to configure itfor deoplete1. To make vimtex work with deoplete, add the following settingto your init.vim
:
After that you should be able to use auto-completion.
How to quickly insert an environment?
Vimtex supports autocompletion through autocompletion engines such as deoplete.After configuring vimtex to use deoplete, you should be able to use the snippetprovided by Ultisnips2.
Ultisnips is a snippet engine, which usesvim-snippets to provide the actualsnippet for various file types. To insert an figure
environment, type fig
in insert mode and press Tab.
To insert an enumerate
environment, type enum
in insert mode and pressTab. The complete list of snippets provided by vim-snippets can befound here.
How to close an environment?
After typing begin{ENV}
, how do we automatically close it with end{ENV}
?With vimtex, you can press ]]
in insert mode to auto-close an environment.
Useful mappings and shortcuts
Vimtex provides the e
text object to facilitatevim-surround like features formanipulating an environment quickly:
cse
: change an environmentdse
: delete an environmenttse
:toggle stared environment and no-star environment, e.g., change fromequation*
toequation
and vice versa.
You can also use the standard Vim motion with this object. For example, vie
will select the inside a environment, and vae
will select the entireenvironment (including the begin and end part).
There are other shortcuts provided:
]]
: close an environment (only work in insert mode, in normal mode, itwill bring cursor to next subsection instead). After you have typedbegin{ENV}
, use]]
to auto-close it withend{ENV}
For more mappings, see :h vimtex-default-mappings
.
Jumping between references and the definition
It would be nice if we can jump to the definition of a label with the nativeVim shortcut Ctrl-]
. You have to do several things.
First, you need to install a ctags executable. See here on howto install ctags.
Second, you need to install a plugin to manage tags file for you.vim-gutentags is a goodoption. It will update the tags file automatically once the source file hasbeen changed. To make gutentags work, you need to tell it where your projectroot is. The easiest way is to make your project a git repository.
23 Jul 2012 All Download Links: Setup File(archived):- mediafiredownload. Zumas Revenge Free Download for PC (With Voice Instructions) – Duration: 3:25. Php?oqgsh3z1bbx5b6o Crack File(archived):.
Open the TeX source file again, the tags file should be created automatically.If the cursor is in ref{some_label}
, you can press Ctrl + ]
to go theposition where some_label
is defined. BTW, to jump back, you can useCtrl-T
.
Useful command
:VimtexInfo
: show all relevant info about current LaTeX project.:VimtexTocOpen
: show table of contents window:VimtexTocToggle
: toggle table of contents window:VimtexCompile
: Compile the current LaTeX source file and opens the viewer after successful compilation.:VimtexStop
: Stop compilation for the current project.:VimtexClean
: clean auxiliary files generated in compliation process.
PDF previewing
Vimtex supports several PDF viewer based on the platform. On Windows,SumatraPDF is a goodchoice. Below is the settings needed for SumatraPDF to work as the defaultviewer for the compiled PDF files.
After the above settings, if you use :VimtexCompile
command, the compiled PDFwill be opened in sumatraPDF automatically. If it does not show up, you canalso use :VimtexView
to open the PDF manually.
On Mac, you can install Skim and use it as a PDF viewer. My current settingsfor previewing PDF on Mac is:
Click to see the code.
Linting and syntax checking
I use neomake for syntax checking. For LaTeX source file, neomake providesseveral makers:
Among the makers, lacheck and chktex are installed if you have installed TexLive. Proselint can be installed via pip:
Setting up table of contents
Vimtex can show a nice little table of contents window on the left side if youuse command VimtexTocOpen
. By default, the lables in each section is alsoshown, which makes the TOC clutter with texts. We can customize TOC withfollowing settings:
For detailed meaning of the keys in the above dictionary, refer to :h g:vimtex_toc_config
.
TeX directives
If you are compiling a LaTeX source file written in non-English character. Youmay want to use the TeX directive to specify the compiling program. Vimtexsupports two TeX directives: TeX root
and TeX program
. TeX program
directive is useful when we want to compile the LaTeX source code withxelatex
instead of pdflatex
. In order to compile your LaTeX source filewith xelatex
, add the following directive to the first line of the sourcecode:
My complete settings for vimtex can be found here.
ALBUM: 2 Chainz – Pretty Girls Like Trap Music. Stream And “Listen to ALBUM: 2 Chainz – Pretty Girls Like Trap Music” “fakaza Mp3” 320kbps flexyjam cdq itunes Fakaza download datafilehost Descarger torrent zippyshare download Song.
- Setting up PDF viewer for Mac.
- TeX directives provided by different programs.
For configuring vimtex to work with other completion engines, please refer to
:h vimtex-complete-auto
. ↩︎See this post on how to configure Ultisnips for Neovim. ↩︎