[texhax] invoices in LaTeX
Gordon Haverland
ghaverla at materialisations.com
Fri Jun 7 16:47:31 CEST 2013
On June 6, 2013, Gordon Haverland wrote:
> The invoice package apparently did work at one time, there is a
> note about using it with scrlttr of Koma Script. What I was
> using for letters from Koma Script is scrlttr2.
>
> Neither \begin{invoice} or \begin{invoiceenv} work (the second
> is the workaround for scrlttr).
>
> Perhaps the log isn't verbose enough, but I haven't a clue as
> to why the invoice package isn't working with scrlttr2 of
> Koma.
I never attempted a minimal example, as in looking at the log
there was no place to start. Seeing that pdflatex ran out of
stack was not a lot of help.
Fine, try to build a minimal example. And it works. Add stuff
until it breaks. The problem is coming from Canada and having a
currency that uses the dollar symbol.
The standard escaping of the dollar symbol with a backslash
doesn't work with invoice. You still get pdflatex running out of
stack space. The documentation for invoice mentions \string$.
That works, except it confuses the highlighting of code in emacs.
What seems to work the best to me, is to also use the fontenc
packages (with T1) and then use \textdollar{} where needed in the
invoice. This command does not work if fontenc is not used.
While the documentation for invoice says that you have to use
\begin{invoiceenv}
instead of
\begin{invoice}
when using scrlttr, this is not needed when using scrlttr2.
For a long "invoice" section, page breaks can occur in
uncomfortable places (looks to me like a widow and orphan
problem). Using \clearpage after inputting data for a project is
not the answer, as that starts the subtotals and totals on the
next page. Adding break lines (\\) does seem to work, but it is a
manual process to determine how many are needed.
Gord
More information about the texhax
mailing list