CentOS 6.4 system uses Vim-latex typesetting

Source: Internet
Author: User
Tags definition centos

First, Introduction

This tool is about the same as MS Word, and why should I learn it? Pack 13!! About Latex information information on its own Baidu.

Second, the choice of tools

Tools have a lot of ctex,turbotex,vtex and so on, and I as a vim enthusiasts, of course, choose Vim-latex This plugin, in vim inside work.

Iii. installation of Vim-latex

Will download the latest version of

Vim-latex-1.8.23-20130116.788-git2ef9956.tar.gz is extracted directly into the ~/.vim, if VIM advanced users can install themselves into Vim's directory.

[Root@localhost latex]# ls ~/.vim

Compiler Ftplugin Latextags Makefile Plugin

Doc indent Ltags makefile.in view

Four, VIM configuration

(1) configuration related to latex in VIMRC

1 "Make grep always generate file name

2 Set Grepprg=grep-nh $*

3 "Vim defaults to set the empty Tex file to Plaintex instead of Tex, causing the Latex-suite not to be loaded

4 let g:tex_flavor= ' latex '

5 Set iskeyword+=:

6 autocmd bufenter *.tex set sw=2


If has (' Macunix ')

Texlet G:tex_defaulttargetformat = ' pdf '

Or else

The Texlet G:tex_defaulttargetformat = ' pdf ' generates PDFs, or it can be the default DVI



Texlet g:tex_compilerule_pdf = ' Pdflatex-interaction=nonstopmode $* ' can also be compiled with other tools such as Xelatex 117 line tools under Linux generally have

145 Texlet g:tex_viewrule_pdf = ' evince ' is the use of a software to open a PDF file. This software can download the other evince in Linux

Five, configure shortcut keys

(1) Default shortcut keys

Default in normal mode input LL (compile compiled Tex file) LV (view compiled PDF file) The two shortcuts are more commonly used, specific shortcut keys where the definition I still do not know, the two are still looking at someone else's blog. In the document should have, but the English proficiency is limited.   About this backslash is actually a <leader> can define let Mapleader = "," or lets G:mapleader= "," became, LL, LV. ll's definition should be like this Nmap <leader>ll:vim-latex Association on the function <cr>

(2) Other useful shortcut keys

Ctrl-x Ctrl-k According to the dictionary complement

K to the word under the current cursor man

Nmap <silent> <F2>:%s//s/+$//<cr> "Delete extra null characters at end of line

Nmap <silent> <F3> [i] shows the definition of the current variable

Nmap <silent> <F4>:tlisttoggle<cr> "open Tag window

Nmap <silent> <F5> gg=g "format the entire file for misuse, with the SHIFT key specially added

Nmap <silent> <F6> =a{"format text within current {}"

Nmap <silent> <F7>: CS Find D <c-r>=expand ("<cword>") <CR><CR>

"Find the function called by this function

Nmap <silent> <F8>: CS Find C <c-r>=expand ("<cword>") <CR><CR>

"Find the function that calls the specified function

Nmap <silent> <F9>:make<cr> "Make current directory files

Nmap <silent> <F10>:cnext<cr> "Skip to Next compilation error

Nmap <silent> <F11>:cc<cr> "See the Complete error message

Nmap <silent> <F12>:clist<cr> "See all error messages

<Ctrl-v> temporarily remove the definition of shortcut keys, this should be remembered, generally used in the abbreviation AB command or <leader>

Vi. examples

1 $Id: Example1.tex,v 1.2 2004/01/19 23:29:39 edt1023 EXP $

2% Example1.tex

3 Documentclass{report}

4 Begin{document}

5 This are my LaTeX} typesetting example.

6 This is my latex{} typesetting example.

7 This is my LaTeX typesetting example.

8 I am Mr Edward g.j Lee, G.J. is a abbreviation to my name.

9 I am Mr Edward g.j Lee, G.J. is a abbreviation to my name.

Please appendix A. We'll be there soon.

Please appendix Anull. We'll be there soon.


You can also manually compile

1latex Example1.tex => Generation Example1.dvi

2dvips-ppdf example1.dvi => produce example1.ps <br>ps2pdf example1.ps => produce example1.pdf <br>dvipdfm[x] Exa Mple1.dvi => is directly produced by Example1.dvi Example1.pdf or <br>pdflatex Example1.tex by => Example1.tex Lt;br>evince example1.pdf view PDF file under X11

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.