summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-18 22:37:26 +0000
committerKarl Berry <karl@freefriends.org>2019-01-18 22:37:26 +0000
commit3fdf03421f7051f57f232646be4788e4234a8a62 (patch)
tree784f63760e4ac627c79961425ca48e70250020ba /Master/texmf-dist/doc
parentac52c731712b8871bb99e63035680ea98bfa1445 (diff)
invoice-class (18jan19)
git-svn-id: svn://tug.org/texlive/trunk@49749 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/README.md6
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.cfg10
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.csv31
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.pdfbin0 -> 37543 bytes
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.tex16
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/ducks.csv6
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/ducks.pdfbin0 -> 34447 bytes
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/ducks.tex15
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.pdfbin0 -> 76876 bytes
-rw-r--r--Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.tex132
10 files changed, 216 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/invoice-class/README.md b/Master/texmf-dist/doc/latex/invoice-class/README.md
new file mode 100644
index 00000000000..1a948430721
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/README.md
@@ -0,0 +1,6 @@
+# invoice-class
+The `invoice-class` produces a standard US commercial invoice using data from a CSV file. Invoices can span multiple pages. The class is configurable for different shipping addresses.
+
+The class is released under the LPPL 1.3 licence.
+
+
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.cfg b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.cfg
new file mode 100644
index 00000000000..05acf7197b0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.cfg
@@ -0,0 +1,10 @@
+% Sample configuration file
+\fromaddress{%
+The Duck Company\\
+Some Avenue\\
+Somewhere MI 48823\\
+USA\\
+Tel. 555-555-5555\\
+}
+\shipper{Prof. van Duck}
+\location{Somewhere, MI}
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.csv b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.csv
new file mode 100644
index 00000000000..d5acc1bf448
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.csv
@@ -0,0 +1,31 @@
+Description, Country, Quantity, UnitValue, Amount
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.pdf b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.pdf
new file mode 100644
index 00000000000..49a247b270b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.tex b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.tex
new file mode 100644
index 00000000000..01d54398d67
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/duck-invoice.tex
@@ -0,0 +1,16 @@
+\documentclass{invoice-class}
+\ConfigPrefix{duck-}
+\InputFile{duck-invoice.csv}
+\waybill{8273205776}
+\carrier{FedEx}
+\destination{Brazil}
+\toaddress{Paulo Cereda\\Rua Bonita\\Cidade de Patos\\SP\\Brazil}
+\weight{1}{1}
+\packages{1}
+\shippingcost{40.00}
+\packingcost{0.00}
+\insurancecost{10.00}
+\begin{document}
+\printinvoice
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.csv b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.csv
new file mode 100644
index 00000000000..6139c455937
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.csv
@@ -0,0 +1,6 @@
+Description, Country, Quantity, UnitValue, Amount
+Yellow Ducks, USA,5,2.00,10.00
+Pink Ducks, USA,4,15.00,60.00
+Blue Ducks, USA,6,5.00,30.00
+Orange Ducks, USA,1,4.00,4.00
+Red Ducks, USA,30,2.00,60.00 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.pdf b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.pdf
new file mode 100644
index 00000000000..c837f2eaee2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.tex b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.tex
new file mode 100644
index 00000000000..eb938fca2bf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/ducks.tex
@@ -0,0 +1,15 @@
+\documentclass{invoice-class}
+\InputFile{ducks.csv}
+\waybill{8273205776}
+\carrier{FedEx}
+\destination{Brazil}
+\toaddress{Paulo Cereda\\Rua Bonita\\Cidade de Patos\\SP\\Brazil}
+\weight{1}{1}
+\packages{1}
+\shippingcost{40.00}
+\packingcost{0.00}
+\insurancecost{10.00}
+\begin{document}
+\printinvoice
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.pdf b/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.pdf
new file mode 100644
index 00000000000..40271306b30
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.tex b/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.tex
new file mode 100644
index 00000000000..4e1e09ad7b4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/invoice-class/doc/invoice-class.tex
@@ -0,0 +1,132 @@
+\documentclass[11pt]{article}
+\title{\textbf{Using the Invoice Class}}
+\author{\textbf{Alan Munn}\\Department of Linguistics and Languages\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}}
+\date{Version 1.0\\January 17, 2019}
+\usepackage{fontspec}
+\setmainfont[]{Linux Libertine O}
+\setsansfont[]{Linux Biolinum O}
+\setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}
+\usepackage[lmargin=1in,rmargin=1in,tmargin=1.25in,bmargin=1in]{geometry}
+\usepackage{titling}
+\usepackage{array, booktabs, multicol, xspace,tabularx}
+\usepackage{enumitem}
+\usepackage{caption}
+\usepackage{fancyvrb,listings,url}
+\usepackage{pdfpages}
+\usepackage[sf]{titlesec}
+\usepackage{titleps}
+\newpagestyle{main}{%
+\setfoot{\itshape Invoice Class}{}{\thepage}}
+\pagestyle{main}
+
+\usepackage[colorlinks=true]{hyperref}
+
+\DefineShortVerb{\|}
+\newcommand*\bs{\textbackslash}
+
+\lstset{%
+ basicstyle=\ttfamily\small,
+ commentstyle=\itshape\ttfamily\small,
+ showspaces=false,
+ showstringspaces=false,
+ breaklines=true,
+ breakautoindent=true,
+ frame=single
+ captionpos=t
+ language=TeX
+}
+
+\newcommand*{\pkg}[1]{\texttt{#1}\xspace}
+\setitemize[1]{label={}}
+\setitemize[2]{label={}}
+\setdescription{font={\normalfont}}
+\setlength{\droptitle}{-1in}
+
+
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+\section{Introduction}
+The \pkg{invoice-class} class allows printing of a standard US commercial invoice using invoice data from a CSV spreadsheet. Invoices can span multiple pages.
+
+\section{Class document commands}
+The main class commands specify the parts of the form that need to be filled in. Each command except |\weight| takes a single argument.
+
+\begin{center}
+\begin{tabularx}{.8\textwidth}{>{\ttfamily\bs}l<{\{\}}X}
+\toprule
+\multicolumn{1}{c}{Command name} & \multicolumn{1}{l}{Description}\\
+\midrule
+{waybill}& waybill number\\
+{shippingdate}& shipping date (default is \texttt{\bs today})\\
+{carrier}& name of the freight carrier\\
+{destination}& destination country\\
+{toaddress}& Destination address\\
+\multicolumn{1}{>{\ttfamily\bs}l}{weight\{<lbs>\}\{<oz>\}} & weight in pounds and ounces\\
+{packages}{1} & number of packages in the shipment\\
+{shippingcost}& total cost of shipping (default = 0.00)\\
+{packingcost} & total cost of packing (default = 0.00)\\
+{insurancecost} & total cost of insurance (default is 0.00)\\
+{InputFile} & name of the CSV file for item date\\
+\bottomrule
+\end{tabularx}
+\captionof{table}{Invoice document commands}\label{commands}
+\end{center}
+
+\subsection{Producing the invoice}
+Once all the required elements are specified (which can be done in the preamble), there is a single command to produce the invoice:
+\begin{center}
+\begin{tabularx}{.8\textwidth}{>{\ttfamily\bs}lX}
+{printinvoice} & Prints the invoice\\
+\end{tabularx}
+\end{center}
+
+\section{Class configuration commands}
+Since an invoice will generally have a fixed From address, shipper and location, these values are best set in a separate configuration file (although they can also be set within the document.) The class will look for the file |invoice.cfg| or, |<prefix>invoice.cfg| where |<prefix>| is specified using the document command |\ConfigPrefix|. This allows multiple configuration files with different information within them.
+Each configuration file should contain an instance of |\fromaddress|, |\shipper|, and |\location|.
+\begin{center}
+\begin{tabularx}{.8\textwidth}{>{\ttfamily\bs}l<{\{\}}X}
+\toprule
+\multicolumn{1}{c}{Command name} & \multicolumn{1}{l}{Description}\\
+\midrule
+{fromaddresss}& shipper's address\\
+{shipper}& name of shipper\\
+{location}& location\\
+{ConfigPrefix} & configuration file prefix (default is none)\\
+\bottomrule
+\end{tabularx}
+\captionof{table}{Invoice configuration commands}\label{config-commands}
+\end{center}
+
+
+\section{\pkg{datatool} details}
+The uses the \pkg{datatool} package to produce the invoice using a CSV file. The CSV file requires the following column headings to be present. All other columns are ignored. (Heading names are case-sensitive.)
+\begin{center}
+\begin{tabularx}{.8\textwidth}{>{\ttfamily}lX}
+\toprule
+\multicolumn{1}{c}{Column name} & \multicolumn{1}{l}{Description}\\
+\midrule
+{Description} & Item description\\
+{Country} & Country of origin\\
+{Quantity} & unit quantity\\
+{UnitValue} & per unit value\\
+{Amount} & total value for item\\
+\bottomrule
+\end{tabularx}
+\captionof{table}{Required CSV Column labels}\label{CSV}
+\end{center}
+\subsection{Sample CSV file}
+\lstinputlisting{ducks.csv}
+\clearpage
+\section{Sample Configuration file}
+\lstinputlisting{duck-invoice.cfg}
+
+\section{Sample document}
+\lstinputlisting{ducks.tex}
+\section{Bugs and support}
+This package is released as is, and although I will accept bug reports, fixing them may not be a priority. You're free to fork the project to modify it as you wish.
+
+
+\includepdf[]{ducks.pdf}
+\end{document}