@ -53,19 +53,14 @@ if __name__ == '__main__':
f = open ( preisliste_tex , ' w ' )
f . write ( r """
\documentclass [ a4paper , 1 0 pt ] { scrartcl }
\documentclass [ a4paper , 1 2 pt ] { scrartcl }
\usepackage [ ngerman ] { babel }
\usepackage [ utf8 ] { inputenc }
\usepackage { fullpage }
\usepackage { booktabs }
\usepackage { eurosym }
% Reduce vertical offset
\addtolength { \textheight } { \voffset }
\setlength { \voffset } { 0 cm }
\setlength { \voffset } { - 1 cm }
\addtolength { \textheight } { 1 cm }
\usepackage [ table ] { xcolor }
\usepackage [ hmargin = 1 cm , vmargin = 1 cm ] { geometry }
% No footskip
\addtolength { \textheight } { \footskip }
@ -78,14 +73,15 @@ if __name__ == '__main__':
% No page number
\pagestyle { empty }
\begin { document }
\begin { flushright } Stand \today \end { flushright }
\vspace * { - 4.6 ex }
%
\definecolor { mygray } { RGB } { 224 , 224 , 224 }
\renewcommand { \arraystretch } { 1.2 }
\begin { document } \sffamily
\noindent
Stand \today \\[ \baselineskip ]
\rowcolors { 2 } { white } { mygray }
\begin { tabular } { l @ { \quad } rr }
\toprule
Artikel & \multicolumn { 1 } { c } { Preis } & \multicolumn { 1 } { c } { Pfand } \\
\midrule
\textbf { Artikel } & \multicolumn { 1 } { c } { \textbf { Preis } } & \multicolumn { 1 } { c } { \textbf { Pfand } } \\
""" )
first = True
@ -98,12 +94,11 @@ Artikel & \multicolumn{1}{c}{Preis} & \multicolumn{1}{c}{Pfand} \\
latex_price = german ( ' \\ textbf { %.2f } \\ euro ' , i . price )
latex_deposit = ' ~ ' if i . deposit == 0 else german ( ' + %.2f \\ euro ' , i . deposit )
write_utf8 ( f , ' %s %s & %s & %s \\ \\ \n ' % (
' ' if first else ' \\ midrule \n ' ,
write_utf8 ( f , ' %s & %s & %s \\ \\ \n ' % (
latex_name , latex_price , latex_deposit ) )
first = False
f . write ( r """ \ bottomrule
f . write ( r """
\end { tabular }
\end { document }
""" )