Free FreeHand organization

Wednesday, December 30th, 2009

Help them (freefreehand.org)!

Update on the usage of gvim + xdvi

Monday, December 21st, 2009

This is an update to the entry about gvim + xdvi. I found out why the forward search did not work: It was as always a trivial reason… I forgot to set the viewer for dvi to xdvi. So, the following lines in .vimrc will enable forward and inverse search with gvim and xdvi

let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode --src-specials $*'
let g:Tex_ViewRule_dvi = 'xdvi'
let g:Tex_ViewRuleComplete_dvi = 'xdvi -editor "gvim --servername xdvi --remote +\%l \%f" $* &'

(I forgot the second line last time)

You have to launch gvim and xdvi using

gvim --servername xdvi file.tex
xdvi -editor "gvim --servername xdvi --remote +%l %f" file.dvi

These days, I’m using latexmk and it’s great! Next time, I’ll write down how to use it with gvim and xdvi.

Running Mathematica (or other computations) in background

Thursday, April 23rd, 2009

From time to time (unfortunately) I want/have to run long Mathematica calculations. Since my office machine is quite strong (or at least faster than my machine), I want to do the computation on that machine. To start a background Mathematica calculation on Linux machines do the following: First log in to your machine using ssh. Then start “screen”. “screen” will enable you to log-off even when the calculation is running. Thus, this works for any kind of computations (I think there is another Linux trick to do this, but I don’t remember). If you’re using Linux everyday, it’s worth to learn how to use “screen”. Your efficiency will increase by a factor of 10^500. :-) Create a plain text file, say, with the name “calculation”. Enter everything you want to have done in this file. For example

A={{a,b},{c,d}}

B=Inverse[A]

DoVeryComplicatedThingWhichTakesAtLeast100HoursWith[A]

Then just run

math -run “<<calculation”

Then “detach” from the screen by entering Ctrl-a and then d, that is, first enter Ctrl-a, release and then enter d. Now you can log-off and watch your favorite movie. To check the progress of the calculation, just log-in again and enter “screen -r”. To log-off, detach, i.e. Ctrl-a and then d. If the calculation is done, you “exit” from “screen”.

Very basic rsync usage

Monday, February 23rd, 2009

To make a backup of my home folder on my machine in the office: First cd to the folder where all files should get copied, in my case this would be /ext/tha. Then

rsync -avz –exclude ‘\.*’ ~/ .

The –exclude option excludes the invisible folders which I don’t need to backup.

SPIRES Dashboard widget

Monday, November 24th, 2008

Yay!!! My SPIRES Dashboard widget (or here at Apple) is listed as a 3rd party tool on the SPIRES website! I did not know that. Either click the link given or have a look at the screenshot:

“Apple Dashboard” link leads to the Apple page for my widget.

Encoding settings in Vim and LaTeX to UTF-8

Sunday, November 23rd, 2008

My current setting for file encoding in vim (via hoepfl.de)

set encoding=utf-8
set fileencoding=
setglobal fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,latin1
set termencoding=latin1

  • New files are created in utf-8.
  • Existing files are treated as utf-8-bom, utf-8 and latin-1.
  • If the encoding of the file cannot be determined uniquely among those three, utf-8 is chosen.
  • If the encoding is none of those three, then the file is interpreted as latin-1.

Using this setting and using the following line in the LaTeX document

\usepackage[utf8]{inputenc}

one does not have to type for example Gau{\ss} or K\”ahler, but just Gauß and Kähler. This comes in handy particularly if one’s using the spell checker of Vim.

Essential utilities for the Mac OS X

Tuesday, October 14th, 2008

A memo for me in case I have to re-install the OS: These are essential applications without which I cannot survive…

  • Quicksilver
  • SlimBatteryMonitor
  • Caffeine
  • Google Notifier
  • Fetch
  • Skim
  • Dropbox
  • Paparazzi!
  • Xee

Changing the warning setting of the vim-latex

Wednesday, September 24th, 2008

If I compile LaTeX files using vim-latex, very often vim opens package files, e.g. xy.sty etc., because the LaTeX compiler had some – not that important for the most of the time – warnings. Then I have to re-open the tex file. It is really annoying. However to avoid this, you can add the following line to the .vimrc file

let g:Tex_IgnoredWarnings =
\'Underfull'."\n".
\'Overfull'."\n".
\'specifier changed to'."\n".
\'You have requested'."\n".
\'Missing number, treated as zero.'."\n".
\'There were undefined references'."\n".
\'Latex Warning:'."\n".
\'Citation %.%# undefined'
let g:Tex_IgnoreLevel = 8

I inserted the ‘Latex Warning:’ line and changed the ignore level to 8. The default is 7.

Forward & inverse searching with Vim, Xdvi and LaTeX

Tuesday, September 23rd, 2008

I’ve finally found out how to do the forward & inverse searching with (g)vim in combination with vim-latex and xdvi. For forward searching one adds the following line to the .vimrc

let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode --src-specials $*'

For inverse searching one opens gvim using the following option

gvim --servername xdvi file.tex

and the xdvi using

xdvi -editor "gvim --servername xdvi --remote +%l %f" file.dvi

Yes, there’s only one dash in front of the editor option!

Additionally, if one wants the \lv command calling xdvi with this option, one inserts the following line to the .vimrc file

let g:Tex_ViewRuleComplete_dvi = 'xdvi -editor "gvim --servername xdvi --remote +\%l \%f" $* &'

It took quite some time to get the inverse searching working… Anyway, it’s working now: \ls for the forward and control-click for the inverse searching. It’s just GREAT!