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.

Matlab for UBUNTU, errors: Locking assertion failure

This error happens because matlab can not find out the java.
The solution is very simple, add follow line to the ~/.bashrc file:

export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre

SVN connection with a different port number

Some times the port to the server has been changed, such that we must change the default port (25) to the new port. Here is the solution:

1. Find out the file ~/.subversions/config
2. Add follow line: sshtunnels=ssh -p newportnummer. Save the file and exit.
3. Checkout the server svn repository by: svn co svn+sshtunnels://hostname@hostip/pathToSvnRepository

That's it.