Debian Codegraph @

texmf-dist/doc/latex/ean13isbn/ean13isbn.tex

raw
1 %% $Id: ean13isbn.tex 341 2010-12-03 22:33:52Z zw $
2 \input utf8-t1 % encTeX required
3 \documentclass[11pt]{article}
4 \usepackage{zwgetfdate}
5 \usepackage[footskip=30pt,nopdfinfo]{zwpagelayout}
6 \usepackage[T1]{fontenc}
7 \usepackage{lmodern,array}
8 \usepackage[protrusion=false,expansion=true,stretch=8,shrink=24,step=4]{microtype}
9 \usepackage[ISBN=978-80-85955-35-4,SC0]{ean13isbn}
10 \extrarowheight 2pt
11 \def\sup#1{\ensuremath{^{\mathrm{#1}}}}
12 {\lccode`\!`\\
13 \lowercase{\gdef\Bslash{!}}}
14 \DeclareRobustCommand\cmd[1]{\texttt{\Bslash#1}}
15 \mubytein 0 % important due to bug in url.sty
16 \usepackage[pdftitle=ISBN\ with\ EAN13\ barcodes, pdfauthor=Zdenek\ Wagner,
17 pdfkeywords={ISBN,\ EAN},bookmarks,bookmarksopenlevel=2,bookmarksopen]{hyperref}
18 \mubytein 1 \mubyteout 3 \mubytelog 3
19 \begin{document}
20 \title{ISBN with EAN13 barcodes}
21 \author{Zdeněk Wagner\\\url{http://icebearsoft.euweb.cz}}
22 \date{Package date: \DateOfPackage{ean13isbn}}
23 \maketitle
24
25 \begin{abstract}\noindent
26 This package is used for printing EAN13 barcodes including the ISBN according to its specification
27 valid after January 1\sup{st} 2007. The format of the ISBN has changed and it is now equal to the
28 EAN number. It seems that the font for writing ISBN is unspecified.
29 \end{abstract}
30
31 \tableofcontents
32
33 \section{Requirements}
34 Tha package is just a \LaTeX\ interface with a small hack for \texttt{ean13.tex} developed by Petr
35 Olšák. This file is available from CTAN and \TeX\ Live. It is hopefully included in other main
36 \TeX\ distributions. The package also requires \textsc{kvoptions} and \textsc{keyval} which are
37 standard parts of all \LaTeX\ distributions.
38
39 \section{Usage}
40 The package is intended to be used as an auxilliary tool for book typesetting. It therefore accepts
41 all information as package options. However, it may sometimes be useful to produce several ISBN bar
42 codes within the same file. In such a case you can supply arguments to the macros directly.
43
44 The package is loaded by:
45
46 \medskip
47 \verb;\usepackage[;$\langle$\textit{options}$\rangle$\verb;]{ean13isbn};
48
49 \medskip
50 The options and commands are described in the following text.
51
52 \subsection{Option ISBN}
53 This option defines the ISBN. Its format is the string ISBN followed by an equal sign and the
54 required ISBN in the exact form in which it should be displayed.
55
56 \subsection{Size options}
57 The bar code can be displayed in several sizes. The preferred size is selected by specifying its
58 name. The list of normalized sizes is shown in Table~\ref{size.options}. The default size is SC2.
59
60 \begin{table}[hbt]
61 \caption{EAN13 size options}\label{size.options}
62 \bigskip
63 \noindent
64 \begin{tabular}{|rrl|}\hline
65 \bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
66 0.800 & 0.264\,mm & SC0 \\
67 0.818 & 0.270\,mm & SC0a \\
68 0.850 & 0.281\,mm & SC0b \\
69 0.900 & 0.297\,mm & SC1 \\
70 0.950 & 0.313\,mm & SC1a \\
71 1.000 & 0.330\,mm & SC2 \\
72 1.050 & 0.346\,mm & SC2a \\
73 1.100 & 0.363\,mm & SC3 \\
74 1.150 & 0.379\,mm & SC3a \\
75 \hline
76 \end{tabular}\hfill
77 \begin{tabular}{|rrl|}\hline
78 \bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
79 1.200 & 0.396\,mm & SC4 \\
80 1.250 & 0.412\,mm & SC4a \\
81 1.300 & 0.429\,mm & SC5 \\
82 1.350 & 0.445\,mm & SC5a \\
83 1.400 & 0.462\,mm & SC5b \\
84 1.450 & 0.478\,mm & SC5c \\
85 1.500 & 0.495\,mm & SC6 \\
86 1.550 & 0.511\,mm & SC6a \\
87 1.600 & 0.528\,mm & SC7 \\
88 \hline
89 \end{tabular}\hfill
90 \begin{tabular}{|rrl|}\hline
91 \bfseries Mag. & \bfseries Module & \bfseries Option \\ \hline
92 1.650 & 0.544\,mm & SC7a \\
93 1.700 & 0.561\,mm & SC7b \\
94 1.750 & 0.577\,mm & SC7c \\
95 1.800 & 0.594\,mm & SC8 \\
96 1.850 & 0.610\,mm & SC8a \\
97 1.900 & 0.627\,mm & SC8b \\
98 1.950 & 0.643\,mm & SC8c \\
99 2.000 & 0.660\,mm & SC9 \\
100 2.120 & 0.700\,mm & SC10 \\
101 \hline
102 \end{tabular}
103 \end{table}
104
105 \subsection{Option help}
106 This option prints the text version of Table~\ref{size.options} in the log file.
107
108 \subsection{Command \cmd{ISBN}}
109 This command prints the text ISBN followed by a space and the ISBN value as specified in the option
110 list. The ISBN is printed in the current font. It makes no sense to use this command if ISBN was
111 not specified as the package option. In such a case the command will display an error.
112
113 \subsection{Command \cmd{EANisbn}}
114 This command produces the bar code including ISBN using information entered as the package options.
115 The command, however, accepts an optional argument within square brackets. These argument have the
116 same format as the package options. The command is then executed inside a group. The optional
117 arguments override those given as the package options and vanish after the command is executed.
118
119 \subsection{Command \cmd{EAN}}
120 This is the original plain \TeX\ macro from \texttt{ean13.tex}. Use it in case you wish to print
121 the bar code without an ISBN.
122
123 \subsection{Configuration file}
124 It is sometimes necessary to prepare a book and its cover. They are defined in separate files yet
125 it is not practical to write the same ISBN at two places. The package therefore reads file
126 \texttt{ean13isbn.cfg} from the working directory (it does not look into the standard \LaTeX\
127 search path). The file should set keys in the \texttt{zwean} group. Its contents may be:
128
129 \medskip
130 \begin{verbatim}
131 \ProvidesFile{ean13isbn.cfg}
132 \setkeys{zwean}{SC0,ISBN=978-80-86619-23-1}
133 \end{verbatim}
134
135 The files for both the book and its cover will then just include the package without any options.
136
137 \section{Examples}
138 In order to typeset this manual the package was loaded by the following command:
139
140 \medskip
141 \verb;\usepackage[ISBN=978-80-85955-35-4,SC0]{ean13isbn};
142
143 \medskip
144 We can thus print the ISBN. Issuing just the command \cmd{ISBN} yields the text:
145
146 \medskip
147 \centerline{\ISBN}
148
149 \medskip
150 The bar
151 code will be produced in the smallest size if we use \cmd{EANisbn} without an optional argument:
152
153 \medskip
154 \centerline{\EANisbn}
155
156 \medskip
157 We may produce a bar code for a different ISBN at a different size if the information is given in
158 the optional argument. Thus \verb;\EANisbn[SC5b,ISBN=978-80-7340-097-2]; will produce:
159
160 \medskip
161 \centerline{\EANisbn[SC5b,ISBN=978-80-7340-097-2]}
162
163 \medskip
164 Now we make a slightly larger barcode for the ISBN given as the package option by using
165 \verb;\EANisbn[SC3];:
166
167 \medskip
168 \centerline{\EANisbn[SC3]}
169
170 \medskip
171 We can also print a bar code for another ISBN at the size given as the package option using
172 \verb;\EANisbn[ISBN=978-80-7340-097-2];:
173
174 \medskip
175 \centerline{\EANisbn[ISBN=978-80-7340-097-2]}
176
177 \medskip
178 Finally we print just the EAN bar code. Its size is always defined by the package option. Notice
179 the mandatory spaces in the command syntax:
180
181 \medskip
182 \verb*;\EAN 978-80-7340-097-2 ;
183
184 The result is:
185
186 \medskip
187 \centerline{\EAN 978-80-7340-097-2 }
188
189 \section{Notice}
190 The plain \TeX\ file \texttt{ean13.tex} uses the following ``unprotected'' macros: \cmd{X},
191 \cmd{ocrb}, \cmd{ocrbsmall}, \cmd{barheight}, \cmd{bcorr}, \cmd{numlines}, \cmd{numdigit},
192 \cmd{A}, \cmd{B}, \cmd{EANbox} and others. Do not redefine them.
193
194 \section{History}
195 The version of 24 January 2021 reflects recent changes in PSNFSS.
196
197 \section{License}
198 The package can be used and distributed according to the LaTeX Project Public License version~1.3 or later the
199 text of which can be found at the \texttt{License.txt} file in the \texttt{doc} directory or at
200 \url{http://www.latex-project.org/lppl.txt}
201
202 \section{References}
203 \begin{enumerate}
204 \item Petr Olšák: The EAN barcodes by \TeX. TUGboat 15 (December 1994), No. 4, pp.~459--464.
205 \url{http://www.tug.org/TUGboat/Articles/tb15-4/tb45olsa.pdf}
206
207 \item Petr Olšák: Čárové kódy EAN v \TeX{}u. Zpravodaj Československého sdružení uživatelů \TeX{}u,
208 6(2), 86--96 (1996). \url{http://bulletin.cstug.cz/bul962.shtml}
209
210 \item Adriana Benadiková, Stefan Mada and Stanislav
211 Weinlich: \textit{Čárové kódy, automatická iden\-ti\-fi\-kace (Barcodes, the Automatic Identification)}.
212 Grada 1994, 272 pp., ISBN \hbox{80-85623-66-8}.
213 \end{enumerate}
214
215 \end{document}