%
% Originally in http://www.debian.org/~jgg/card.tex
% Originally in https://www.debian.org/events/materials/business-cards/traditional-new/
%
%  Debian GNU/Linux developer business card template
%
%  This template is vaguely based on several similar ones I have
%  found elsewhere on the web; it uses a LaTeX ``picture'' environment
%  to position the text all around an individual card, and wraps that
%  in a bigger ``picture'' which renders 10 cards on the page in a
%  layout suitable for printing on Avery pre-punched business card
%  stock.
%
%  The modified cut marks are aligned outside the actual card. When cutting
%  this makes sure that there is no slight black line on the top or the
%  bottom of the cards. The best way to cut them is using a cutting wheel
%  [looks like a pizza cutter but is extrmely sharp] and a plastic pad. Use
%  a rular to guide the cutter. Cut the three vertical divisions first, but 
%  do not go past the top or bottom of the page. After that cut each card 
%  horizontally. If you have a sharp cutter you can cut more than one sheet
%  at once like this. The prefered type of paper is a heavy paper run through
%  a laser in the `straight through' path [usually in the manual feed and
%  out the face up tray on the back]

\documentclass[11pt]{article}
\usepackage[dvips]{graphicx}
%
%  I personally like the look of the CM fonts, especially compared to
%  plain old times/helvetica.  Of course, you can select a different
%  set of fonts here if you like -- Adobe Myriad looks good on a card,
%  and for mixed serif/sans the Stone family hangs together nicely,
%  but unfortunately those aren't part of TeX.
%
%\usepackage{times}
\usepackage{ccfonts}
%
\pagestyle{empty}
%
%  Before printing a final copy, you will probably have to tweak these
%  values to get the cards to properly line up with the cut marks.
%  Avery provides a sizing overlay with their cards; if you're having
%  these professionally printed, get the appropriate dimensions from
%  your printer [and you might need to adjust the multiput commands
%  below!].
%
\setlength{\textwidth}{7in}
\setlength{\hoffset}{0in}
\setlength{\voffset}{0in}
\setlength{\oddsidemargin}{-.8in}
\setlength{\evensidemargin}{-.8in}
\setlength{\textheight}{10in}
\setlength{\topmargin}{-0.87in}

%
% Debian logo
% source: https://www.debian.org/logos/openlogo-nd.eps
\newcommand{\logo}{\includegraphics[scale=0.20]{./openlogo-nd.eps}}

%
% Big Debian logo
% source: https://www.debian.org/logos/openlogo.eps
\newcommand{\biglogo}{\includegraphics[scale=0.75]{./openlogo.eps}}

%
% Big Debian logo (without "Debian")
% source: https://www.debian.org/logos/openlogo-nd.eps
\newcommand{\biglogond}{\includegraphics[scale=1]{./openlogo-nd.eps}}

%
%  The Bottle version of the logo was created with:
%    fig2dev -L ps -m 0.5 officiallogo.fig bottle.eps
%\newcommand{\logo}{\includegraphics{./smallbottle.eps}}

%
% The QR-code (produced by the Makefile).
% Beware: the longer the URL is, the bigger the QR code will be.
\newcommand{\qrcode}{\includegraphics[scale=0.25]{./qrcode.ps}}

%
%  Text variables for the card.  If you want to change how these are
%  rendered, see below.
%
\newcommand{\xdebian}{Debian GNU/Linux}
\newcommand{\xdeburl}{http://www.debian.org/}
\newcommand{\xname}{Nicolas Tesla}
\newcommand{\xtitle}{, Developer}
\newcommand{\xaddress}{Gerlach Hotel}
\newcommand{\xaddressb}{27th Street, Chicago}
\newcommand{\xphone}{+99-(0)-123-456-789}
\newcommand{\xemail}{fubar@debian.org}
\newcommand{\yemail}{tesla@example.com}
\newcommand{\xurl}{http://example.com/}
\newcommand{\xpgpqr}{PGP KEY URL}

%
%  The PGP keys are printed in a tiny little font along the bottom
%  edge of the card.  If you come up with a better way to fit them in,
%  let me know.
%
% You can get the fingerprint by doing : 'pgp -kvc <userid>'
\newcommand{\xpgpkeyidA}{12345678}
\newcommand{\xpgpbitsA}{4096R}
\newcommand{\xpgpfingerprintA}{CAFE BABE DEAD BEEF BAAD  F00D DEAD FEED CAFE D00D}
\newcommand{\xpgpkeyA}{\xpgpbitsA/\xpgpkeyidA: \xpgpfingerprintA}

\newcommand{\xpgpkeyidB}{12345678}
\newcommand{\xpgpbitsB}{4096R}
\newcommand{\xpgpfingerprintB}{CAFE BABE DEAD BEEF BAAD  F00D DEAD FEED CAFE D00D}
\newcommand{\xpgpkeyB}{\xpgpbitsB/\xpgpkeyidB: \xpgpfingerprintB}

% There is room for 3 keys, uncomment the bit below and duplicate the above

\newcommand{\pgpfont}{\tt \fontsize{.08in}{.096in}\selectfont}

%

\begin{document}
\setlength{\unitlength}{1mm}

%
% Front page.
%
\begin{picture}(178,253)(-7,-1)

  % Vert ticks along the bottom
  \put(0,-1){\line(0,-1){3}}
  \put(89,-1){\line(0,-1){3}}
  \put(179,-1){\line(0,-1){3}}

  % Vert ticks along the top
  \put(0,255){\line(0,1){3}}
  \put(89,255){\line(0,1){3}}
  \put(179,255){\line(0,1){3}}

    \put(-1,-1){\line(-1,0){3}}
    \put(180,-1){\line(1,0){3}}

  \multiput(0,0)(0,51.0){5}{%
    % Ticks on the side of each card
    \put(-1,51){\line(-1,0){3}}
    \put(180,51){\line(1,0){3}}
    \multiput(0,0)(89,0){2}{%
      \begin{picture}(89,51)(0,0)
	%
	%  Line across the top of the card.
	%
        \put(3,48){\line(1,0){83}}
	%
        \put(13.5,42){\large\textsc{\xdebian}}
        \put(13.5,38){\scriptsize\xdeburl}


	\put(6,28){\textsf{\large\textbf{\xname \xtitle}}}
	%\put(6,28){\textsf{\large\xname \xtitle}}


	% depending on lenth this needs a little manual tweeking, didn't find
	% a way to use right alignment within \put(){}
        %\put(73.8,26){\textsf{\pgpfont \xpgpqr}}
        \put(64,18){\textsf{\scriptsize \xemail}}
        \put(62.5,15){\textsf{\scriptsize \yemail}}
        \put(59.5,12){\textsf{\scriptsize \xurl}}
	       
        \put(6,18){\scriptsize \xaddress}
        \put(6,15){\scriptsize \xaddressb}
	\put(6,12){\scriptsize \xphone}
        
	% For small Swirl
        \put(6.2,37.4){\logo}
        
	% For Bottle
	%\put(6.4,37.2){\logo}
	
	% For Qr-Code
	\put(66.4,25.5){\qrcode}
	
	% For one key [1.2x]
        \put(6,6){\textsf{\pgpfont \xpgpkeyA}}
	
	% For two keys
        %\put(5,8){\textsf{\pgpfont \xpgpkeyA}}
        %\put(5,6){\textsf{\pgpfont \xpgpkeyB}}	
        %\put(5,4){\textsf{\pgpfont \xpgpkeyC}}	% For three keys
	
	%  Line across the bottom of the card.
	%
        \put(3,3){\line(1,0){83}}
      \end{picture}}}
\end{picture}

%
% Verso page.
%
\cleardoublepage

\setlength{\unitlength}{1mm}
\begin{picture}(178,253)(-7,-1)

  % Vert ticks along the bottom
  \put(0,-1){\line(0,-1){3}}
  \put(89,-1){\line(0,-1){3}}
  \put(179,-1){\line(0,-1){3}}

  % Vert ticks along the top
  \put(0,255){\line(0,1){3}}
  \put(89,255){\line(0,1){3}}
  \put(179,255){\line(0,1){3}}

    \put(-1,-1){\line(-1,0){3}}
    \put(180,-1){\line(1,0){3}}

  \multiput(0,0)(0,51.0){5}{%
    % Ticks on the side of each card
    \put(-1,51){\line(-1,0){3}}
    \put(180,51){\line(1,0){3}}
    \multiput(0,0)(89,0){2}{%
      \begin{picture}(89,51)(0,0)
	% For big logo (with "Debian");
        \put(30.0,6.3){\biglogo}

	% For big logo (without "Debian")
        %\put(28.5,6){\biglogond}
      \end{picture}}}
\end{picture}
\end{document}
