主机平台:Gentoo Linux 11.2
内核版本:Linux Kernel 3.2.1
编译环境:XeTeX 3.1415926-2.3-0.9997.5 (TeX Live 2011)
相关阅读:LaTeX使用–XeLaTeX入门基础(一)
1、首先是vim-latex插件的安装
去?subject=download&title=Download官方下载插件包
将其解压到~/.vim目录下,注意这里是将包文件加中的文件和文件夹放在.vim目录下。
追加~/.vimrc中
“REQUIRED.ThismakesviminvokeLatex-Suitewhenyouopenatexfile. filetypepluginon “IMPORTANT:win32userswillneedtohave’shellslash’setsothatlatex “canbecalledcorrectly. setshellslash “IMPORTANT:grepwillsometimesskipdisplayingthefilenameifyou “searchinasingefile.ThiswillconfuseLatex-Suite.Setyourgrep “programtoalwaysgenerateafile-name. setgrepprg=grep\-nH\$* “OPTIONAL:Thisenablesautomaticindentationasyoutype. filetypeindenton “OPTIONAL:StartingwithVim7,thefiletypeofempty.texfilesdefaultsto “‘plaintex’insteadof’tex’,whichresultsinvim-latexnotbeingloaded. “Thefollowingchangesthedefaultfiletypebackto’tex’: letg:tex_flavor=’latex’
添加 ~/.vim/ftplugin/tex.vim中
“thisismostlyamatteroftaste.butLaTeXlooksgoodwithjustabit “ofindentation. setsw=2 “TIP:ifyouwriteyour\label’sas\label{fig:something},thenifyou “typein\ref{fig:andpress<C-n>youwillautomaticallycyclethrough “allthefigurelabels.Veryuseful! setiskeyword+=:
由于我是使用xelatex编译pdf文件,然后使用evince查看pdf文件,所以需要修改~/.vim/ftplugin/latex-suite/texrc文件
为了简单设置所有的TexLet g:Tex_DefaultTargetFormat = ‘pdf’
设置所有的TexLet g:Tex_ViewRule_pdf = ‘evince’
设置TexLet g:Tex_CompileRule_pdf = ‘xelatex -interaction=nonstopmode $*’
重启vim即可。
常用快捷键
\ll 采用xelatex编译文档\lv 使用evince预览生成的pdf文档F5 插入数学公式环境,主要包括eqnarray,equation,align,$$F7 插入引用,包括footnote,cite,pageref,,labelshift+F5 变更插入环境shift+F7 变更插入引用
下面就使用上面配置的环境来测试学习。
2、交叉引用
\section{交叉引用} 24Thisisaref\label{sec:this}example.Seesection~\ref{sec:this}onthepage~\pageref{sec:this}
3、强调
\section{强调} 我的\emph{LinuxIDC.com}地址:\underline{}
属于自己的不要放弃,已经失去的留作回忆。