summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ean13isbn/ean13isbn.tex
blob: fc7125776bde5bc752119f38eb258e55c7ed47c1 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
%% $Id: ean13isbn.tex 203 2008-06-14 18:56:59Z zw $
\input utf8-t1 % encTeX required
\documentclass[11pt]{article}
\usepackage{zwgetfdate}
% The following package will be made available soon.
\usepackage[footskip=30pt]{zwpagelayout}
\usepackage[T1]{fontenc}
\usepackage{lmodern,array}
\usepackage[protrusion=false,expansion=true,stretch=8,shrink=24,step=4]{microtype}
\usepackage[ISBN=978-80-85955-35-4,SC0]{ean13isbn}
\extrarowheight 2pt
\def\sup#1{\ensuremath{^{\mathrm{#1}}}}
{\lccode`\!`\\
\lowercase{\gdef\Bslash{!}}}
\DeclareRobustCommand\cmd[1]{\texttt{\Bslash#1}}
\mubytein 0 % important due to bug in url.sty
\usepackage[pdftitle=ISBN\ with\ EAN13\ barcodes, pdfauthor=Zdenek\ Wagner,
            pdfkeywords={ISBN,\ EAN},bookmarks,bookmarksopenlevel=2,bookmarksopen]{hyperref}
\mubytein 1 \mubyteout 3 \mubytelog 3
\begin{document}
\title{ISBN with EAN13 barcodes}
\author{Zdeněk Wagner\\\url{http://icebearsoft.euweb.cz}}
\date{Package date: \DateOfPackage{ean13isbn}}
\maketitle

\begin{abstract}\noindent
This package is used for printing EAN13 barcodes including the ISBN according to its specification
valid after January 1\sup{st} 2007. The format of the ISBN has changed and it is now equal to the
EAN number. It seems that the font for writing ISBN is unspecified.
\end{abstract}

\tableofcontents

\section{Requirements}
Tha package is just a \LaTeX\ interface with a small hack for \texttt{ean13.tex} developed by Petr
Olšák. This file is available from CTAN and \TeX\ Live. It is hopefully included in other main
\TeX\ distributions. The package also requires \textsc{kvoptions} and \textsc{keyval} which are
standard parts of all \LaTeX\ distributions.

\section{Usage}
The package is intended to be used as an auxilliary tool for book typesetting. It therefore accepts
all information as package options. However, it may sometimes be useful to produce several ISBN bar
codes within the same file. In such a case you can supply arguments to the macros directly.

The package is loaded by:

\medskip
\verb;\usepackage[;$\langle$\textit{options}$\rangle$\verb;]{ean13isbn};

\medskip
The options and commands are described in the following text.

\subsection{Option ISBN}
This option defines the ISBN. Its format is the string ISBN followed by an equal sign and the
required ISBN in the exact form in which it should be displayed.

\subsection{Size options}
The bar code can be displayed in several sizes. The preferred size is selected by specifying its
name. The list of normalized sizes is shown in Table~\ref{size.options}. The default size is SC2.

\begin{table}[hbt]
\caption{EAN13 size options}\label{size.options}
\bigskip
\noindent
\begin{tabular}{|rrl|}\hline
\bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
0.800 & 0.264\,mm & SC0 \\
0.818 & 0.270\,mm & SC0a \\
0.850 & 0.281\,mm & SC0b \\
0.900 & 0.297\,mm & SC1 \\
0.950 & 0.313\,mm & SC1a \\
1.000 & 0.330\,mm & SC2 \\
1.050 & 0.346\,mm & SC2a \\
1.100 & 0.363\,mm & SC3 \\
1.150 & 0.379\,mm & SC3a \\
\hline
\end{tabular}\hfill
\begin{tabular}{|rrl|}\hline
\bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
1.200 & 0.396\,mm & SC4 \\
1.250 & 0.412\,mm & SC4a \\
1.300 & 0.429\,mm & SC5 \\
1.350 & 0.445\,mm & SC5a \\
1.400 & 0.462\,mm & SC5b \\
1.450 & 0.478\,mm & SC5c \\
1.500 & 0.495\,mm & SC6 \\
1.550 & 0.511\,mm & SC6a \\
1.600 & 0.528\,mm & SC7 \\
\hline
\end{tabular}\hfill
\begin{tabular}{|rrl|}\hline
\bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
1.650 & 0.544\,mm & SC7a \\
1.700 & 0.561\,mm & SC7b \\
1.750 & 0.577\,mm & SC7c \\
1.800 & 0.594\,mm & SC8 \\
1.850 & 0.610\,mm & SC8a \\
1.900 & 0.627\,mm & SC8b \\
1.950 & 0.643\,mm & SC8c \\
2.000 & 0.660\,mm & SC9 \\
2.120 & 0.700\,mm & SC10 \\
\hline
\end{tabular}
\end{table}

\subsection{Option help}
This option prints the text version of Table~\ref{size.options} in the log file.

\subsection{Command \cmd{ISBN}}
This command prints the text ISBN followed by a space and the ISBN value as specified in the option
list. The ISBN is printed in the current font. It makes no sense to use this command if ISBN was
not specified as the package option. In such a case the command will display an error.

\subsection{Command \cmd{EANisbn}}
This command produces the bar code including ISBN using information entered as the package options.
The command, however, accepts an optional argument within square brackets. These argument have the
same format as the package options. The command is then executed inside a group. The optional
arguments override those given as the package options and vanish after the command is executed.

\subsection{Command \cmd{EAN}}
This is the original plain \TeX\ macro from \texttt{ean13.tex}. Use it in case you wish to print
the bar code without an ISBN.

\subsection{Configuration file}
It is sometimes necessary to prepare a book and its cover. They are defined in separate files yet
it is not practical to write the same ISBN at two places. The package therefore reads file
\texttt{ean13isbn.cfg} from the working directory (it does not look into the standard \LaTeX\
search path). The file should set keys in the \texttt{zwean} group. Its contents may be:

\medskip
\begin{verbatim}
\ProvidesFile{ean13isbn.cfg}
\setkeys{zwean}{SC0,ISBN=978-80-86619-23-1}
\end{verbatim}

The files for both the book and its cover will then just include the package without any options.

\section{Examples}
In order to typeset this manual the package was loaded by the following command:

\medskip
\verb;\usepackage[ISBN=978-80-85955-35-4,SC0]{ean13isbn};

\medskip
We can thus print the ISBN. Issuing just the command \cmd{ISBN} yields the text:

\medskip
\centerline{\ISBN}

\medskip
The bar
code will be produced in the smallest size if we use \cmd{EANisbn} without an optional argument:

\medskip
\centerline{\EANisbn}

\medskip
We may produce a bar code for a different ISBN at a different size if the information is given in
the optional argument. Thus \verb;\EANisbn[SC5b,ISBN=978-80-7340-097-2]; will produce:

\medskip
\centerline{\EANisbn[SC5b,ISBN=978-80-7340-097-2]}

\medskip
Now we make a slightly larger barcode for the ISBN given as the package option by using
\verb;\EANisbn[SC3];:

\medskip
\centerline{\EANisbn[SC3]}

\medskip
We can also print a bar code for another ISBN at the size given as the package option using
\verb;\EANisbn[ISBN=978-80-7340-097-2];:

\medskip
\centerline{\EANisbn[ISBN=978-80-7340-097-2]}

\medskip
Finally we print just the EAN bar code. Its size is always defined by the package option. Notice
the mandatory spaces in the command syntax:

\medskip
\verb*;\EAN 978-80-7340-097-2 ;

The result is:

\medskip
\centerline{\EAN 978-80-7340-097-2 }

\section{Notice}
The plain \TeX\ file \texttt{ean13.tex} uses the following ``unprotected'' macros: \cmd{X},
\cmd{ocrb}, \cmd{ocrbsmall}, \cmd{barheight}, \cmd{bcorr}, \cmd{numlines}, \cmd{numdigit},
\cmd{A}, \cmd{B}, \cmd{EANbox} and others. Do not redefine them.

\section{License}
The package can be used and distributed according to the LaTeX Project Public License version~1.3 or later the
text of which can be found at the \texttt{License.txt} file in the \texttt{doc} directory or at
\url{http://www.latex-project.org/lppl.txt}

\section{References}
\begin{enumerate}
\item Petr Olšák: The EAN barcodes by \TeX. TUGboat 15 (December 1994), No. 4, pp.~459--464.
\url{http://www.tug.org/TUGboat/Articles/tb15-4/tb45olsa.pdf}

\item Petr Olšák: Čárové kódy EAN v \TeX{}u. Zpravodaj Československého sdružení uživatelů \TeX{}u,
6(2), 86--96 (1996). \url{http://bulletin.cstug.cz/bul962.shtml}

\item Adriana Benadiková, Stefan Mada and Stanislav
Weinlich: \textit{Čárové kódy, automatická iden\-ti\-fi\-kace (Barcodes, the Automatic Identification)}.
Grada 1994, 272 pp., ISBN \hbox{80-85623-66-8}.
\end{enumerate}

\end{document}