Preislister erzeugt jetzt auch mehrseitige Listen

master
Stefan Laufmann 12 years ago committed by Sebastian Pipping
parent d4f263b1a5
commit 7aa94c3243

@ -61,6 +61,7 @@ if __name__ == '__main__':
\usepackage{eurosym} \usepackage{eurosym}
\usepackage[table]{xcolor} \usepackage[table]{xcolor}
\usepackage[hmargin=1cm,vmargin=1cm]{geometry} \usepackage[hmargin=1cm,vmargin=1cm]{geometry}
\usepackage{longtable}
% No footskip % No footskip
\addtolength{\textheight}{\footskip} \addtolength{\textheight}{\footskip}
@ -80,8 +81,8 @@ if __name__ == '__main__':
\noindent \noindent
Stand \today\\[\baselineskip] Stand \today\\[\baselineskip]
\rowcolors{2}{white}{mygray} \rowcolors{2}{white}{mygray}
\begin{tabular}{l@{\quad}rr} \begin{longtable}{l@{\quad}rr}
\textbf{Artikel} & \multicolumn{1}{c}{\textbf{Preis}} & \multicolumn{1}{c}{\textbf{Pfand}} \\ \textbf{Artikel} & \multicolumn{1}{c}{\textbf{Preis}} & \multicolumn{1}{c}{\textbf{Pfand}} \endhead
""") """)
first = True first = True
@ -99,15 +100,16 @@ Stand \today\\[\baselineskip]
first = False first = False
f.write(r""" f.write(r"""
\end{tabular} \end{longtable}
\end{document} \end{document}
""") """)
f.close() f.close()
ret = subprocess.call(['pdflatex', _BASENAME + '.tex'], cwd=tempdir) for count in range(2):
if ret != 0: ret = subprocess.call(['pdflatex', _BASENAME + '.tex'], cwd=tempdir)
print("Call to LaTeX failed with code %d." % ret) if ret != 0:
sys.exit(ret) print("Call to LaTeX failed with code %d." % ret)
sys.exit(ret)
print('Moving output to "%s"...' % output_filename) print('Moving output to "%s"...' % output_filename)
shutil.move(preisliste_pdf, output_filename) shutil.move(preisliste_pdf, output_filename)

Loading…
Cancel
Save