指定vim的主题。不指定,缺省使用desert。
代码: 全选
● vimcolor2texlistings.pl >autolst.tex
● vimcolor2texlistings.pl /usr/share/vim/vim72/colors/shine.vim >autolst.tex
代码: 全选
\input{autolst.tex}
代码: 全选
%\color{white}
%\setmainfont{Courier 10 Pitch}
\begin{lstlisting}[language=perl]
foreach (`/usr/bin/cflow -l $in`){
chomp;
s/\(.*$//; s/^\{\s*//; s/\}\s*/\t/;
my($n,$f)=split /\t/,$_;
$index[$n]=$f;
if($n){
# 说明
$_="$index[$n-1]->$f";
push @output,"node [color=\"$color[$n-1]\" shape=$shape[$n]];edge [color=\"$color[$n-1]\"];\n$_\n" if(! $count{$_}++);
}
else{push @output,"$f [shape=box];\n";}
}
\end{lstlisting}
%\setmainfont{Vera Sans YuanTi}
%\color{black}