summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kropat <mail@michael.kropat.name>2015-04-11 11:44:41 -0400
committerMichael Kropat <mail@michael.kropat.name>2015-04-11 11:44:41 -0400
commitfa74b657d68a235360fd748246ce2abf5b269cb6 (patch)
treec1ef75749344897d1c8d31faf7595ec1cfcf440e
Prepare for general release
-rw-r--r--.gitignore4
-rw-r--r--Fonts/Apache License.txt201
-rw-r--r--Fonts/FontAwesome.otfbin0 -> 93888 bytes
-rw-r--r--Fonts/OpenSans-Bold.ttfbin0 -> 224592 bytes
-rw-r--r--Fonts/OpenSans-Italic.ttfbin0 -> 212896 bytes
-rw-r--r--Fonts/OpenSans-LightItalic.ttfbin0 -> 213128 bytes
-rw-r--r--Fonts/OpenSans-Regular.ttfbin0 -> 217360 bytes
-rw-r--r--Makefile40
-rw-r--r--dapper-invoice.cls301
-rw-r--r--example.tex70
10 files changed, 616 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ef5f7e5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.aux
+*.log
+*.out
+*.pdf
diff --git a/Fonts/Apache License.txt b/Fonts/Apache License.txt
new file mode 100644
index 0000000..989e2c5
--- /dev/null
+++ b/Fonts/Apache License.txt
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/Fonts/FontAwesome.otf b/Fonts/FontAwesome.otf
new file mode 100644
index 0000000..f7936cc
--- /dev/null
+++ b/Fonts/FontAwesome.otf
Binary files differ
diff --git a/Fonts/OpenSans-Bold.ttf b/Fonts/OpenSans-Bold.ttf
new file mode 100644
index 0000000..fd79d43
--- /dev/null
+++ b/Fonts/OpenSans-Bold.ttf
Binary files differ
diff --git a/Fonts/OpenSans-Italic.ttf b/Fonts/OpenSans-Italic.ttf
new file mode 100644
index 0000000..c90da48
--- /dev/null
+++ b/Fonts/OpenSans-Italic.ttf
Binary files differ
diff --git a/Fonts/OpenSans-LightItalic.ttf b/Fonts/OpenSans-LightItalic.ttf
new file mode 100644
index 0000000..68299c4
--- /dev/null
+++ b/Fonts/OpenSans-LightItalic.ttf
Binary files differ
diff --git a/Fonts/OpenSans-Regular.ttf b/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..db43334
--- /dev/null
+++ b/Fonts/OpenSans-Regular.ttf
Binary files differ
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5a11bb4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+.SUFFIXES: .tex .pdf
+
+.PHONEY : default install uninstall clean pdf watch
+
+REPORT = example
+SHOW = $(REPORT)
+
+$(REPORT).pdf: $(REPORT).tex dapper-invoice.cls
+
+default: pdf
+
+pdf: $(REPORT:%=%.pdf)
+
+.tex.pdf:
+ xelatex $* && xelatex $*
+
+watch: pdf
+ @echo watching \'$(SHOW).tex\' to run \'$(MAKE) pdf\'
+ @ruby -e "file = '$(SHOW).tex'" \
+ -e "command = '$(MAKE) pdf'" \
+ -e "lm = File.mtime file" \
+ -e "while true do" \
+ -e " m = File.mtime file" \
+ -e " system command unless m==lm" \
+ -e " lm = m" \
+ -e " sleep 0.25" \
+ -e "end"
+
+install: dapper-invoice.cls
+ mkdir -p "$$(kpsewhich -expand-var '$$TEXMFHOME')/tex/latex/base"
+ cp -a $? "$$(kpsewhich -expand-var '$$TEXMFHOME')/tex/latex/base/"
+
+uninstall:
+ rm -f "$$(kpsewhich -expand-var '$$TEXMFHOME')/tex/latex/base/dapper-invoice.cls"
+
+clean:
+ rm -rf $(REPORT:%=%.aux) $(REPORT:%=%.bbl) $(REPORT:%=%.blg)
+ rm -rf $(REPORT:%=%.log) $(REPORT:%=%.toc) $(REPORT:%=%.dvi)
+ rm -rf $(REPORT:%=%.ind) $(REPORT:%=%.ilg) $(REPORT:%=%.nls)
+ rm -rf $(REPORT:%=%.nlo) $(REPORT:%=%.out)
diff --git a/dapper-invoice.cls b/dapper-invoice.cls
new file mode 100644
index 0000000..ec5228a
--- /dev/null
+++ b/dapper-invoice.cls
@@ -0,0 +1,301 @@
+% dapper-invoice.cls -- a billable-hours invoice featuring style over substance
+
+% ## A Note About The Design
+%
+% I am not a designer. Inspiration for the design comes from
+% stea^H^H^H^Hborrowing design ideas from good looking invoices people have
+% published at [1] among other sources. The resulting design is not even in
+% the same league, but I think it gets the job done.
+
+% [1] http://www.smashingmagazine.com/2009/11/05/invoice-like-a-pro/
+
+\ProvidesClass{dapper-invoice}[2015/01/18]
+\NeedsTeXFormat{LaTeX2e}
+\LoadClass[11pt]{article}
+
+\RequirePackage[hmargin=.75in,vmargin=1in]{geometry}
+
+% For links and metadata
+\RequirePackage[hidelinks]{hyperref}
+
+% For adjusting letter spacing
+\RequirePackage{soul}
+
+% For "At*" hooks
+\RequirePackage{etoolbox}
+
+% For adjusting footer
+\RequirePackage{fancyhdr}
+
+% For tables
+\RequirePackage{longtable}
+
+% Caluclating due date
+\RequirePackage{datenumber}
+
+% Drawing the arrow
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\usetikzlibrary{fpu}
+
+% For invoice math
+\RequirePackage{fp}
+
+% Customizing lists
+\RequirePackage{enumitem}
+
+% Formatting numbers
+\RequirePackage{siunitx}
+\sisetup{round-integer-to-decimal, group-separator={,}}
+
+\RequirePackage{fontspec}
+
+\defaultfontfeatures{
+ Ligatures = TeX,
+ Path = ./Fonts/ }
+
+\IfFileExists{./Fonts/OpenSans-Regular.ttf}{
+ \setmainfont[ BoldFont = OpenSans-Bold, ItalicFont = OpenSans-Italic ]{OpenSans-Regular}
+ \setsansfont[ BoldFont = OpenSans-Bold, ItalicFont = OpenSans-Italic ]{OpenSans-Regular}
+}{}
+
+
+%%%%% Commands %%%%%
+
+\newcommand*{\setmetadata}[4]{
+ \hypersetup{
+ bookmarksopen = false,
+ bookmarksdepth = 2,% to show sections and subsections
+ pdfauthor = {#1},
+ pdftitle = {#2 --- Invoice \##3 for #4},
+ pdfsubject = {Invoice \##3},
+ pdfkeywords = {invoice, #2, #4}
+ }
+}
+
+\newcommand*{\twocolumnlayout}[2]{
+ \begin{tabular}[t]{@{} p{.5\linewidth} @{} p{.5\linewidth} @{}} #1 & #2 \end{tabular}
+}
+
+\sodef\invoiceSpacing{}{.15em}{.4em}{.4em}
+\newcommand*{\makeheader}[2]{
+ \begin{minipage}[t]{.6\linewidth} {\headerStyle #1} \end{minipage}
+ \hfill
+ \begin{tabular}[t]{@{} c @{}}
+ {\headerStyle \invoiceSpacing{INVOICE} \##2} \\
+ {\color{subduedColor} \today}
+ \end{tabular}
+
+ \addvspace{8ex}
+}
+
+\newcommand*{\duedate}[1]{%
+ \setdatetoday%
+ \addtocounter{datenumber}{#1}%
+ \setdatebynumber{\thedatenumber}%
+ \datedate%
+}
+
+\newcommand*{\infoSectionStyle}{\hspace{2em}}
+\newcommand*{\infoSubStyle}{\small\slshape}
+
+\newenvironment{infoSection}{\infoSectionStyle \tabular[t]{@{} r @{\hspace{0.5em}} l}}{\endtabular}
+\newcommand{\infoBox}[2]{
+ {\titleStyle #1} & \begin{minipage}[t]{.35\textwidth} #2 \end{minipage} \\
+ \noalign{\addvspace{2ex}}
+}
+\newcommand{\infoSub}[2]{
+ \noalign{\vspace{-1.8ex}}
+ {\color{subduedColor} #1} & \begin{minipage}[t]{.35\textwidth} \infoSubStyle #2 \end{minipage} \\
+ \noalign{\addvspace{2ex}}
+}
+
+\newcommand{\emaillink}[1]{%
+ \href{mailto:#1}{#1}%
+}
+
+\newcommand*{\itemizationRowStyle}[0]{\small}
+\newcommand*{\itemizationHeaderStyle}[0]{\normalsize\color{highlightColor}}
+
+\newcounter{colskipcount}
+
+\newenvironment{hoursItemization}{
+ \setcounter{colskipcount}{5}
+ \setlength\LTleft{0pt}
+ \setlength\LTright{0pt}
+ \begin{longtable}{c @{\hspace{1.5em}} p{.6\textwidth} r @{} l r r}
+ \hline
+ \noalign{\smallskip}
+ {\itemizationHeaderStyle Date} &
+ {\itemizationHeaderStyle Description} &
+ {\itemizationHeaderStyle Hours} &
+ {\itemizationHeaderStyle Rate} &
+ {\itemizationHeaderStyle Amount}
+ \\
+ \noalign{\smallskip}
+ \hline
+ \noalign{\bigskip}
+ \endhead
+ \noalign{\bigskip}
+ \hline
+ \endfoot
+ \endlastfoot
+}{
+ \end{longtable}
+}
+
+\newenvironment{hoursItemizationWithProject}{
+ \setcounter{colskipcount}{6}
+ \setlength\LTleft{0pt}
+ \setlength\LTright{0pt}
+ \begin{longtable}{c c @{\hspace{1.5em}} p{.5\textwidth} r @{} l r r}
+ \hline
+ \noalign{\smallskip}
+ {\itemizationHeaderStyle Date} &
+ {\itemizationHeaderStyle Project} &
+ {\itemizationHeaderStyle Description} &
+ \multicolumn{2}{l}{\itemizationHeaderStyle Hours} &
+ {\itemizationHeaderStyle Rate} &
+ {\itemizationHeaderStyle Amount}
+ \\
+ \noalign{\smallskip}
+ \hline
+ \noalign{\bigskip}
+ \endhead
+ \noalign{\bigskip}
+ \hline
+ \endfoot
+ \endlastfoot
+}{
+ \end{longtable}
+}
+
+\gdef\InvoiceTotal{0}
+
+\newcommand*{\calcamount}[2]{%
+ \FPmul\t{#1}{#2}%
+ \formatdollars{\t}%
+%
+ \FPadd\gt{\InvoiceTotal}{\t}%
+ \global\let\InvoiceTotal\gt%
+}
+
+\newcommand*\@formatFraction[1]{
+ \ifnum\Numerator=25 ¼\fi%
+ \ifnum\Numerator=50 ½\fi%
+ \ifnum\Numerator=75 ¾\fi%
+}
+
+\newcommand*\@formatHoursLeft[1]{
+ \pgfmathtruncatemacro{\WholePortion}{int(#1)}%
+ \pgfmathtruncatemacro{\Numerator}{100*(#1-\WholePortion)}%
+ \ifnum\WholePortion=0%
+ \@formatFraction{\Numerator}%
+ \else%
+ \WholePortion%
+ \fi%
+}
+
+\newcommand*\@formatHoursRight[1]{
+ \pgfmathtruncatemacro{\WholePortion}{int(#1)}%
+ \pgfmathtruncatemacro{\Numerator}{100*(#1-\WholePortion)}%
+ \ifnum\WholePortion=0%
+ \else%
+ \@formatFraction{\Numerator}%
+ \fi%
+}
+
+\newcommand{\lineitem}[4]{
+ {\itemizationRowStyle #1} &
+ \begin{minipage}[t]{.6\textwidth}
+ \begin{itemize}[leftmargin=0pt, labelsep=1pt, itemsep=0pt] \itemizationRowStyle #4 \end{itemize}
+ \end{minipage} &
+ {\itemizationRowStyle \@formatHoursLeft{#2}} &
+ {\itemizationRowStyle \@formatHoursRight{#2}} &
+ {\itemizationRowStyle \$#3} &
+ {\itemizationRowStyle \$\calcamount{#2}{#3}}
+ \\
+ \noalign{\medskip}
+}
+
+\newcommand{\lineitemp}[5]{
+ {\itemizationRowStyle #1} &
+ {\itemizationRowStyle #4} &
+ \begin{minipage}[t]{0.5\textwidth}
+ \begin{itemize}[leftmargin=0pt, labelsep=1pt, itemsep=0pt] \itemizationRowStyle #5 \end{itemize}
+ \end{minipage} &
+ {\itemizationRowStyle \@formatHoursLeft{#2}} &
+ {\itemizationRowStyle \@formatHoursRight{#2}} &
+ {\itemizationRowStyle \$#3} &
+ {\itemizationRowStyle \$\calcamount{#2}{#3}}
+ \\
+ \noalign{\medskip}
+}
+
+\newcommand{\beginsummary}{
+ \noalign{\bigskip}
+ \hline
+ \noalign{\medskip}
+}
+
+\newcommand*{\summaryline}[2]{
+ \multicolumn{\thecolskipcount}{r}{\itemizationHeaderStyle #1} & #2 \\
+}
+
+\newcommand*{\tikzmark}[1]{\tikz[overlay,remember picture] \node ({#1}) {};}
+\newcommand*{\arrowbase}{\tikzmark{@p1}}
+\newcommand*{\arrowtarget}{\tikzmark{@p2}}
+\newcommand*{\drawarrow}{
+ \tikz[overlay,remember picture] {
+ \draw[->,thick,color=subduedColor] ($(@p1)+(0.75em,1.5ex)$) -| ($(@p2)+(-2em,0.7ex)$) -- ($(@p2)+(-0.5em,0.7ex)$);
+ }
+}
+
+\newcommand*{\formatdollars}[1]{%
+ \num[group-separator={,}, group-minimum-digits=3, round-mode=places, round-precision=2]{#1}%
+}
+
+% Implementation by Werner (http://tex.stackexchange.com/a/176815/35707)
+\newcommand*{\dectofrac}[1]{\begingroup%
+ \pgfkeys{/pgf/number format/frac}% Format as fraction
+ \let\frac\sfrac% Let \frac act like \sfrac
+ \pgfmathprintnumber{#1}\endgroup}
+
+% Debugging
+\newcommand{\showbb}[1]{{\color{red!50}\leavevmode\rlap{\fbox{\phantom{#1}}}}#1}
+
+%%%%% Styles %%%%%
+
+\RequirePackage{xcolor}
+\definecolor{highlightColor}{rgb}{0.22,0.45,0.70}% light blue
+\definecolor{subduedColor}{rgb}{0.45,0.45,0.45}% dark grey
+
+\def\headerStyle{\Huge}
+\def\titleStyle{\color{highlightColor}}
+
+% Add page numbers
+\fancypagestyle{plain}{
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}
+ \fancyhf{}}
+% page numbers in footer if more than 1 page
+% Copied from moderncv
+\AtEndPreamble{%
+ \AtBeginDocument{%
+ \@ifundefined{r@lastpage}{}{%
+ \ifthenelse{\pageref{lastpage}>1}{%
+ \newlength{\pagenumberwidth}%
+ \settowidth{\pagenumberwidth}{\thepage/\pageref{lastpage}}%
+ \fancypagestyle{plain}{%
+ \fancyfoot[r]{\parbox[b]{\pagenumberwidth}{\thepage/\pageref{lastpage}}}%
+ }%
+ \pagestyle{plain}%
+ }{}%
+ }%
+ \AtEndDocument{\label{lastpage}}%
+ }%
+}
+\pagestyle{plain}
+
+% Disable paragraph indent
+\setlength{\parindent}{0pt}
diff --git a/example.tex b/example.tex
new file mode 100644
index 0000000..bf8f455
--- /dev/null
+++ b/example.tex
@@ -0,0 +1,70 @@
+\documentclass[letterpaper]{dapper-invoice}
+
+\def\invoiceNo{101}
+\def\total{125}
+\def\duein{15}% days
+
+\def\me{Your~Name}
+\def\clientName{Sample~Client}
+
+\setmetadata{\me}{Your Biz}{\invoiceNo}{\clientName}
+
+\defaultfontfeatures{ Path = ./Fonts/ }
+\usepackage{fontawesome}
+
+\begin{document}
+
+\newfontface\mainLightItalic{OpenSans-LightItalic}
+\makeheader{Your\ \mainLightItalic Biz}{\invoiceNo}
+
+\twocolumnlayout{
+ \begin{infoSection}
+ \infoBox{Client}{\clientName \\
+ 123 Street Address \\
+ City, State 55555 }
+ \infoBox{Project}{\#123.456}
+ \infoBox{Contact}{Jane Smith}
+ \infoSub{\faMobilePhone}{\small\slshape +1~(555)~555-5555}
+ \noalign{\addvspace{8ex}}
+ \infoBox{}{
+ {\large\raisebox{.55\height}\$\huge\formatdollars{\total} \arrowbase} \\
+ {\small\color{subduedColor} due \duedate{\duein}}
+ }
+ \end{infoSection}
+}{
+ \begin{infoSection}
+ \infoBox{\arrowtarget Payable To}{
+ \me \\
+ 1234 Sycamore Ave \\
+ Blacksburg, VA 24060
+ }
+ \infoSub{\faMobilePhone}{\small\slshape +1~(555)~555-5555}
+ \infoSub{\tiny\faEnvelope}{\small\slshape \emaillink{you@example.com}}
+ \end{infoSection}
+}
+
+\drawarrow
+
+\addvspace{4ex}
+
+\begin{hoursItemizationWithProject}
+
+ \lineitemp{2015/4/11}{2}{50}{Invoice}{
+ \item Discussed requirements with client}
+
+ \lineitemp{2015/4/11}{1.25}{50}{Invoice}{
+ \item Wrote Invoice in LaTeX}
+
+ \lineitemp{2015/4/11}{0.5}{50}{Invoice}{
+ \item Packaged Invoice in .cls file}
+
+ \beginsummary
+
+ \summaryline{Total}{\$\formatdollars{\InvoiceTotal}}
+
+ \summaryline{Paid}{\$\formatdollars{50}}
+ \summaryline{Balance Due}{\$\formatdollars{137.50}} % not really any math support (yet)
+
+\end{hoursItemizationWithProject}
+
+\end{document}