From: Stroller <lin...@my...> - 2006-11-10 00:29:05
|
On 9 Nov 2006, at 04:21, Dr Eberhard Lisse wrote: > on 11/8/06 2:07 PM Dr Eberhard W Lisse said the following: >>>> I indeed use longtable and leave the page breaks to LaTeX. > > ... > \begin{longtable}{lllrlrrr} > ... > \textbf{Code}& > \textbf{Description}& > \ifthenelse{\lengthtest{<%subtotal%>pt<0pt}}{}{\textbf{Date}}& > \textbf{Qt'y}& > \textbf{Unit}& > \textbf{Price}& > \textbf{Disc}& > \textbf{Amount}\tabularnewline > \endhead > ... > \multicolumn{3}{l}{} & > \multicolumn{4}{l}{\textbf{Subtotal}}&\textbf{<%subtotal%>}=20 > \tabularnewline > <%foreach tax%> > \multicolumn{3}{l}{}&\multicolumn{4}{l}{<%taxdescription%> on > <%taxbase%> } & <%tax%>\tabularnewline > <%end tax%> > <%if paid%> > \multicolumn{3}{l}{} & > \multicolumn{4}{l}{\textbf{Paid}}&<%paid%>\tabularnewline > <%end paid%> > <%if total%> > \multicolumn{3}{l}{} & > \multicolumn{4}{l}{\textbf{Total}}&\textbf{<%total%>}\tabularnewline > <%end total%> > <%if not total%> > \multicolumn{3}{l}{} & > \multicolumn{4}{l}{\textbf{Total}}&0.00\tabularnewline > <%end total%> > &&&&&&&\tabularnewline > \multicolumn{8}{r}{All prices in \textbf{<%currency%>} > funds.}\tabularnewline > \multicolumn{8}{l}{\ifthenelse{\lengthtest{<%subtotal%>pt<0pt}}{}{Due > Date: \textbf{<%duedate%>}, Terms: Net \textbf{<%terms%>} > days}}\tabularnewline > \endlastfoot > ... > <%foreach number%> > <%number%> & > <%description%> & > \ifthenelse{\lengthtest{<%subtotal%>pt<0pt}}{}{<%deliverydate%>} & > <%qty%> & > <%unit%> & > \nprounddigits{2}\numprint{<%sellprice%>} & > \nprounddigits{2}\numprint{<%discount%>} & > <%linetotal%>\tabularnewline > <%end number%> > \end{longtable} If the last item comes at the very foot of the page, and the page =20 breaks with only the lastfoot to display, is there any logic to =20 prevent the head being shown at the top of the next page? I have not used your template verbatim - although it is quite =20 beautiful, it is not quite my style of formatting, so I started again =20= from scratch and have used yours only for reference. I have found one of my invoices has two pages. On the first is: Part Description Price Quantity Amount 101 Fangle =A31 3 =A33 237 Wonkle =A32 1 =A32 ... 093 Chocolate =A30.5 3 =A31.5 and on the second is only: Part Description Price Quantity Amount Total =A36.5 (I have laid out these examples so they make sense if viewed in a =20 fixed-width font). I have been so impressed by your responses to my recent questions =20 that I cannot believe that you have missed this, yet I cannot quickly =20= see how you have solved this problem regarding invoices of a certain =20 length. Stroller. =20= |