Preislister erzeugt jetzt auch mehrseitige Listen

master
Stefan Laufmann 11 years ago committed by Sebastian Pipping
parent d4f263b1a5
commit 7aa94c3243
  1. 16
      preislister/main.py

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

Loading…
Cancel
Save