%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% LaTeX me first!!!
%
% This is 00README.tex of the invoice package. LaTeX this file
% and it will reveal everything... Software you need, software
% you have, etc.
%
%   Author: Oliver Corff
%     Date: October 1st, 2011
%
\def\myabstract{%
	   The invoice package provides an environment for
           writing invoices with an arbitrary number of
           billed items like fees (with taxes, if applicable),
           as well as expenses in local and foreign currencies.}%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt]{ltxdoc}
%\usepackage{hyperref}
\newif\ifBadNews
\IfFileExists{diagnose.sty}{\usepackage{diagnose}}{\BadNewstrue}
\title{\texttt{invoice 0.9}\\Installation Notes}
\author{Oliver Corff}
\date{October 1st, 2011}

\begin{document}
\maketitle
\thispagestyle{empty}
\begin{abstract}\myabstract\end{abstract}
\ifBadNews
	\vskip 1cm
	\begin{sloppypar}
	{\large
	Before you do anything else pick up the diagnose package
	(\texttt{CTAN:macros/latex/contrib/supported/diagnose})
	and latex this file again.}
	\end{sloppypar}
\else
	% Your official text comes here.

	\newcounter{AllInPlace}

	\section{Site Status and Installation}

	\begin{sloppy}
	The \texttt{invoice} package requires additional %CTAN
	software for meaningful operation. These packages are
	\texttt{fp}, \texttt{calc} and \texttt{longtable}.

	\PackageDiagnostics%
	{calc.sty}				% Package tested for
	{CalcAvailable}				% Associated counter
	{Infix Arithmetics Available!}		% Yes! message
	{Infix Arithmetics Not Available!}	% No! message

	\ifnum\theCalcAvailable=1
		Your site installation contains the required \texttt{calc}
		package. No further action is necessary.
	\else
		\textbf{Nota Bene:} Please fetch and install \texttt{calc}
		from
		\texttt{CTAN:macros/latex/required/tools/calc.dtx} before
		continuing!
	\fi

	\PackageDiagnostics%
	{fp.sty}				% Package tested for
	{CrunchingAvailable}			% Associated counter
	{Number Crunching Possible!}		% Yes! message
	{Number Crunching Not Possible!}	% No! message

	\ifnum\theCrunchingAvailable=1
		Your site installation contains the required
		\texttt{fp}
		package. No further action is necessary.
	\else
		\textbf{Nota Bene:} Please fetch and install \texttt{fp}
		from \texttt{CTAN:macros/latex/contrib/fp} before continuing!
	\fi

	\PackageDiagnostics%
	{longtable.sty}				% Package tested for
	{LongTableAvailable}			% Associated counter
	{Long Tables Possible!}			% Yes! message
	{Long Tables Not Possible!}		% No! message

	\ifnum\theLongTableAvailable=1
		Your site installation contains the required
		\texttt{longtable}
		package. No further action is necessary.
	\else
		\textbf{Nota Bene:} Please fetch and install \texttt{longtable}
		from \texttt{CTAN:macros/latex/required/tools/longtabl.dtx}
		before continuing!
	\fi

	\addtocounter{AllInPlace}{\theCalcAvailable}
	\addtocounter{AllInPlace}{\theCrunchingAvailable}
	\addtocounter{AllInPlace}{\theLongTableAvailable}

	\ifnum\theAllInPlace=3
		\section{The \texttt{invoice} Package}

		The \texttt{invoice} package was conceived in late 2000
		when the author had to dig through a truly aweful pile
		of expense bills without having a \LaTeXe-capable
		spreadsheet (or any spreadsheet) available. After several
		miscalculations with a pocket calculator due to forgotten
		entries or double entries the idea came up to have \LaTeXe\
		do the calculation work. As such, the package in its present
		stage is highly specialized with regard to the documents it
		generates. The \texttt{invoice} package is basically a
		tailor-made solution for a consultant who charges fees and
		claims all sorts of expenses, sometimes working on different
		assignments for the same client.

		Comments and suggestions are highly welcome and
		should be directed to the author at
		\texttt{corff@zedat.fu-berlin.de} or
		\texttt{oliver.corff@email.de}.

		The \texttt{invoice} package is put under the GNU
		Public Licence.
	\else
		
		\vspace{1cm}

		\textbf{Attention:} Please install whatever is
		specified above, and recompile this document.
	\fi

	\end{sloppy}
\fi
\end{document}
