1

There's an error that's driving me nuts and latex doesn't help me understand what's going on.

\documentclass[a4paper]{scrlttr2}
\usepackage{invoice}
\usepackage[pdftex]{graphicx}

\begin{document}

\end{document}

Then you can try:

$ pdflatex error.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./error.tex
LaTeX2e <2011/06/27>
Babel <3.9k> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlttr2.cls
Document Class: scrlttr2 2013/12/19 v3.12 KOMA-Script document class (letter)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2013/12/19 v3.12 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize12pt.clo)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2013/12/19 v3.12 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/DIN.lco)
(/usr/share/texlive/texmf-dist/tex/latex/invoice/invoice.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/plain/fp/fp.tex
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp.sty
`Fixed Point Package', Version 0.8, April 2, 1995 (C) Michael Mehlich
(/usr/share/texlive/texmf-dist/tex/latex/fp/defpattern.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-basic.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-addons.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-snap.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-exp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-trigo.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-pas.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-random.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-eqn.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-upn.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fp/fp-eval.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/invoice/invoice.def))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty

! LaTeX Error: Missing \begin{document}.

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

l.17 \NeedsTeXFormat{LaTeX2e}[
                              1995/12/01]
?

Does someone here understand what's going on?

  • There have been changes to graphicx. Just call \usepackage{graphicx} first before invoice. Are you sure you need the pdftex option? I don't think so! – user31729 Aug 2 '16 at 17:51
  • Try to put something inside \begin{document} and \end{document}. – Matsmath Aug 2 '16 at 17:52
  • 2
    You have a very old TeX installation and only two languages installed for proper hyphenation. Installing a fresh TeX Live 2016 will most likely resolve your issue. – Johannes_B Aug 2 '16 at 17:52
  • Sidenote: option pdftex is unneded and often disturbing something. – Johannes_B Aug 2 '16 at 17:52
  • @Johannes_B er, no.... – David Carlisle Aug 2 '16 at 18:23
5

the invoice package completely breaks latex in its current form.

If you take a copy and change line 152 from

\input{fp}

to

\RequirePackage{fp}

then your test file works.

As it is it loads fp.tex which defines stub versions of latex commands for use with plain TeX, but it breaks latex completely.

| improve this answer | |
  • 1
    I have emailed the package maintainer with the bug report – David Carlisle Aug 2 '16 at 19:01
  • Thank you very much for your answer. I manually changed invoice.sty as suggested and it worked. – Paulo Matos Aug 3 '16 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.