DIY: Business cards in LaTeX

Business card can be handy in many cases, and it's not a big deal to create it at home. Let me show one of the methods.

Prerequisites

We need to have:
  • matte presentation paper (weight 44 lb/165 g/m2 in my case);
  • razor paper trimmer (I've used X-ACTO 12" Personal Paper Trimmer, but can't recommend it - it has a habit to stuck in the middle of the trimming process);
  • printer (don't know about laser printers, but ink one works fine for me);
  • LaTeX software.
The last point can be challenging, because LaTeX is not so smooth and user friendly as it can be. My basic recommendations:

  • install Perl (it's required by auto-pst-pdf package);
  • update/install all the required LaTeX packages (e.g., some Linux distributions provide incredible old LaTeX packages);
  • use "-shell-escape" command line option for pdflatex command;
  • if nothing helps, don't use "auto-pst-pdf", but build DVI/PS file, and convert it to PDF.

Single business card

The code (based on LaTeX QR Based Business Card):

\documentclass[11pt,a4paper]{memoir}

\setstocksize{55mm}{85mm} % UK Stock size
\setpagecc{55mm}{85mm}{*}
\settypeblocksize{45mm}{75mm}{*}
\setulmargins{5mm}{*}{*}
\setlrmargins{5mm}{*}{*}


\setheadfoot{0.1pt}{0.1pt}
\setheaderspaces{1pt}{*}{*}

\checkandfixthelayout[fixed]

\pagestyle{empty}

\usepackage{pstricks}
\usepackage{auto-pst-pdf,pst-barcode}

\begin{document}
    %\pagecolor[cmyk]{.22,.36,.51,.08}%
    \begin{Spacing}{0.75}%
    \noindent
    \textbf{Alexander~Slesarev}\\
    \rule{74mm}{1mm}\\
    \begin{minipage}[t]{30mm}
        \vspace{-1mm}%
        \begin{pspicture}(30mm,30mm)
            % The MECARD format is used to exchange contact information. More information at:
            % http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/function/application/addressbook/index.html
            \psbarcode{MECARD:N:Slesarev,Alexander;TEL:+16047165085;EMAIL:alex.slesarev@gmail.com;URL:http://nuald.blogspot.com;;}{eclevel=L width=1.15 height=1.15}{qrcode}
        \end{pspicture}
    \end{minipage}
    \hspace{1mm}
    \begin{minipage}[t]{42mm}
        \vspace{-1mm}%
        \begin{flushleft}
        {\scriptsize
            \begin{Spacing}{1}%
            \textbf{IT Specialist}\\
            \hspace{5mm}Software Development\\
            \hspace{5mm}Security Researcher\\
            \hspace{5mm}High Load Systems\vspace{9mm}\\
            \end{Spacing}
        }
        {\tiny
            \textbf{email:} alex.slesarev@gmail.com\\
            \textbf{phone:} 604-716-5085\\
            \textbf{web:} http://nuald.blogspot.com/\\
            \vspace*{2mm}
        }
        \end{flushleft}
    \end{minipage}
    \rule{74mm}{1mm}
    \end{Spacing}
\end{document}

After the build you'll got something like this:


I would like to notice that it can looks larger on the monitor comparing with the printing size due to different DPIs.

Multiply business card up to fill a page

Use the generated PDF to fill the boxes in the following LaTeX file (based on Tom Schneider template):

\documentclass{article}
\newcommand{\verticalcards}{5}
\textwidth 22.00cm % 21.59cm
\textheight 27.94cm
\topmargin -1.75in % was -1.0

\headheight 0in
\headsep 0in
\oddsidemargin -0.5in % ok fits A4 paper

\usepackage{pstricks} % allows using PSTricks!!  Remove if you don't have it.
\usepackage{pst-node} % nodes in pst

\usepackage{graphics}

\pagestyle{empty} % removes page numbers
\begin{document}
\noindent
\setlength{\unitlength}{1in}
\begin{picture}(8.5,11)(0.0,0.3937) % revised for 5 vertical per page
  \thicklines
  \multiput(0,0)(3.54,0.0){2}{ % horizontal (x) motion
     \multiput(0,0)(0.0,2.04){\verticalcards}{ % vertical (y) motion
        \framebox(3.5,2){ % x,y size of box, inches
           \shortstack[l]{
           \includegraphics*{visitcard.pdf}
           } % end shortstack
        } % end makebox
     } % end multiput
  } % end multiput
\end{picture}
\end{document}

Please notice includegraphics command. You can use not only a PDF file, but any appropriate image.
The result will looks like:


That's all! Print it, trim and you've got desired pieces of paper.

P.S. If you have some questions about setting up the LaTeX ask in comments, just include the information about your OS and LaTeX version.

Comments

Post a Comment

Popular posts from this blog

Web application framework comparison by memory consumption

Trac Ticket Workflow

Python vs JS vs PHP for embedded systems