From: Stroller <lin...@my...> - 2006-11-04 13:10:46
|
On 4 Nov 2006, at 06:39, Dr Eberhard Lisse wrote: > > Everything is possible, and it is always helpful to read the archives, > if one could find them :-)-O Ha! Indeed!! Actually, I didn't at expect this to be possible, so I only Googled a few pages. > By the way, the way I read your example it will display the Price no > matter how many purchased Yes, indeed. This is what I meant when I said "of course the minimum quantity of 1 always triggers the if-statement." Sorry if I was unclear in that. > ...so try this fragment: > > \usepackage{ifthen} > \usepackage{numprint} > > \begin{tabularx}{\textwidth}{lXrlr} > Part & Description & Price & & Amount \\ > <%foreach number%> > <%number%> & > <%description%> & > % \ifthenelse{\lengthtest{<%qty%>pt>1pt}}{\pounds <%sellprice%>} > {}}}}& \ifthenelse{\lengthtest{<%qty%>pt>1pt}{\pounds <%sellprice%>}{}} & > % \ifthenelse{\lengthtest{<%qty%>pt>1pt}}{x <%qty%>}{}}}} & \ifthenelse{\lengthtest{<%qty%>pt>1pt}{x <%qty%>}{}} & > \pounds <%linetotal%> \\ % end of table row > <%end number%> > \end{tabularx} Many thanks! You caught me with your spot-the-deliberate-mistakes, but managed to see them when comparing with the ifthen.dvi documentation. Many thanks for your help - I'm very grateful. Stroller. |