% bus_card.tex, Brian Moses [moses@ms.uky.edu], October '95
% further modified by Charles Danforth [danforth@pha.jhu.edu], January 2000
% More modifying by John Vernaleo [vernaleo@astro.umd.edu] August 2007
% More modifying by John Vernaleo [john@netpurgatory.com] May 2008
% Additional modifying by John Vernaleo [john@netpurgatory.com] Dec 2011
% It is now possible to make cards that are designed for a website,
% blog, or something like that rather than only making normal,
% personal business cards.
% I got the original copy from:
% http://casa.colorado.edu/~danforth/comp/cardtex.html
% This is best used with pdflatex (although the various \LaTeX to ps
% to pdf methods do work as they did in the past).

\documentclass{article}
\usepackage{graphicx}
\usepackage{url}
\usepackage[T1]{fontenc}
%%%%%%%%%%%%%%%%%%%%% DEFINE USER SPECIFIC MACROS BELOW %%%%%%%%%%%%%%%%%%%%%
\def\Who     {}
\def\What    {}
\def\Where   {}
\def\Address {}
\def\CityZip {}
\def\Email   {}
\def\TEL     {}
\def\FAX     {}
\urldef{\WEB}\url{}
%Only put something in here if you are making cards for a site rather
%than a person.
\def\isSite  {}
%This is only useful when make cards for a site rather than normal cards.
\def\subtitle {}
\def\logo    {}
\def\logosize {2.5in}
%%%%%%%%%%%%%%%%%%%%% DEFINE USER SPECIFIC MACROS ABOVE %%%%%%%%%%%%%%%%%%%%%
%I put all the above info for me and beth in seperate files, but you
%can just fill in the info above and comment out the line below.  Or
%you can put it in a seperate file which contains only the macros
%above (just the ones you plan on using).
\include{blank}

%\newcommand{\border}{\makebox}  %Use this for no frame
\newcommand{\border}{\framebox} %Use this for visable border for testing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MARGINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\unitlength}{1in}%
\textwidth       8.00in
\textheight     11.00in
\itemindent      0.00in
\parindent       0.00in
\def\lstart{0.0in}

%%%%%%%%%%%%%%%%%%%%Use this block to line up cards with you paper%%%%%%%%%%
%Modify this to move whole thing left or right.
\oddsidemargin   -.32in
%Modify this to move whole up and down.
\topmargin      -1.7in
%This is the size of each card.
\def\cwidth{3.59}
\def\cheight{2.09}
%These are multiples of cheight that are needed for positioning,
\def\cheighttwo{4.18}
\def\cheightthree{6.27}
\def\cheightfour{8.36}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Unless your logo is a very different size, you should never need
%to modify anything below this line.

%%%%%%%%%%%%%%%%%%%%% BUSINESS CARD MACRO [\card] BELOW %%%%%%%%%%%%%%%%%%%%
\ifx \isSite \empty
%For a person's card.
\def\card{\begin{tabular}{c}

    \ifx \logosize \empty
    \else
          \includegraphics[width=\logosize]{\logo}
     \fi
          \vspace{0.10in}\\
          \hspace*{\lstart}{\Large      \Who}\vspace{0.05in}\\
          \hspace*{\lstart}{\normalsize \What}\vspace{0.05in}\\
          \rule[-2ex]{0ex}{2ex}

          \small%
          \begin{tabular}[b]{lr}
            \ifx \TEL \empty
              \hspace*{\lstart}\Where\\          
            \else
              \hspace*{\lstart}\Where & {\footnotesize Tel}: \TEL\\
            \fi
            \ifx \FAX \empty
              \hspace*{\lstart}\Address\\
            \else
              \hspace*{\lstart}\Address & {\footnotesize Fax}: \FAX\\
            \fi
          \hspace*{\lstart}\CityZip & \Email\\
          \end{tabular}\\

          \hspace*{\lstart} \WEB\\

\end{tabular}}

\else
%For cards for a website of blog.
\def\card{\begin{tabular}{c}

    \hspace*{\lstart}{\Large \Who}\vspace{0.04in}\\

    \includegraphics[width=\logosize]{\logo}\\

    \vspace{0.1in}
    
    \hspace*{\lstart} \WEB\\

    \hspace*{\lstart} \subtitle

\end{tabular}}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}
\begin{document}
\typeout{card.tex, by Brian Moses, Dec 2011 version, jcv}
\begin{picture}(8.0,11)%
\multiput(0.0,\cheightfour)(\cwidth,0){2}{\border(\cwidth,\cheight){\card}}
\multiput(0.0,\cheightthree)(\cwidth,0){2}{\border(\cwidth,\cheight){\card}}
\multiput(0.0,\cheighttwo)(\cwidth,0){2}{\border(\cwidth,\cheight){\card}}
\multiput(0.0,\cheight)(\cwidth,0){2}{\border(\cwidth,\cheight){\card}}
\multiput(0.0,0.0)(\cwidth,0){2}{\border(\cwidth,\cheight){\card}}
\end{picture}
\end{document}
