codemagic
  • Home
  • About.me
  • Resume
  • Blog

Latex   with   vim   using   latex-box

1/6/2014

0 Comments

 
                  The quest to integrate two powerful tool, Vim and LaTeX started when I wanted to make a new resume ,  which would look neat and crisp. 
                   I started looking in the internet for the answers,surprisingly there was no clear documentation or procedure to start in spite of both being more than a decade old. After all the search for many days I figured out a way and thought it would be better if some how I could provide few guidelines so that you could have a quick start and explore the power of both.
                  LaTeX can be used by downloading several tools like TexMaker, LyX and Kile.  But none of them has the power of Vim.There are three popular plugins for Vim according to Redditors.
1. Vim-LaTeX      oldest,heavy, complex and feature rich.
2. LaTeXBox        light and simple.
3. Automatic LaTeX Plugin  heavy and simple.
I found LaTeX Box was the fastest and easiest to use LaTeX. But it only works if the Vim's ClientServer features has been installed in Vim. To check ,

"vim -h | grep servername"

If you don't have the feature, then need to compile the "huge" version of vim. 

Installation Instructions
1. Download Vim from here
2. before installing "huge" version run this command

sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \ libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ libcairo2-dev libx11-dev libxpm-dev libxt-dev

Huge means all features are enabled. The features are enabled based on checking the  dependencies.if you don't have these packages installed then you would not have the complete feature rich Vim.
3  Configure and make the code

./configure --with-features=huge --enable-gui=gnome2 --enable-cscope 
make
make install

4. Recheck your vim installation, and check for +clientserver

vim --version | grep clientserver

LaTeX Box depends on latexmk and texlive. These are the compilers of LaTeX . You can install them simply by calling the  package manager.

sudo apt-get install latexmk texlive

now Install  the LatexBox using Vundle(package manager for vim) . follow the link to install Vundle.

Bundle "LaTeX-Box"
BundleInstall

The whole installation process is done. You can start using the plugin by opening a TeX file with servername option 

vim --servername <servername> <TeX file>

You can start compiling the code with "\ll" (leader L L) , view the pdf file by "\lv" (leader L V) and check errors with "\le" (leader L E). Enjoy using LaTeX and Vim together.
0 Comments



Leave a Reply.

    Author

    Kaushal Bondada

    Archives

    January 2014

    Categories

    All
    C++
    Latex
    Machine Learning
    Matlab
    Python
    Vim

    RSS Feed

Powered by Create your own unique website with customizable templates.