Preislister erzeugt jetzt auch mehrseitige Listen

This commit is contained in:
Stefan Laufmann 2012-05-16 16:59:58 +02:00 committed by Sebastian Pipping
parent d4f263b1a5
commit 7aa94c3243
1 changed files with 9 additions and 7 deletions

View File

@ -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,11 +100,12 @@ 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()
for count in range(2):
ret = subprocess.call(['pdflatex', _BASENAME + '.tex'], cwd=tempdir) ret = subprocess.call(['pdflatex', _BASENAME + '.tex'], cwd=tempdir)
if ret != 0: if ret != 0:
print("Call to LaTeX failed with code %d." % ret) print("Call to LaTeX failed with code %d." % ret)