系统之家 - Windows操作系统&装机软件下载网站!

当前位置: 首页  >  教程资讯  >  电脑教程 centos 6.4系统使用vim-latex排版

centos 6.4系统使用vim-latex排版

时间:2023-06-02 16:16:41 来源: 人气:

 一、简介,这个工具就写简历来说跟MS word差不多,而我为什么要学这个呢?装13!!关于latex的信息信息自行百度。,二、选择工具,工具有很多CTex,TurboTex,VTex等等,而我作为一个vim的爱好者,当然选择vim-latex这个插件,在vim里面工作了。,三、安装vim-latex,将下载下来的最新版,vim-latex-1.8.23-20130116.788-git2ef9956.tar.gz 直接解压到 ~/.vim 中,如果是vim高级用户可以自己安装到vim的目录中。,[root@localhost Latex]# ls ~/.vim,compiler  ftplugin  latextags  Makefile     plugin,doc       indent    ltags      Makefile.in  view,四、vim配置,(1)vimrc中与latex相关的配置,1 " 使grep总是生成文件名,2 set grepprg=grep -nH $*,3 " vim默认把空的tex文件设为plaintex而不是tex,导致latex-suite不被加载,4 let g:tex_flavor=latex,5 set iskeyword+=:,6 autocmd BufEnter *.tex set sw=2,(2)修改 ~/.vim/ftplugin/latex-suite/texrc文件,86 if has(macunix),87     TexLet g:Tex_DefaultTargetFormat = pdf,88 else,89     TexLet g:Tex_DefaultTargetFormat = pdf "都生成pdf,也可以是默认的dvi,90 endif,...,115 TexLet g:Tex_CompileRule_pdf = pdflatex -interaction=nonstopmode $*  "也可以用xelatex等其他的工具进行编译 117行下的工具在linux下一般都有,145 TexLet g:Tex_ViewRule_pdf = evince  "是使用一个软件来打开pdf文件。这个软件可以自行下载其他的 evince在linux中有,五、配置快捷键,(1)默认快捷键,默认在Normal模式中输入  ll (compile编译tex文件) lv (查看编译出来的pdf文件) 这两个快捷键比较常用,具体快捷键在哪里定义我还不清楚,这两个还是看别人的博客的。在文档里面应该有,不过英语水平有限。关于这个反斜杠 其实是一个 可以自己定义 let mapleader = "," 或 let g:mapleader="," 就变成了  ,ll  ,lv 了。   ll 的定义应该是这样的 nmap ll  :vim-latex关联上的函数,(2)其他有用的快捷键 ,Ctrl-X Ctrl-K        根据字典补全,K            对当前光标下的单词进行man,nmap  :%s//s/+$//         "删除行末多余空字符,nmap  [i                      "显示当前变量的定义,nmap  :TlistToggle        "打开tag窗口,nmap  gg=G                  "格式化整个文件,为误用,特意加shift键,nmap  =a{                     "格式化当前{}之内的文本,nmap  :cs find d =expand("")       ,"查找本函数调用的函数,nmap  :cs find c =expand("")       ,"查找调用指定函数的函数,nmap  :make              "make 当前目录的文件,nmap :cnext             "跳到下一个编译错误,nmap :cc                "看完整的错误信息,nmap :clist             "看所有错误信息 ,        临时取消快捷键的定义,这个要记住,一般用在缩写ab命令或者,六、例子, 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 is my first {LaTeX} typesetting example., 6 This is my first LaTeX{} typesetting example., 7 This is my first LaTeX typesetting example., 8 I am Mr. Edward G.J. Lee, G.J. is a abbreviation of my name., 9 I am Mr. Edward G.J. Lee, G.J. is a abbreviation of my name.,10 Please see Appendix A. We will be there soon.,11 Please see Appendix Anull. We will be there soon.,12 end{document},也可以手动编译,1latex example1.tex => 产生 example1.dvi,2dvips -Ppdf example1.dvi => 产生 example1.ps
ps2pdf example1.ps => 产生 example1.pdf
dvipdfm[x] example1.dvi => 由example1.dvi 直接产生 example1.pdf 或
pdflatex example1.tex => 由example1.tex 直接产生 example1.pdf
evince example1.pdf 在X11下查看pdf文件,

作者

教程资讯

电脑教程排行

系统教程

系统主题