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

vim colorschemes

1/1/2014

0 Comments

 
                 I recently started using vim and got to know its amazing capabilities. While I was going through my mail stack, I stumbled on a mail from my adviser about the vim-plugin called "Solarized". I added the plugin. The color scheme was great but the comments were over highlighted instead of getting dissolved in the background.
                  So, I started browsing the net  for some different color schemes. Where I found a GitHub repo called vim-"colorschemes" by flazz. Its  a wonderful plugin which adds around 400+ vim color schemes into your system. You can just use the command : colorscheme <nameofthecolorscheme> to change the color scheme you want and if everything seems right you could add it to your ".bashrc".
                 If you still  cannot stop your cravings for the color schemes, then there is another easier way out. There is a site called "vivify" which allows you to create your own color scheme. It has a very neat UI , showing how the color scheme would look for different languages. You could Download the color scheme and add it to .vim/bundle/vim-colorschemes, if you have already gone through the above steps. If not then add it to .vim/colors. And then load the color scheme using command : colorscheme <nameofthecolorscheme> and enjoy the color schemes.
0 Comments

    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.