Tuesday, May 12, 2009

Vim and Zip files

Today, by mistake, I tried to open a zipfile using vim.
vim archive.zip
I was presented with a list of the files contained in the zipfile, and was instructed to Select a file with cursor and press ENTER. I didn't know that Vim had a zipfile brower! Very nice.

(If this doesn't work for you, you need to install the zipfile browser plugin. Google for zip.vim to find it.)

Monday, May 04, 2009

Sage prompt in color

It is possible to activate colors for sage prompts in the terminal which is done by editing the file


As said by W. Stein on sage-devel :
"It has numerous color options, which are off by default since it is not possible to tell if the user's terminal has a white or black background, and any choice of colors looks like crap if you guess wrong about the background color."
Since the background of my terminal is light, my settings are :
# keep uncommented only the one you want:
#colors Linux
colors LightBG
#colors NoColor

Installing sagetex in sage

This post describes how I installed sagetex-2.0 recently. Of course, sage was already installed on my computer as well as texlive-full. First, I installed sagetex :

sage -i sagetex-2.0

Then, I created the folder ~/.texmf/tex (for *.sty files) and I edited the file /etc/texmf/texmf.cnf by replacing the line
Then, I copied the sagetex.sty :

cp sage-3.4/examples/latex_embed/sagetex.sty ~/.texmf/tex/

and I ran the command

sudo texhash

This allowed me to use sagetex from any repository without sagetex.sty inside. I found how to do it on the Ubuntu-fr forum.