Wednesday, February 2, 2011

NVIDIA driver is crash when ubuntu kernel updates

After the kernel of Ubuntu is updated, the default display is crash.
The solution is reinstall the NVIDIA driver again which can be downloaded from websites.

Run:
$ sudo sh nvidiadriver.run

After a few steps of setting,
you should able to login in the x window.

Friday, January 21, 2011

How to change the numbering of the subfig in latex

The command is simple:
\setcounter{subfigure}{0}

print small pdf file for a conference

For a IEEE conference paper, all fonts must be embedded in the pdf file.
The solution is print the non-embedded pdf file to the other pdf file.
One is CUPS-PDF, but the output file is strangely larger, and the version of the pdf is 1.3, which is lower than the standard.
The other driver comes from envince document reader, which is the default reader on UBUNTU. You can directly print the file as a pdf or ps file. The surprising thing is the size of the output file is small and all fonts are embedded.

Of course, the most simple one is use ps2pdf in the latex, use follow command:
"ps2pdf -dCompatibilityLevel=1.4 -dMAxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sPAPERSIZE=letter -dPDFSETTINGS=/printer ".

Saturday, January 15, 2011

vim-latexsuit on ubuntu 11.04

After using apt-get to install this suit, it can not work still, but add follow lines in the .vimrc file, it start to work:


" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


set shiftwidth=4
set cindent
syntax on
colo desert


set spell spelllang=en_us
" zg to add word to word list
" zw to reverse
" zug to remove word from word list
" z= to get list of possibilities
set spellfile=~/.vim/spellfile.add

Thursday, January 13, 2011

Solution to find out gstreamer-app for OPENCV

Need install:

$sudo aptitude install libgstreamer-plugins-base0.10-dev

Wednesday, January 12, 2011

How to stop x server of ubuntu

The solution is writing follow line in the terminal:

$ sudo /etc/init.d/gdm stop

Change the gvim default font

I start to use a new big screen, the default font of vim becomes so small.

I start to search methods that can solve it:
Add follow line to ~/.vimrc:
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12

Here Bitstream\ Vera\ Sans\ Mono\ is the type of the font, and 12 is its size.