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

Re: 2 persistant bugs; LaTeX & erratic page breaks




On 18 May 2009, at 20:41, Schmiechen wrote:
...
Bug 2 is printing page breaks.
I get very erratic page breaks when printing multi page orders and invoices.
I also get odd blank pages.
I have tried messing with the page breaks to no avial.
I tried upgrading to Texlive also.
Has anyone else had trouble with page breaks?
Looking for some tips or ideas.
I see code for testing a new template system in 1.3 is Ledgersmb going to stay
with Latex?
I have set up Texlive for Letter paper.
I have a file called papersize.tex to test adjust the papersize on all
templates.
This is the file:
%\usepackage[top=2.7cm,bottom=-1cm,left=1.9cm,right=0.5cm]{geometry}%
%This had margins that were too big:%
%\usepackage[letterpaper]{geometry}%
%This has .5 in left and right margins and .75 top and 1.125 in bottom:%
\usepackage[letterpaper,left=0.5in,top=0.75in]{geometry}

Are you asking for help with your own LaTeX templates? I think it might help to have stated this.

I assume that the problem doesn't occur if you replace your templates with the standard default ones that ship with LedgerSMB?

I have spent many hours on the LaTeX invoice template for SQL-Ledger / LedgerSMB, but cannot claim to be an expert. There are some real wizards on the comp.text.tex newsgroup, whose abilities with this markup astound me - perhaps one of them would find it easier to lay out an invoice, but to be honest, I'm amazed how anyone could understand LaTeX so well as those guys obviously do, because I find its quirks quite obscure and I find modifications to our invoices quite difficult & time-consuming.

Having said that, my invoice.tex produces really quite stable results, and now has continued to do so over nearly 1000 invoices, including some that are multipage.
:D

I think it might help if you were able to be more specific. Is there any particular part of the invoice that causes bad results during the pagebreak? To be honest, I think one would need to see the whole invoice.tex file to debug this properly and, considering the time that would consume, I don't know whether you'd have much luck getting useful help with this on a mailing list.

Search my previous posts for more comments, because I try to reply to LaTeX related questions whenever I can; perhaps I flatter myself by suggesting that my comments are helpful, but no-one else seems to common on this subject with such verbosity :/. In the past I have spent hours composing LaTeX related comments to this list, so I do hope I've said at least something useful during that time. Search the archive for "stroller latex".

As I've said before, the key to creating your own .tex templates is to work from first principles and do one bit at a time. Unless your changes are quite minor, I don't think modifying the default template is the best way for success - certainly I started out with invoice.tex as a blank page with an invoice number at the top; then I added my logo, then my address, then the customer address (and spent some time ensuring that it would always line up with the envelope's window, irrespective of the number of address lines or the length of the addressee name); eventually I added parts of the itemised invoicing (then itemnotes and serial numbers), and only after that was working correctly did I add the invoice total and page numbering.

When creating the table for the the itemised part of the invoice, I do not think the default LedgerSMB template will be so helpful to copy from. I think that I pretty much used it for referencing the <?lsmb foreach number ?> <?lsmb number ?> <?lsmb description ?> ... <?lsmb end number ?>. But I think by this stage you should be using your own understanding of LaTeX to lay out the table structure yourself. If you copy blindly then you won't know where to look for the bugs; if you create the table piece by piece, testing repeatedly with an existing sample invoice, you will know which change you have just made when you see a problem.

There's a copy of my own invoice.tex in the archive. As I've said, this does multipage invoices fine here. You might try it on your own system & see how the results fair. The only change necessary should be to change A4 to letter. I use Arev & Augie fonts - these should be optional, and if you don't install them then I _think_ another font should be substituted.

I believe TexLive to be the best & "correct" distro.

I think that if you're using tabularx then this may be the root of your problem. See my next post for details.

Stroller.