summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/card.sty
blob: b08f037237223728894a7e5cdc52dc111461c811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "Silvano Balemi",
%%%     version         = "1.0",
%%%     date            = "12-APR-1993",
%%%     filename        = "card.sty",
%%%     address         = "Automatic Control Laboratory
%%%                        Swiss Federal Institute of Technology (ETH)
%%%                        Zurich,
%%%                        8092 Zurich, 
%%%                        Switzerland",
%%%     telephone       = "+41 (1) 256.55.35",
%%%     FAX             = "+41 (1) 262.43.62",
%%%     email           = "balemi@aut.ee.ethz.ch (Internet)",
%%%     keywords        = "LaTeX, Visiting cards
%%%     supported       = "yes",
%%%     docstring       = "This is a LaTeX substyle file for producing
%%%                        10 visiting cards in credit card format
%%%                        (european standard) on A4 pages
%%%
%%%                        Usage:
%%%                           \documentstyle[card]{article}
%%%                           \begin{document}
%%%                           \card{
%%%                           \put(5,26){Name}
%%%                           \put(5,15){street}
%%%                           \put(5,10){City}
%%%                           \put(5,05){Tel: XXXX}
%%%                           }
%%%                           \starmarkings        % default, or
%%%                           %% \flatmarkings     % markings not on cards, or
%%%                           %% \nomarkings       % no markings
%%%                           \visitingcards
%%%                           \end{document}
%%%  }
%%% ====================================================================

\typeout{Document substyle 'card.sty' for creating visiting cards <12 Apr 93>}

\def\es{} % eat space for nice formatting
\setlength{\unitlength}{1mm}
\setlength{\headheight}{0mm}
\setlength{\headsep}{0mm}
\setlength{\footheight}{0mm}
\setlength{\footskip}{0mm}
\setlength{\topmargin -12mm}
\setlength{\textheight 270mm}
\setlength{\oddsidemargin -11.3mm}
\setlength{\textwidth 177mm}
\pagestyle{empty}

\def\card{}

\def\visitingcard{\es
\newsavebox{\visitingbox}
\sbox{\visitingbox}{\es
\begin{picture}(85.5,54)
\card
\end{picture}
}}

%% Create no markings. Useful when printing double-sided cards.
\def\nomarkings{\def\@markings{}}

%% Draws the full frame around each card. Useful for designing a card.
\def\fullframe{\def\@markings{%
\multiput(0,0)(0,54){6}{\line(1,0){171}}
\multiput(0,0)(85.5,0){3}{\line(0,1){270}}}}

%% Creates small star at all corners of all cards
\def\starmarkings{\def\@markings{%
\multiput(0,0)(0,54){6}{\makebox(0.0,0.1)[c]{{\tiny +}}}
\multiput(85.5,0)(0,54){6}{\makebox(0.0,0.1)[c]{{\tiny +}}}
\multiput(171,0)(0,54){6}{\makebox(0.0,0.1)[c]{{\tiny +}}}}}

%% These markings are not invasive. Markings are not put on the cards.
\def\flatmarkings{\def\@markings{%
\thinlines
\multiput(0,-.5)(85.5,0){3}{\line(0,-1){5}}
\multiput(0,270.5)(85.5,0){3}{\line(0,1){5}}
\multiput(-.5,0)(0,54){6}{\line(-1,0){5}}
\multiput(171.5,0)(0,54){6}{\line(1,0){5}}}}

%% Default markings are starmarkings
\starmarkings

\def\visitingcards{
\visitingcard
\begin{picture}(171,270)(0,0)
    \multiput(0,0)(0,54){5}{\usebox{\visitingbox}}
    \multiput(85.5,0)(0,54){5}{\usebox{\visitingbox}}
    % draw markings
    \@markings 
\end{picture}
}