reorganize the way to generate tikz->pdf file