For some reason that I don't understand, it seems that I cannot use the invoice package and the wallpaper package at the same time.

Here is my MWE:


Just a test

And this is the output I get after running pdflatex:

enter image description here

If I open the transcript file, there's something that seems to be related to the problem:

File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
Overfull \hbox (15.31238pt too wide) in paragraph at lines 184--92
[]\OT1/cmr/m/n/10 [2007/09/09]    [2010/03/01]  [2010/12/02]  [2010/09/13]
 [2007/11/11]    [2007/09/09]            [2007/09/09]

I also tried loading the packages in a different order, like this:


Just a test

In this case pdflatex gives an error message, complaining about a missing \begin{document} in wallpaper.sty:


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

                                               l.24 \NeedsTeXFormat{LaTeX2e}[

If I use only one of the packages, the document gets rendered as expected.

So here are my two questions:

  1. Why is this happenning?
  2. How can I fix it?
  • I've used those two packages together for several years without any issues. This problem started after upgrading my OS, which in turn upgraded my TeX Live environment from an ancient version (~2009) to a less ancient one (2012)
    – mfriedman
    Commented Feb 26, 2014 at 6:15
  • I get the expected result (first MWE) with an up-to-date system. TeX Live 2012 is "less" ancient, but still ancient. Upgrade to 2013 . Commented Feb 26, 2014 at 6:26
  • 1
    @mfriedman: I have TexLive 2013 and am able to confirm at least one error message with from pdflatex concerning your MWE, if you include invoice package before wallpaper. However, it works the other way round.
    – user31729
    Commented Feb 26, 2014 at 7:01
  • I had a look on wallpaper.sty -- it is basically 8 years old, at first glance there is nothing strange in that file, but concerning the age of that package, there must be some incompatibility with invoice, which is from 2011.
    – user31729
    Commented Feb 26, 2014 at 7:09

2 Answers 2


Someone please contact the invoice author. He is loading fp via \input{fp} instead of \RequirePackage{fp}. If I change that line in invoice.sty then it seems to work just fine.

  • I can confirm that replacing input with RequirePackage in invoice.sty solves the problem. When I was trying to solve this issue, I stumbled upon this answer, which mentions the problem of using input in invoice.sty. But I failed to realize that I could try that solution for my case. Thank you very much for pointing me in the right direction!
    – mfriedman
    Commented Feb 27, 2014 at 3:26

A minor work-around for this is to make \input{fp} conform to \RequirePackage{fp} when using \usepackage{invoice}. Here's one way of doing that (which uses pdfTeX's \pdfstrcmp):

\let\oldinput\input% Save \input
    \RequirePackage{fp}% Specifically when finding \input{fp}
    \oldinput{#1}% If not \input{fp}
\usepackage{invoice}% http://ctan.org/pkg/invoice
\let\input\oldinput% Restore \input

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .