Sunday, May 22, 2011

How to setup spell checking for Kile editor

Spell checking in Kile will be very useful. Here is one way to setup it.


  1. Install aspell
    sudo apt-get install aspell aspell-en dictionaries-common hunspell-en-us

  2. Goto Applications->Other->Spell Check
    In the client, choose Aspell.
  3. Restart Kile.
You can open the file
~/.aspell.en.pws
It stores the local dictionary for the spell checking.

Tuesday, February 22, 2011

How to install and upgrade package in Ubuntu

Edit

vi /etc/apt/sources.list



deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main



sudo apt-get update
sudo apt-get install chromium-browser



sudo apt-get upgrade

Friday, February 11, 2011

Make a standalone plot using TikZ


\documentclass{minimal}

\usepackage{tikz}

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%


\begin{document}

\begin{tikzpicture}[scale=1.6]
\draw[->] (0,0) -- (4,0) coordinate (x axis);
\draw[->] (0,0) -- (0,3.5) coordinate (y axis);
\shadedraw [shading=axis,shading angle=90, left color=blue!70,right color=blue!30, draw=blue!50!black] (0.2,0) rectangle (3.8,3.3);
\shadedraw [shading=axis,shading angle=90] (0.6,0) rectangle (2.0,2.3);

\node at(0.2,-0.2){{$20$}};
\node at(0.6,-0.2){{$60$}};
\node at(2.0, -0.2){{$600$}};
\node at(3.8, -0.2){{$1400$}};
\node at(4.5, 0){{$p_{T}$[GeV]}};

\node at(-0.2, 2.3){{$2.8$}};
\node at(-0.2, 3.3){{$4.4$}};
\node at(-0.2, 3.7){{$|y|$}};

%
\node at(1.3, 1.3){{$17\,\,nb^{-1}$}};
\node at(2.9, 2.6){{$40\,\,pb^{-1}$}};
\end{tikzpicture}

\end{document}

Wednesday, February 9, 2011

Merge several EPS files to one file


gs -sDEVICE=epswrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=merged.eps *eps


Merge EPS and convert EPS to PDF

gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=merged.pdf *eps


http://www.linuxjournal.com/content/tech-tip-using-ghostscript-convert-and-combine-files

The best way to concert a bunch of eps file to a combined pdf file is,



  1. for i in `ls *eps`
    do
    ps2pdf -dEPSCrop ${i}
    done




  2. gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=merged.pdf *pdf