Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eroux committed Mar 27, 2014
1 parent 5388c67 commit 936f6b1
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Affirmer's express Statement of Purpose.
CC0 or use of the Work.

For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>
<http://creativecommons.org/publicdomain/zero/1.0/>
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
latex-yait
==========

Yet Another LaTeX Invoice Template
Yet Another LaTeX Invoice Template!

This is a minimal and easily customizable LaTeX template for nice and
clean invoices. It should work under PDFLaTeX, but compilation with LuaLaTeX
will use more beautiful fonts.

It was first used as a template for invoices specific to the French status of
"Auto-entrepreneur", do not hesitate to ask me for a more specific template.

It is under the CC0 license (see LICENSE file) so you can easily adapt it
without even noticing me (though I would appreciate it!).
189 changes: 189 additions & 0 deletions yait.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
\documentclass[a4paper]{article}



\usepackage[top=1.5cm, bottom=1.5cm, left=2cm, right=2cm]{geometry}
\usepackage{ifxetex}
\usepackage{ifluatex}
\newif\ifmodernTeX
\modernTeXfalse
\ifluatex
\modernTeXtrue
\fi
\ifxetex
\modernTeXtrue
\fi

\ifmodernTeX
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}

\setmainfont[
BoldFont=LinLibertineOZ,
BoldItalicFont=LinLibertineOZI,
SmallCapsFont=LinLibertineO,
SmallCapsFeatures={Letters=SmallCaps},
]{LinuxLibertineO}

\newfontfamily\spacedFont[LetterSpace=2.0]{LinuxLibertineO}

\newfontfamily\displayFont[Extension=.otf,
BoldFont=LinLibertine_DR,%fake
ItalicFont=LinLibertine_DR,%fake
BoldItalicFont=LinLibertine_DR,%fake
]{LinLibertine_DR}

\setsansfont[Extension=.otf,
BoldFont=LinBiolinum_RB,
ItalicFont=LinBiolinum_RI,
BoldItalicFont=LinBiolinum_RB,% fake
SmallCapsFont=LinBiolinum_R,
SmallCapsFeatures={Letters=SmallCaps},
]{LinBiolinum_R}

\setmonofont[Extension=.otf]{Inconsolata}

\else

\let\spacedFont\relax
\let\displayFont\relax

\fi

%%%%%%%%%%%%%%%%%%%%%%
% content definition %
%%%%%%%%%%%%%%%%%%%%%%

\title{Title of the invoice}
\date{\today }
\xdef\invoicenum{001}
\xdef\companyname{Comp.}
\xdef\companyaddress{foo, bar street, XXXXX City}
\xdef\companysiren{XXX XXXX XXXX}
\xdef\companytel{XX\,XX\,XX\,XX\,XX}
\xdef\companyemail{[email protected]}
\xdef\bankiban{XXXX\,XXXX\,XXXX\,XXXX\,XXXX\,XXXX\,XXXX}
\xdef\bankbic{XXX\,XXX\,XXX}
\long\xdef\conditions{write the sell conditions here

on several lines}

\makeatletter
\let\thetitle\@title
\makeatother

\usepackage[pdfencoding=auto,unicode, bookmarks=false, colorlinks=false, pdfborder={0 0 0},pdftitle={Invoice from XXX}, pdfauthor={XXX}, pdfsubject={Invoice}, pdfkeywords={Invoice, XXX}]{hyperref}
\pagestyle{empty}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{array}
\usepackage{tabu}
\usepackage{multicol}
\usepackage[norule]{footmisc}

%%%%%%%%%%%%%%%%%%%%%
% color definitions %
%%%%%%%%%%%%%%%%%%%%%

\colorlet{headcolor}{gray!21}
\colorlet{tablecolor1}{gray!4}
\colorlet{tablecolor2}{gray!11}
\colorlet{footnotegray}{gray!90}

% the right shift of the right blocks
\xdef\rightalignment{11cm}

% footnote style
\def\footnotestyle#1{%
{\textsf{\color{footnotegray}\fontsize{3mm}{0mm}\selectfont #1}}%
}

% change color of footnote marks
\makeatletter
\renewcommand\@makefntext[1]{%
\parindent 1em\noindent
\hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\color{footnotegray}\@thefnmark}}#1}
\makeatother

\begin{document}

\parbox[b][2cm][t]{\rightalignment}{{\color{gray!95}\displayFont\fontsize{1.5cm}{1.5cm}\selectfont %
\vbox to 1cm{\vss %
%
\companyname{}%
%
}}
\vskip 3mm%
{\fontsize{0.44cm}{0.5cm}%
\emph{thank you for your confidence!}%
}
}%
%
\parbox[b][2cm][t]{0.35\textwidth}{\ttfamily {%
{\color{gray!95}\fontsize{1.5cm}{1.5cm}\selectfont %
\vbox to 1cm{\vss \leavevmode \kern -1mm %
%
Invoice%
%
}}}}

\kern -5mm

\leavevmode\kern \rightalignment \parbox{0.35\textwidth}{\ttfamily N\textsuperscript{o} \invoicenum\\
\today }

\vskip 0.7cm

\leavevmode\kern \rightalignment\kern -3mm \colorbox{gray!85}{
\kern 1mm\begin{minipage}[t]{0.5\textwidth}
\color{white}
\vskip 2mm
Company \textbf{Foo},\\
Temple Bar,\\
Dublin.\\
\vspace*{-3mm}%
\end{minipage}
}

\vskip 2.3cm

\begin{center}
{\ttfamily\LARGE \thetitle}

\rule{2cm}{0.25pt}
\end{center}

\tabulinesep=3mm
\begin{longtabu} to \textwidth{X[6,L,m]X[1,c,m]X[1,c,m]X[0.5,r,m]}
\taburowcolors 1{headcolor .. headcolor}
\rowfont[c]{\bfseries}%
product & unit price & qty. & price \tabularnewline
\taburowcolors 1{tablecolor1 .. tablecolor2}
My product 1 & 15\,€ & 10 & 150\,\\
My product 2 & 25\,€ & 10 & 250\,\\
My product 3 & 35\,€ & 10 & 350\,\\
My product 4 & 45\,€ & 10 & 450\,\\
\taburowcolors 1{headcolor .. headcolor}\tabulinesep=3mm
Total\footnote{\footnotestyle{example of footnote}} & & & \hbox to 0pt{\vbox to 0cm{\kern 0.61cm 1200\,\vss}\hss}\\[3mm]
\end{longtabu}

\vfill

\small

\setlength{\columnsep}{1.5cm}
\begin{multicols}{2}
\noindent\companyname{},\\
Auto-entrepreneur {\small (APE XXXXX)},\\
\companyaddress{},\\
SIREN\,: \companysiren{},\\
\hbox to 1cm{Tél\,:\hss} \companytel,\\
\hbox to 1cm{Mél\,:\hss} \companyemail,\\
\hbox to 1cm{IBAN\,:\hss} \bankiban,\\
\hbox to 1cm{BIC\,:\hss} \bankbic
\end{multicols}

\footnotestyle{\textbf{Conditions de paiement:} \conditions }

\end{document}

0 comments on commit 936f6b1

Please sign in to comment.