Notes on Ubuntu (Linux) computing

Brief notes on installation, setup and other tasks in the Ubuntu world

Posts Tagged ‘LaTeX

Install vim-template vim plugin

leave a comment »

The vim-template plugin allows for the use of templates for different file types: *.html, *.py and so on. Following the installation instructions (see above link), we use pathogen to install the plugin:

cd ~/.vim/bundle
git clone git://github.com/aperezdc/vim-template.git

Use of plugin

Now, you can make use of the templates when starting vim. For example, a python template is loaded by recognition of the *.py filename:

vim test.py

Or, if you have new buffer, type the following for the template to be loaded inside vim:

:Template py

The available templates can be seen here. Using the pathogen installation described above, these templates are located (on your machine) at ~/.vim/bundle/vim-template/templates/.

Customization

If you want to customize certain fields, like email and username, you can add the following to your .vimrc file:

" Customize the settings for vim-template plugin                                
let g:email = "desiredemail@gmail.com"
let g:user = "Desired Name"                                         
let g:license = "Desired License"

If you want to customize the templates, there is a search order for templates (see here) allowing you to write your own template-files and store them in the local directory.

Advertisements

Written by Chris S

November 7, 2013 at 7:28 pm

Posted in computing, Java, LaTeX, Python, R

Tagged with , , , ,

Install Tagbar vim plugin

leave a comment »

The vim plugin Tagbar provides a listing of classes, functions, etc when coding in vim.

Tagbar requires Vim 7.0 and Exuberant ctags 5.5. We install the later in Ubuntu 12.04 with the command

sudo apt-get install exuberant-ctags

Next, install tagbar with pathogen

cd ~/.vim/bundle
git clone git://github.com/majutsushi/tagbar

Toggle the code browser between visible and hidden using

:TagbarToggle

Testing with *.py and *.tex files indicate the basics are working.

Written by Chris S

April 12, 2013 at 8:21 pm

pdftk on Ubunt 12.04

leave a comment »

pdftk is a wonderful (command line) tool for manipulating pdf documents in all kinds of ways. See the list of examples at this page to get an idea of what can be done.

To install the version in the repository type

sudo apt-get install pdftk

As an example, I often like to combine many pdf plots into a single document to make viewing easier. This can be done with the command

pdftk *.pdf cat output combinedplots.pdf

This takes all pdfs in the directory and creates a single file called combinedplots.pdf — the source pdfs are not changed, only the new, merged document is created.

Written by Chris S

January 1, 2013 at 7:24 pm

Install IPython notebook in Ubuntu 12.04

leave a comment »

IPython allows for the use of Python in a way that is interactive (similar to matlab or mathematica), allowing for the creation of nice tutorials and examples — really I am talking about the html notebooks. In Ubuntu 12.04, the install should be simple (I will not install from source), using the repository version to find all dependencies:

sudo apt-get install ipython-notebook

To start an html-notebook session with inline graphics, use

ipython notebook --pylab inline

Written by Chris S

November 14, 2012 at 12:01 am

Posted in Python, Ubuntu 12.04

Tagged with , , ,

Install Geany 1.22 on Ubuntu 12.04

with 10 comments

Update 2013-04-11: I recently started to have `partial upgrade’ issues with this ppa (it seems like the plugins did not build for 64bit machines). This caused update issues with other, more important parts of Ubuntu. As a result, I removed geany, geany-plugins and the ppa. I would carefully investigate before using the ppa.

In a previous post I installed Geany from the repository. A new version is available with plugins — I will install using the details described here and here for the plugins (and color schemes, if desired).

Note: I removed the repository version of Geany before the install — you only need to do this is you have already installed an earlier Geany version. The remove command with apt-get is (this removes the application while preserving the configuration files)

sudo apt-get remove geany

The following commands will add the ppa and install Geany along with the plugins:

sudo add-apt-repository ppa:geany-dev/ppa
sudo apt-get update
sudo apt-get install geany geany-plugins

Written by Chris S

November 9, 2012 at 6:09 pm

Install JabRef

leave a comment »

JabRef is a Java-based reference manager with an emphasis on LaTeX. Installation involves downloading the *.jar file (find a link to the most current version here).

Change permission on file to allow execution (of course, use your version of JabRef jar):

chmod u+x JabRef-2.8.1.jar

Starting JabRef from the command line is done with:

java -jar JabRef-2.8.1.jar

In practice, it is probably best to create a launcher for the application.

Written by Chris S

October 12, 2012 at 10:45 pm

Install geany

with one comment

Geany is a simple development environment that I use for both python and latex. This is in the repository and easy to install:

sudo apt-get install geany

Written by Chris S

October 10, 2012 at 9:12 pm

Posted in LaTeX, Python, Ubuntu 12.04

Tagged with , , ,