[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: long part numbers



On 09/23/09 08:31, Stroller wrote:

On 23 Sep 2009, at 06:48, Joseph wrote:
1.) Does anybody know how to modify tex-invoice template so it wraps
a long part numbers the same way as html-invoice when printing to
the screen?

Hi,

Sorry, can you explain what long part numbers are doing at present?
And what they do in the html-invoice ?

I hate wrapping of part-numbers, but I seem to recall it works as I'd
expect when I do choose one too long for my template.

I.E. the part number 123-43543-8990 displays as:
123-43543-
8990

The second line begins at the beginning of the column, so alignment is
pretty much correct.

I think this is kinda ugly. I think there's a little possibility for
confusing this with two separate parts, 123-43543- and 8990.
Fortunately the quantity and price rows all align correctly, so I
don't think that possibility for confusion is too great.


Here is a typical part number:
CP-D-1X4-1315-25%-900/250-1-1-LC/PCx1-4x60mm

When I print in html to the screen it nicely splits into two lines
CP-D-1X4-1315-25%-900/250-1-1
LC/PCx1-4x60mm

so there is enough room for longer description. But tex template just prints the entire part number on one line, so the description is squeeze into few columns. It does not look good, and there is a lot of white space waisted as the part number column is long and empty below and description is squeezed into narrow space, so it takes a lot of space.

I'm using default invoice.tex template.
I think this is the section from the template:

..hidden..@{}}
  \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} &
    \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em]
<?lsmb FOREACH number ?>
<?lsmb lc = loop.count - 1 ?>
<?lsmb runningnumber.${lc} ?> & <?lsmb number.${lc} ?> & <?lsmb description.${lc} ?> & <?lsmb deliverydate.${lc} ?> & <?lsmb qty.${lc} ?> & <?lsmb unit.${lc} ?> &
  <?lsmb sellprice.${lc} ?> &
  <?lsmb discountrate.${lc} ?> &
  <?lsmb linetotal.${lc} ?> \\
<?lsmb END ?>
\end{tabularx}



It's better for you to post a full copy of the invoice.tex (sanitise
as necessary) than just selected highlights, as it's easy to overlook
something "obvious" if you are too familiar with the document. Many
eyes may see something you've missed.

Paper size I corrected. Every time there is a Tetex upgrade it defaults to A4 paper size, so simple command:
texconfig-sys paper letter solved the problem

--
Joseph