First, make sure you have the tikz, so that you can

\usepackage{tikz}

without any error.

in linux,

sudo apt-get install texlive-pictures pgf

with the tikz package, we can use \draw to draw line or arrow, \node to draw a text. I will demonstrate to draw a simple energy levels scheme. The advantage of using latex is that the energy levels can be drawn accurately and once the template is set, it is very easy.

I define new command

\newcommand{\levS}[4]{
\draw [level](#3,#1) -- (#3+\len,#1) ;
\draw (#3+\len +0.1,#1) -- (#3+\len +0.3, #1 + #4) -- (#3+\len +0.6, #1 + #4);
\node[right] at (#3+\len +0.6,#1+#4) {#1, #2};
}

with usage,

\levS{enery}{spin-parity}{vertical_shift}{offset_of_number}

with this, we can draw something like this.

22O_levels.png

I attached the template in here.

 

Advertisements