The advantage of such an approach is, that you can have quite high-level control (ie, just write your text). However, learning about all the handy packages can take quite a while. A sample perl script might be something like this:
#get the data first $a = <DATA>; chomp $a; $b = <DATA>; chomp $b; open TEX, ">file.tex" or die "Could not open file.tex"; print TEX <<'_END'; \documentclass{article} \begin{document} \title{TeX-report} \author{Me} \maketitle \section{Some data} _END print TEX "I have $a and $b. That's all for now.\n"; print TEX <<'_END'; \section{Some table} \begin{table} \caption{A table} \begin[|l|c|c|]{tabular} \hline _END while(<DATA>){ chomp; print TEX join('&', split ).'\\ \hline'."\n"; } print TEX <<'_END'; \end{tabular} \end{table} \end{document} _END system("latex file.tex"); system("latex file.tex"); system("dvipdf file") if -e "file.dvi"; __DATA__ 129873 12315 1 8 2 1 3 100 8 3 4
Here I'm also using the dvipdf package, (freshmeat.net), but you could use 'dvips file -o' and 'ps2pdf file.ps' as well. Perl code is checked. I'm using TeX daily, so you always can /msg me with further questions.
Hope this helps,
Jeroen
"We are not alone"(FZ)
In reply to Re: Generating PDF
by jeroenes
in thread Generating PDF
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |